How we cut CDN metadata lookup latency by 91%
Sep 10, 2026Tim Caswell

Summary
Introduced indexed shards for CDN routing metadata, grouping path metadata into bounded files (approx. 200 KB) to improve cache hit rates and reduce latency. Implemented a binary search mechanism within shards using build-time byte offsets and Base64 encoded pointers for efficient lookup. Leveraged existing JSONL formats and incorporated learnings from Bloom filters and Bulk Redirects for data structure design. Conducted extensive production testing and shadow mode validation to ensure safety and measure performance improvements, achieving a 91% reduction in P99 metadata lookup latency.