Scaling to 2.5 Billion Daily Requests: Architecture and Production Lessons
Discover how Bringits architected a high-scale system processing over 2.5 billion daily HTTP requests using BullMQ, Kafka, PostgreSQL, and KEDA autoscaling.

Running billions of tasks daily introduces critical scaling bottlenecks where high traffic from a single client can overwhelm shared queues. At Bringits, the engineering team processes over 2.5 billion HTTP requests daily, maintaining an average throughput of 11,000 tasks per second—and peaking at over 16,000 tasks per second—across 6,000 to 18,000 Pods. Maintaining a strict target processing latency of 300 milliseconds from execution to final sink broadcast requires robust architectural decisions and careful resource management.
Refining the Architecture with BullMQ and Kafka
Initial architectural instincts relying on a single infrastructure layer or item-level scheduling failed under massive scale. While Apache Kafka handles high write throughput efficiently, it lacks delayed jobs, job-level locks, and cheap duplicate prevention. Conversely, BullMQ excels at queue management, but processing a billion results daily with individual locks and events overloads Redis. Furthermore, scheduling millions of individual repeatable items generates excessive timers.
To resolve this, the engineering team decoupled job processing from result streaming:
- Batch Scheduling: A single job scheduler per phase pages through database items using cursors in batches of 1,000, dispatching each batch to the queue via a single bulk addition without memory bloat.
- Lean Jobs: Because all items in a phase share the same request and parsing pipeline, jobs contain only item identifiers and states, while execution definitions reside once in Redis.
- Targeted Data Flow: Workers transmit complete datasets directly to client topics, sending only execution status, children, and a Redis hash key to the orchestrator for string comparison.
- Database Deduplication: The orchestrator performs deduplication using unique constraints on item hashes and phases in PostgreSQL, automatically purging stale items to maintain a compact database footprint of approximately 17 gigabytes.
Autoscaling Complexities and KEDA Management
Associating each job with project-specific groups enables precise rate limiting through paid queuing features, preventing massive project bursts from overwhelming execution capacity. Autoscaling via KEDA required evaluating multiple signals to prevent erroneous pod scaling when queues contain restricted jobs.
KEDA evaluates both arrival rate capacity calculations—derived from ClickHouse execution durations—and filtered queue lengths restricted by five-minute rate limits. To prevent catastrophic scaling failures, monitoring safeguards ensure that if database metrics become temporarily unavailable, systems retain the last valid metric rather than falling back to a dangerous zero capacity.
Production Lessons and Future Adjustments
Operating at scale exposes edge cases that synthetic testing misses. For instance, oversized messages exceeding broker limits previously caused silent failures where items remained indefinitely in a new state. Engineers resolved this by configuring workers to strip child payloads on oversized errors and flag affected items for manual review.
Reflecting on the infrastructure, separating queue management from streaming requires managing two distinct services, dual lag monitors, and specialized software licenses. If restarting the project, the team noted they would instrument individual task waiting times from day one utilizing native creation and execution timestamps to monitor tail latencies across autoscaling adjustments.





