Posts for: #Caching
Hot Key Detection and Mitigation
Cache Eviction Policies
CDN and Edge Caching: Serving Content from Next Door
Your origin server is in us-east-1. Your user is in Mumbai. That’s 200ms of latency before a single byte transfers. CDNs put your content on a server down the street.
Proximity Search: Finding What’s Nearby at Scale
User opens the app. Show the nearest 10 coffee shops. Sounds simple until you realize ’nearest’ means computing distance against millions of locations in under 100ms.
Thundering Herd
Cache expires. 10,000 requests hit the database simultaneously. Your DB collapses. How request coalescing and probabilistic expiration prevent the stampede.
Multi-Level Caching: L1, L2, and Beyond
Why one cache isn’t enough. How to layer local, distributed, and CDN caches for maximum performance without losing your mind on consistency.
Cache Stampede: When Expiry Causes Chaos
What happens when a popular cache key expires and thousands of requests hit your database at once. Three patterns to prevent the thundering herd.
Cache Invalidation: The Hard Problem
There are only two hard things in computer science: cache invalidation and naming things. Here’s why invalidation is so tricky, and what actually works.
Caching Patterns: Cache-Aside, Write-Through, and Friends
The four fundamental caching patterns every engineer should know. When to use cache-aside vs write-through vs write-behind vs read-through.