GOAT EngineerPreparing your learning space…

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

  1. 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.

  2. 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.

  3. 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.

  4. 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.