techdiagrams.net
← All templates

Food delivery platform

An event-driven delivery backend: orders absorb spikes through a leveling queue, and driver dispatch runs as a scatter-gather auction over geo-partitioned cells.

Open in editor — free, no login Download JSON
GEO-PARTITIONED DISPATCH CELLSplace orderwrite orderOrderPlaced→ kitchen prepscatter offers · first-accept winsoffer ×5driver assignedCustomer Apporder + live trackingAPI Gatewayauth · rate limitsOrder Servicevalidates · pricesOrders DBgeo-partitioned by cityOrderPlacedat-least-once · leveledDispatch Orchestratorauction per orderDriver Gatewayoffer push · GPS inDrivers — Cell 8a2downtown · 214 onlineDrivers — Cell 8b7suburbs · 61 onlineRestaurant Servicekitchen display · prep timesCustomer Notifystatus: driver assignedthe auction gather:offer 5 nearest drivers, 8s deadline —first accept wins, others revoked.no accepts → widen radius, re-scatter

What this design does

Delivery platforms live on two nasty curves: lunch-rush spikes and the physics of finding a nearby driver fast. This design absorbs the spike with queue-based load leveling (the kitchen doesn't care about your p99), then dispatches by auction — offers scatter to candidate drivers in the order's geo cell, and the first acceptance wins the gather. Geo-partitioning keeps every dispatch decision local: a busy downtown cell can't slow the suburbs.

The patterns it composes

Import it, attach your own numbers, and verify the design against failures — or read the engineering notes.