SystemKit

Design address autocomplete for a delivery app

Apply prefix search to addresses and places, where location matters more than popularity and typos are routine.

The brief

Customers type a delivery address or a place name into a delivery app and pick from a short list. Suggestions must favor results near the user, stay within the correct country's data, and tolerate common typos. Choosing a suggestion must resolve to one stable place ID with coordinates, because a wrong pin means a failed delivery. Keep routing, pricing, and courier dispatch outside this exercise.

  • 10 million people use the app each day. Each runs 1.5 address or place searches a day, and each search sends 6 suggestion requests after debouncing. Use decimal units and 86,400 seconds per day.
  • Peak traffic is 5 times the daily average. The app serves 4 regions, and the busiest carries 40% of traffic and 40% of the catalog. Assume its peak lines up with the global peak.
  • The catalog holds 400 million addresses and 50 million places at about 200 bytes each, refreshed monthly from data vendors. Search structures take 3 times the raw size. A serving node has 64 GB of usable memory.
  • About 10% of requests contain a typo and need fuzzy matching, which costs 5 times an exact prefix lookup. A node handles 2,000 exact lookups per second.
  • Aim for p95 under 100 ms on the server. Text typed into the box can identify where someone lives, so treat it as personal data: do not put it in shared caches keyed to a person or in public ranking.

Reading a design isn’t the same as producing one under a clock. Try it timed: the requirement change stays hidden until partway through.

Loading your draft…

State your scope. Estimate average and peak request rates, the busiest region's peak, the extra CPU from fuzzy matching, and the index size and shard count for the busiest region. Keep units visible.

0 / 4,000 characters

Name the components and what each stores. Trace one suggestion request, one mistyped request, and the moment a person picks a result. Explain how location affects both ranking and any cache key.

0 / 4,000 characters

Choose a likely bottleneck and the evidence that would justify scaling it. Explain what users see if a region's serving tier or a new data build fails, and how they can still finish an order.

0 / 4,000 characters

Respond to the courier-report change below. Decide where new entries live until the next full build, how typo matching reaches them, and what stops a bad report from misdirecting deliveries.

The requirement changesCouriers can now report addresses the vendors do not have yet, such as a newly opened apartment tower or a corrected entrance. A verified report must be searchable in its region within 10 minutes, including with typos. Your monthly build alone no longer meets this. What changes, and what new failure can it introduce?

0 / 4,000 characters

Write an initial response in all four sections to unlock the checklist and two worked approaches.