All posts

Your Food Is Ready. Your Delivery Partner Isn't.

A 15-minute meal becomes a 45-minute delivery. The system design behind kitchen predictions, dispatch timing, and the promise on your food delivery app.

· 3 min read · Tanmay Singh

8:00 PM. You order dinner.

8:15 PM. The restaurant marks it ready.

8:30 PM. The app still says “Finding your delivery partner.”

The kitchen did its job. Your food is getting cold anyway. What went wrong?

Food delivery is a meeting problem: a meal and a person must reach the same counter at roughly the same time.

We'll use Zomato as the product reference. Linked engineering posts describe its published work; the design below and all example timings are illustrative, not claims about its current implementation.

1. There are two clocks before pickup

One clock belongs to the kitchen. The other belongs to the delivery partner travelling to it. These clocks run in parallel.

For a single order, a useful approximation is:

Delivery time ≈ max(food-ready time, partner-arrival time) + handoff + travel to your door.

Measure the first two from the same starting point: order acceptance. Partner arrival includes assignment delay and travel to the restaurant. Handoff includes collecting and checking the package; the last leg includes access to your building.

If food is ready at minute 15 but the partner arrives at minute 30, pickup cannot start before minute 30. Faster cooking does not fix that delay.

2. “Assign immediately” creates a different queue

Send someone too early and they wait outside the kitchen, unavailable for another order. Send them too late and the meal waits on a shelf.

Our starting policy: aim for arrival near predicted food readiness, allowing for offer acceptance and travel uncertainty. If preparation takes 18 minutes and acceptance plus travel takes 7, starting dispatch around minute 11 is a first estimate—not a guaranteed schedule.

Predict a range using the order's items, the restaurant's recent pace, time of day, and available workload signals. A kitchen's dine-in queue may be invisible to the platform. Scarce partner supply may require searching earlier.

Zomato's food preparation prediction article describes variable preparation times, different penalties for prediction errors, and predicting partner wait and handoff times alongside preparation.

Here is the tradeoff with food ready at minute 18:

3. “Five more minutes” must change the plan

A prediction is useful only if the system responds when reality changes.

In this proposed design, events carry an order ID, event ID, timestamp, and version. Consumers deduplicate retries and reject invalid transitions: a delayed “preparing” event must not undo a confirmed pickup. An atomic reservation prevents two dispatch workers from assigning the same available capacity.

If preparation slips, reconsider unaccepted offers. Avoid repeatedly moving an accepted partner between orders; reassign only when the expected benefit justifies the disruption. If supply runs out, widen the search within practical limits and revise the delivery window.

The customer should see “The kitchen is running behind; delivery now expected at 8:40–8:50”, rather than a countdown that resets without explanation. Zomato's ETA engineering post describes estimates incorporating preparation, travel, and dynamic conditions, with ETA used for delay communication too.

4. Two nearby orders can make a bad batch

Imagine order A is ready now. Order B, from the same restaurant, needs another 10 minutes. Their customers live next door to each other.

The route looks efficient. The timing does not: waiting for B adds 10 minutes before A even leaves. B may also arrive later if A's building takes several minutes to enter.

Evaluate the whole schedule, including readiness, pickup queues, stop order, and building access. Accept a batch only when each order stays within its delay and food-quality constraints. Geographic closeness alone is insufficient.

Measure the wait you usually hide

Track food-ready-to-pickup time, partner waiting time, and delivery-window misses—especially the slowest 10% of orders. Check earnings per working hour and complaints alongside delivery speed, so an improvement for one side does not quietly hurt another.

“Ready” is also a reported event, not perfect ground truth. Missing or premature kitchen updates need investigation before they become training labels.

A good dispatch system coordinates uncertainty. It cannot make every kitchen predictable, but it can adapt without making the meal, the partner, or the customer absorb every surprise.

Would you accept a cheaper delivery with a wider arrival window—or pay more for a tighter one? Tell me which promise you would trust.

Another everyday systems puzzle: Why Your Uber Driver Is Across the Street.