Browse and load the seat map
The seat map is the hottest read and may be a little stale, so it stays off the primary. The CDN and a short-lived cache answer most requests, and a read replica rebuilds the map on a miss.
- The app calls
GET /events/.{id}/ seats - The CDN answers if its copy is fresh enough; the brief allows a few seconds of staleness.
- On a miss, the event service reads the seat-map cache, or rebuilds it from a read replica.
- The app draws the map, which shows seats but doesn’t decide who gets one.
Diagram as text
Components: Fan's app (Client); CDN (CDN); API gateway (API gateway); Event service (Service); Seat-map cache (Cache); Read replica (SQL DB); Inventory DB (primary) (SQL DB). Connections: Fan's app → CDN (GET seat map); CDN → API gateway (on a miss); API gateway → Event service; Event service → Seat-map cache (fresh copy?); Event service → Read replica (rebuild on a miss); Inventory DB (primary) → Read replica (replication), asynchronous.
Read:Learn: Caching strategyLearn: Read-heavy
Check yourself
The map is a few seconds stale. Why is that safe?
Show answerHide answer
The claim doesn’t trust it: a hold goes to the source of truth, so a stale map costs a fan a retry, not a double sale.