On-demand food delivery platform with restaurant catalog, menu/pricing, cart/checkout, courier assignment, live tracking, and notifications.
Single service handles catalog, cart, checkout, and delivery updates backed by a single database.
What was missing: Edge controls, caching, async, and fault isolation.
Why that's risky: SPOF and poor surge handling.
What gets added: Nothing yet (MVP).
Trade-offs: Fast to build but not production-ready.
Add ingress protection and throttle abusive clients before business logic.
What was missing: No edge/WAF or throttling.
Why that's risky: Susceptible to spikes and abuse.
What gets added: Edge, API gateway, rate limiter.
Trade-offs: More moving parts.
Distribute traffic across app replicas behind a service LB.
What was missing: No redundancy and horizontal scale.
Why that's risky: SPOF and bottleneck.
What gets added: LB and replicas.
Trade-offs: State/session externalization needed.
Break out catalog/cart/checkout services and add cache + dedicated databases.
What was missing: Hot reads and tight coupling across concerns.
Why that's risky: Slow UX under load and deploy blast radius.
What gets added: Cache for reads and service separation.
Trade-offs: Cache invalidation and contract management.
Use queues/workers to decouple side effects; isolate PCI-scoped payment service; add notifications.
What was missing: Checkout blocked by side effects and PCI coupling.
Why that's risky: High tail latencies and wider blast radius.
What gets added: Queue, workers, and isolated payment/delivery services.
Trade-offs: Operational complexity and event contracts.
Add live courier location updates, analytics sink, and blob storage for images/receipts with CDN at the edge.
What was missing: Media offload, live tracking ingestion, and analytics sink.
Why that's risky: UI latency and missing visibility into delivery pipeline.
What gets added: CDN + Blob for media, location ingestion, analytics worker.
Trade-offs: More services and operational overhead.
Require an idempotency key from the client for checkout requests. Persist the key with the final order result. On retry, return the stored outcome. Ensure payment capture and order write are idempotent and use outbox/event logs for downstream publication.
Use a delivery service that batches nearby orders and available couriers. Maintain a priority queue by ETA/cost. Use a worker consuming assignment requests from a queue, with backoff and retries for contention. Keep courier location updates in memory for fast lookups.
Cache per-restaurant menus with short TTLs and invalidate on updates from the partner console. Use background refresh for top restaurants during peaks. Include ETags to avoid sending full payloads.
Isolate payment processing in a dedicated service behind strict network and data access controls. Tokenize card data; never store PANs directly. Use a compliant PSP. Keep the rest of the platform out of PCI scope.
You're in the middle of an interview session. Leaving now will end your current attempt.
Explore concept overviews, real-system examples, key tradeoffs, and interview talking points for each roadmap section.
You've conquered this phase. These are the skills you now own: