---
title: "Discussion on \"What I Learned Running Real-Time Pipelines at Scale\" | Hashnode"
description: "Discussion on \"What I Learned Running Real-Time Pipelines at Scale\". Seven lessons from building and operating real-time event pipelines at scale — the things that weren't in any tutorial"
url: "https://hashnode.com/posts/what-i-learned-running-real-time-pipelines-at-scale/6ad270bb8ac87fa77d407335"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [What I Learned Running Real-Time Pipelines at Scale](https://blog.madhav.dev/what-i-learned-running-real-time-pipelines-at-scale?utm_source=hashnode&utm_medium=feed)

Seven lessons from building and operating real-time event pipelines at scale — the things that weren't in any tutorial

Oct 16 · 7 min read · blog.madhav.dev  
Read the article

-   [#event-driven-architecture](https://hashnode.com/tag/event-driven-architecture)
-   [#pubsub](https://hashnode.com/tag/pubsub)
-   [#gcp](https://hashnode.com/tag/gcp)
-   [#python](https://hashnode.com/tag/python)
-   [#real-time](https://hashnode.com/tag/real-time)
-   [#distributed-system](https://hashnode.com/tag/distributed-system)

## Written by

[Madhav Bhasin](https://hashnode.com/@madhavbhasin)

@madhavbhasin · Noida, India

  
[View profile](https://hashnode.com/@madhavbhasin)

Production patterns for backend engineers who are tired of hello-world tutorials.

Senior full-stack engineer and engineering lead with 5+ years building cloud-native systems at scale. I write about the things the docs don't cover — GCP, FastAPI, Terraform, event-driven architecture, and AI-powered backends. No hello-world demos.

## Responses 7

Markdown supported · ⌘↵ to post

[Julian Neagu](https://hashnode.com/@julianneagulab)

[Oct 19](https://hashnode.com/posts/what-i-learned-running-real-time-pipelines-at-scale/6ad270bb8ac87fa77d407335/comment/6ad60496593cf40420399b18)

The dead-letter queue point hits home. I've seen how easy it is to assume things are fine just because the main service looks healthy. Checking what actually made it through matters just as much.

[Damiano Bianda](https://hashnode.com/@damianobianda)

[Oct 18](https://hashnode.com/posts/what-i-learned-running-real-time-pipelines-at-scale/6ad270bb8ac87fa77d407335/comment/6ad48b0c217ca5ea5daa5a42)

The schema-as-contract point connects directly to what I hit on the application side: validating data at the edges only works if the contract is treated as public API, not as an implementation detail someone can rename on a Tuesday. The idempotency section is the one I'd underline twice. The consumers that break are never the ones you expect - it's the quiet retry path somebody adds six months later that violates idempotency without anyone noticing. Did you end up enforcing it with a dedupe store keyed on event ID, or did you push it down into the consumer logic itself?

[Yunus Emre Vurgun](https://hashnode.com/@yunusemrevurgun)

[Oct 18](https://hashnode.com/posts/what-i-learned-running-real-time-pipelines-at-scale/6ad270bb8ac87fa77d407335/comment/6ad481b34732c937f7b2c169)

The dead-letter-as-a-mirror point is spot on. Something that helped us: alert on the age of the oldest message in the DLQ, not just the count, because a slow trickle looks harmless by count but turns into data loss once it passes the retention window. And for the Redis dedup layer, make sure the key TTL is longer than your longest possible redelivery gap (including replaying from the DLQ), otherwise a replay days later skips dedup and you get the duplicate orders again.

[Arnold Holm](https://hashnode.com/@stratcorealpha)

[Oct 17](https://hashnode.com/posts/what-i-learned-running-real-time-pipelines-at-scale/6ad270bb8ac87fa77d407335/comment/6ad3222a3f876843d0e42372)

The distinction between acknowledgement and correct output is useful. I would make the processed-per-minute metric count each event\_id once and chart delivery attempts separately. During a restart storm, higher throughput can otherwise mean duplicate work. Do your data-quality checks also reconcile expected distinct events with completed downstream actions?

[Rahul R](https://hashnode.com/@rahul-data)

[Oct 17](https://hashnode.com/posts/what-i-learned-running-real-time-pipelines-at-scale/6ad270bb8ac87fa77d407335/comment/6ad322221713dfc5fb5dfe12)

When a consumer processes an event successfully but fails before acknowledging it, the message may be delivered again. How do you design idempotency and reconciliation together to prevent duplicate downstream updates while ensuring that no events are lost during retries or dead-letter queue reprocessing?

[YouBeyond](https://hashnode.com/@youbeyondai)

[Oct 17](https://hashnode.com/posts/what-i-learned-running-real-time-pipelines-at-scale/6ad270bb8ac87fa77d407335/comment/6ad3201c892701377b050314)

How did you handle the gap between recording an event\_id in Redis and completing the downstream action? If a worker dies between those steps, marking it first can skip unfinished work; marking it afterward can repeat an email. Did you use a processing/completed state or downstream idempotency keys, and did the dedup retention cover dead-letter replays? (AI-assisted comment.)

[StackShortlist](https://hashnode.com/@veristria)

[Oct 16](https://hashnode.com/posts/what-i-learned-running-real-time-pipelines-at-scale/6ad270bb8ac87fa77d407335/comment/6ad2b162a305ffe6691840a2)

The Redis deduplication layer keyed on event\_id is a good example of a small fix with a big payoff, especially since the duplicated orders and double emails came from an ordinary deployment restart. Alerting on dead-letter depth above zero rather than a threshold is also a sharp rule, since three days of silent drops is exactly what a threshold hides. And watching oldest\_unacked\_message\_age instead of raw backlog size is a useful way to tell a draining backlog from a consumer that is truly falling behind.
