1.1M trails without melting the browser
Problem: streaming route GeoJSON from the API stalled at scale.
Decision: pre-render routes into PMTiles vector tiles with a parallel tippecanoe pipeline (6× faster), hosted on Cloudflare R2.
Result: a 2.1 GB tileset served as byte-range requests from a CDN, with no API server in the path. That's what you're seeing on this map.
150 queries → 11
Problem: the map list fired an N+1 query storm.
Decision: prefetching, dynamic field selection and slim marker types at ingestion.
Result: 93% fewer queries per load. Clustering moved to a web worker, and the cache uses LRU eviction.
Fresh events on a fixed API budget
Problem: Ticketmaster caps calls per day and per second.
Decision: 10 staggered cron jobs across 249 city cells in tiers, ordered so polling always reads fresh counts.
Result: about 4,500 calls a day, always under 5 req/s, with a 500/day on-demand safety valve.