Design Real-Time Order Batching and Dispatch for Shoppers

Last updated: November 29, 2026

Quick Overview

Design the system that takes incoming grocery orders, groups compatible ones into batches, and offers each batch to a nearby shopper in real time, at the scale of thousands of stores and hundreds of thousands of shoppers.

Instacart
System Design
Software Engineer
Instacart
November 29, 2026
Software Engineer
System Design Round
System Design
Hard

0

0

0 solved


Design the system that takes incoming grocery orders, groups compatible ones into batches, and offers each batch to a nearby shopper in real time, at the scale of thousands of stores and hundreds of thousands of shoppers.

Dispatch is the heart of Instacart's fulfillment, and senior system design rounds often go here. The interviewer checks how you split the hot path (offer and accept) from the optimization loop, partition by geography and handle offers that are ignored or accepted twice.

What the Interviewer Expects
  • Separate the batching optimizer from the offer and acceptance flow
  • Partition work by geographic zone or store cluster
  • Ingest shopper locations at high write rates with a geo index
  • Make offer acceptance exactly-once with leases and conditional writes
  • Discuss latency targets and the fallback when the optimizer is slow
Key Topics to Cover
geo partitioning
dispatch
optimization loop
leases
event streaming
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you prevent two shoppers accepting the same batch?
  • How would you add a new batching model without risking a bad rollout?
  • What happens during a regional outage of the dispatch service?
  • How does this design support scheduled orders placed days in advance?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional: accept orders with store, items, delivery window and address; group compatible orders (same store, nearby addresses, overlapping windows); offer batches to shoppers; handle accept, decline...

High-Level Design

Order service writes new orders and publishes an order_ready event to a stream partitioned by zone. A location service ingests shopper pings into an in-memory geo index (geohash cells in Redis) ...


Submit Your Answer
Markdown supported