AW Dev Rethought

🕵️ Debugging is like being the detective in a crime movie where you are also the murderer - Filipe Fortes

Data Realities: Data Pipelines Break More Than APIs — Here's Why


Introduction:

APIs break visibly. A failed API call returns an error code, triggers an alert, and gets fixed within hours because the impact is immediate and the feedback loop is tight. Engineers know within minutes when an API is down because users complain, monitors fire, and dashboards turn red.

Data pipelines break quietly. A pipeline that fails at two in the morning may not be noticed until an analyst questions a number in an afternoon meeting. A pipeline that produces incorrect results rather than failing outright may not be noticed for days or weeks — long after the bad data has propagated into dashboards, reports, and downstream systems that business decisions were made from.

The difference is not just operational. It reflects a fundamental structural difference between APIs and data pipelines that makes pipelines inherently more fragile and significantly harder to operate reliably in production.


APIs Have Immediate Feedback Loops, Pipelines Do Not:

When an API call fails, the caller knows immediately. The HTTP response code communicates the failure, the client handles it, and the error is logged and alerted on. The feedback loop between failure and detection is measured in milliseconds.

Data pipelines have no equivalent feedback mechanism by default. A pipeline job that fails silently produces no output rather than an error response. A pipeline that runs successfully but produces incorrect output looks identical to one that produces correct output — at least until someone checks the results.

This absence of immediate feedback is the root cause of most data pipeline operational problems. Teams that build pipelines without instrumenting them for correctness, not just completion, are operating blind. They know their pipelines ran. They do not know whether what their pipelines produced is trustworthy.


Pipelines Have More Moving Parts:

A typical API has a defined interface, a single codebase, and a bounded set of dependencies. When it breaks, the failure is usually localised to one of a manageable number of components.

A data pipeline typically involves multiple stages — ingestion, transformation, validation, loading, and orchestration — each implemented with different tools and potentially maintained by different teams. An Apache Spark job reads from S3, transforms data using custom Python logic, validates against a schema, loads into a data warehouse, and triggers downstream jobs through an orchestration layer like Apache Airflow or Prefect.

Each stage is an independent failure point. Each handoff between stages is an opportunity for data to be lost, duplicated, or corrupted without producing an explicit error. The surface area for failure in a data pipeline is an order of magnitude larger than in a typical API, and the failure modes at each stage are different enough that no single monitoring approach covers all of them.


Schema Changes Break Pipelines Without Warning:

APIs typically version their interfaces. When a breaking change is introduced, a new version is released and consumers have time to migrate. The contract between producer and consumer is explicit and managed.

Data pipelines rarely have equivalent protections. When an upstream data source changes its schema — renames a column, changes a data type, adds a required field, removes a previously available field — downstream pipelines that depend on the old schema break without warning.

The pipeline may fail outright if it cannot find an expected column. More dangerously, it may continue running but produce incorrect results — silently dropping records that do not match the expected schema, or coercing data types in ways that introduce subtle errors. Schema changes are one of the most common causes of data pipeline failures, and they are almost entirely preventable with data contracts and schema validation at pipeline boundaries.


Data Volume and Velocity Create Unique Failure Modes:

APIs handle one request at a time. If a single request contains malformed data, the API rejects it and moves on. The impact is bounded to that one request.

Data pipelines process data in bulk. A malformed record in a batch of ten million rows can cause the entire job to fail, or can be silently dropped, or can corrupt the aggregate results that the rest of the batch contributes to. The relationship between a single bad record and pipeline behaviour is non-linear in ways that make testing difficult and failure modes hard to predict.

Volume also creates operational challenges that APIs do not face. A pipeline that processes ten gigabytes of data per hour behaves very differently when data volume spikes to one hundred gigabytes. Processing time increases, memory pressure rises, and jobs that completed within their scheduling window start running late and colliding with subsequent runs.


Late and Out-of-Order Data Is a Pipeline-Specific Problem:

APIs process requests in the order they arrive. The concept of late data does not apply — a request either arrives or it does not.

Data pipelines, particularly those processing event streams or integrating data from multiple sources, must handle data that arrives late or out of order. An event that occurred at midnight may not arrive in the pipeline until six in the morning due to network delays, batch upload schedules, or upstream processing lag.

How a pipeline handles late data determines whether it produces correct results. Pipelines that assume data arrives in order will produce incorrect aggregations when late events arrive after the window they belong to has already been processed. Handling late data correctly requires explicit watermarking strategies, reprocessing capabilities, and careful consideration of how late arrivals affect already-computed results.


Monitoring Pipelines Requires Different Instrumentation:

API monitoring is relatively straightforward — track request rates, error rates, and latency, and alert when any of them deviate from baseline. These metrics are well understood, tooling is mature, and the operational practices around them are established.

Data pipeline monitoring requires additional dimensions that have no API equivalent. Row counts at each stage — did the pipeline process the expected number of records? Data freshness — did the pipeline complete within the expected time window? Schema conformance — does the output match the expected structure? Statistical distributions — do the values in key columns fall within expected ranges?

Without instrumentation across all of these dimensions, pipeline monitoring catches job failures but misses the more common and more damaging case of jobs that complete successfully but produce incorrect results.


Conclusion:

Data pipelines break more than APIs because they operate without the immediate feedback loops that make API failures visible, because they have more moving parts and more failure modes, and because the data quality problems they produce are harder to detect than the availability problems that APIs surface immediately.

Building reliable data pipelines requires treating correctness as an explicit engineering concern — instrumenting pipelines for data quality, not just job completion, enforcing schema contracts at every boundary, and designing for the late and out-of-order data that production environments consistently produce. The teams that do this build pipelines that can be trusted. The teams that do not discover their pipelines cannot be trusted only after bad data has already caused real damage.


If this article helped you, you can support my work on AW Dev Rethought.


Rethought Relay:
Link copied!

Enjoyed this post?

Stay in the loop

New posts + weekly digest, straight to your inbox.

or

Create a free account

  • Save posts to your vault
  • Like posts & build history
  • New-post alerts

Comments

Add Your Comment

Comment Added!