Swiggy Zomato System Design: 10x Orders at 8 PM @KGPTalkie
Swiggy Zomato System Design: 10x Orders at 8 PM  @KGPTalkie
Uploaded October 2026 | Updated November 2026, 5 days ago
Friday night, eight PM, dinner rush. Ten times the orders, and riders everywhere. Design a food delivery app like Swiggy or Zomato: where do you start?

System Design Interview, Day 004. Most candidates say "a restaurant service, an order service, a delivery service, and Kafka in the middle". That answer is where most candidates lose this round. Naming boxes isn't a design: the interviewer wants to hear which parts are hard and how you'll handle them.

Three hard parts: finding nearby restaurants, the order's state, and assigning the right rider.

- Fix 1: search by location. Split the city into cells (geohash), look at the user's cell and the cells around it, then filter by distance and delivery time. Menus are read a lot and change rarely, so cache them
- Fix 2: the order is a state machine: placed, confirmed, preparing, ready, picked up, delivered. Every update is check-and-set, the new state only if the old one is right. Payment carries an idempotency key, and the order is confirmed only when the payment succeeds
- Fix 3: rider locations live in memory. Say a ping every 4 seconds: not database rows, just the latest point in an in-memory geo index (like Redis GEO), history goes to a separate stream
- Fix 4: assignment. Free riders near the restaurant, ranked by distance and by when the food is ready, the offer goes to one rider with a timeout (say 15 seconds), and accepting marks the rider busy with check-and-set, so one rider never gets two orders
- Fix 5: live tracking. Push the rider's location to the customer over a WebSocket every few seconds; ETA = remaining cooking time + travel time
- The follow-up: Friday 8 PM, ten times the orders, what breaks first? Location writes. One lakh riders pinging every 4 seconds is 25,000 writes per second, so locations live in memory, split by city. Partition the orders database by city too (a Bengaluru order never meets a Delhi rider), and degrade gracefully: busy mode, longer ETAs, a smaller delivery radius, but the app never goes down

That's the answer that takes you to the next round: cell-based search, cached menus, an order state machine with check-and-set, rider locations in memory, assignment with timeouts, partition by city.

Next System Design Interview episode: design BookMyShow seat booking. Comment: what's the longest ETA you've seen in a dinner rush?

kgptalkie.com

#shorts #SystemDesign #SystemDesignInterview #FoodDelivery #Geohash #StateMachine #Idempotency #WebSocket #BackendInterview #InterviewPrep #SoftwareEngineering #KGPTalkie
Swiggy Zomato System Design: 10x Orders at 8 PMAadhaar Authentication System Design: 1 Thumb, 1 RecordLangChain Tutorial for Beginners: Prompt Templates and PlaceholdersIBM Granite 4.2 Dropped Mamba: 34.4 GB KV Cache on a 32 GB GPUllama.cpp Install on Windows: Run GGUF Models FastHow GPUs Work for LLMs, and Why Memory Limits LLM SpeedWhich GPU Should You Buy to Run AI Locally? #shortsFREE Claude Code Setup (No Paid API, No GPU)😳Hermes Agent Setup with Free AI API - Full Tutorial (2026)Granite 4.2 8B Is Smaller - But Needs 10× the KV Cache #shortsHow to Install TensorFlow GPU on Windows 11 | GPU Setup on Windows | TensorFlow GPU SetupInstall Ubuntu 22.04 Desktop with Virtual Box in Windows
Laxmi Kant | KGP Talkie |

Swiggy Zomato System Design: 10x Orders at 8 PM

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER