Order event deduplication
Your task
Design the order-events ingestion pipeline for a food-delivery marketplace processing ~40k order state-change events/sec at peak (order placed, accepted, picked up, delivered, cancelled). Downstream consumers include real-time courier dispatch (sub-second), a fraud model, and a financial ledger that must be exactly-once and reconcilable to the cent. Producers are mobile apps on flaky networks that retry aggressively, so the same event arrives 2–5x. Design the ingestion, dedup, ordering-per-order, and delivery guarantees so dispatch stays fast while the ledger stays exact.
It covers
- Orchestration
- Exactly once
- Idempotency