Rate-Aware Queue System for Partner Integrations
Juthor- NestJS
- Redis
- BullMQ
- PostgreSQL
Problem: Bulk operations could outpace partner APIs, each with its own rate limits, and blind retries turned those limits into a flood of failed calls.
Impact: Bulk updates now reach sales channels reliably, the failed-call flood stopped, and the system runs in production within the existing budget.
Read the full case study for Rate-Aware Queue System for Partner Integrations
Options: Add a new message broker, or build on the Redis already in our stack. With a tight infrastructure budget, I chose Redis and BullMQ and borrowed load-levelling ideas from Kafka and Azure architecture guidance.
What I did
- Designed buffering, a token-bucket rate algorithm with one shared budget per partner account, bounded workers, clear retry rules and fair scheduling across merchants.
- Made limits configurable per partner and verified the result in production monitoring after release.
- After the architecture was agreed, defined clear module boundaries and a PostgreSQL-backed event delivery engine using the outbox pattern, and split the work into gated phases and Jira tasks.