← back to portfolio
case study· 2025· Backend / Systems Engineer· Systems build + load testing

Real-Time Streaming Pipeline

High-throughput telemetry ingestion at 1,000+ RPS.

Overview

A decoupled, cloud-native streaming pipeline that ingests 1,000+ RPS of client telemetry without turning the database into a bottleneck.

Challenge

Naive high-concurrency ingestion causes DB write-storms, connection starvation, and runaway query latency during live-user spikes.

Outcome

The database stopped being the bottleneck — throughput scales with gateway pods, and tail latency stays flat under 1,000+ RPS.

Approach

How it was built.

  1. 01

    Split the write path: async FastAPI gateway → thread-safe TCP socket queue → stateful compute worker with 10-second fixed tumbling windows.

  2. 02

    Compressed 6,800+ micro-transactions into batched ON CONFLICT DO UPDATE upserts, cutting index lock contention and query latency to near-zero.

  3. 03

    Architected for horizontal scale on GKE + Cloud Pub/Sub, so gateway and worker scale independently.

  4. 04

    Validated with Locust distributed load testing to triage bottlenecks, analyze backpressure, and confirm fault tolerance.

Stack
PythonFastAPIPostgreSQLTCP SocketsIn-Memory CachingApache Beam / DataflowLocustGKECloud Pub/Sub
GitHub →← All projects