Is it bad for prod systems to integrate via a data lake?
I work at a major tech company. We have a massive data lake for analytics / data science and essentially all of our systems send logs to it. A pattern that I'm seeing pop up sometimes is teams building systems that read other systems' data from the data lake.
This screams antipattern to me. The data lake introduces significant latency and many of the log streams in it have little to no SLA guarantees. If you read another team's logs from the lake without their knowledge, they could move, delete, or make breaking changes to their logs and not know that they've broken you until you complain. I think it's a lazy way for teams to avoid calling each others' APIs or even talking to each other to discuss integrations. I want to tell them they're making a very big mistake by doing this.
Is there a good argument for applications/services reading each others' logs from a data lake instead of integrating through APIs? Is it a valid pattern? Maybe if the data needs expensive processing before the client can use it and latency isn't important? Or just because it's easier/faster than a proper service integration?
12 comments
[ 2.8 ms ] story [ 45.5 ms ] threadHowever, it's still possible to define schemas, version, and set SLAs on the datasets in the data lake. If you don't do that, then you are going to have to fix this whenever the upstream dataset changes. This is even better if the upstream dataset is produced by a team and they have no idea that they are other people consuming their datasets. Welcome to the Wild West of Data Engineering.
It also happened to me once before--a production system took a dependency on one of my streams in the data lake without my knowledge, and no SLA, then when I made a change to it, they came out of nowhere, blowing me up with e-mails and meeting requests. I told them to go pound sand.
It has its problems. How do I know a data set I am consuming is complete or correct? As a consumer, how do I even know what to test for? Although producers are technically on the hook for the quality of their data, it is not clear which data sets in the data lake have what level of support from the owning team. You probably want to get in writing from the producer that it’s safe to consume or take a dependency on their data.
Personally, I don’t want to vend a service to provide data sets, especially when they’re in hundreds of gigabytes or terabyte scale (for analytical use cases). I don’t want to support all that infrastructure and have engineers supporting he service logic itself, and so a common abstraction makes sense, at least on paper.
One of my recent projects involved using this data lake as an integration point. The specific data lake implementation means that for consumers, the exact time that a dataset (after it is written to the data lake) is available for querying is non deterministic, and that resulted in a lot of friction.
What is the size of the logs you want to consume? Are you able to query specific log lines by wildcard or key? How fast do you need the data once it has been produced? Are you willing to support your own infrastructure (hosts, configuration, patching, etc)? If there is a datalake, is it a common/managed service, and so is the cost of supporting your own service worth it?
Does your data lake enforce schemes on write? If so, how easy is it to change schemes later on, and how does that impact consumers? How do you identify or track consumers of the data, whether you’re using a data lake or a service? Is there support for versioning?
but this depends on what your use cases are (e.g. online vs offline).
I would recommend reading the paper linked to above and sharing it with teams that are taking the approach you describe.
Source: https://martinfowler.com/bliki/DataLake.html