Design Same-Day Delivery Eligibility Lookup by Customer Address

Last updated: November 29, 2026

Quick Overview

Given a customer address, decide in a few milliseconds which delivery zones it falls into and therefore whether same-day, next-day or two-hour delivery is offered, with zones drawn as polygons that operations teams edit often.

Amazon
System Design
Software Engineer
Amazon
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


Given a customer address, decide in a few milliseconds which delivery zones it falls into and therefore whether same-day, next-day or two-hour delivery is offered, with zones drawn as polygons that operations teams edit often.

Fits Amazon's last-mile and delivery promise teams, where zones are polygons tied to delivery stations and capacity. The interviewer checks point-in-polygon indexing, how edits roll out safely, and how the lookup combines geography with time-based cutoffs.

What the Interviewer Expects
  • Represent zones as polygons and index them for point lookup
  • Use a coarse grid or R-tree to prune candidate polygons
  • Combine geography with order cutoff times and capacity
  • Version zone definitions and roll out edits safely
  • Cache results per address
Key Topics to Cover
Point-in-polygon
R-tree
S2 cell covering
Versioned config
Cutoff times
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 would you handle an address that falls exactly on a zone border?
  • What if operations shrinks a zone at 2 pm while customers are mid-checkout?
  • How do you support a temporary weather closure for one area?
  • How would you test a zone edit before publishing it?
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: eligibility(address, timestamp) returns available delivery speeds and the serving station. Non-functional: p99 under 5 ms (called from search, detail page and checkout), zone edi...

High-Level Design
  • Zone authoring tool: ops draw polygons, set the station, speed tier, cutoffs (order by 1 pm for same-day) and capacity links. Edits create a new zone snapshot version after validation.
  • **S...

Submit Your Answer
Markdown supported