Practice problems · Topic
Caching problems
Covers cache-aside, write-through, eviction, invalidation, CDN, hot keys.
Caching problems are about keeping copies of what readers ask for most, close to them, so the database answers only the rest. They test cache-aside and expiry, what happens when a hot key expires and every reader misses at once, and whether your design still holds when the cache starts cold.
Problems that need caching
Read-Heavy API Design: Practice Problem
Design the read path for an API that is mostly reads, then run it against spikes and a cold start. Practise cache-aside, read replicas and hot keys.
Stop a Cache Stampede: Practice Problem
When a popular entry expires, thousands of readers hit the database at once. Practise single flight and origin shields, then measure your design.
Top K Over a Sliding Window: Practice
Keep a live top ten of the last 30 seconds without recounting everything. Practise time buckets, stream processing and hot keys, then run it on a goal.
Fan-Out on Write vs Read: Practice
Copying each post to every follower works until one author has millions. Choose fan-out on write, on read or a mix, then run it against a TV chef.
By GOAT Engineer. Practice problems · Privacy Policy · Contact.