</> MAANG.io
system design Β· 101

Foundations

Master system design interviews with scalable architecture patterns, distributed systems, and real-world design challenges.

0/81 solved 0% complete

Caching β€” Part 2: Architecture & Internals

maang.io System Design Series


What is this?

Back to the desk drawer. In Part 1 we decided to keep a fast copy of hot data close by. But a drawer is small. The moment you try to put one more thing in a full drawer, you face the question that defines this entire chapter: what do you take out? Pull the wrong thing and tomorrow you're walking down the hall for it again. Keep the right things and the drawer feels magical β€” everything you reach for is already there.

This part is about the engineering inside the drawer: the rules for what to evict, the actual machines (Redis, Memcached) that hold the data, and what happens when one drawer isn't enough and you need a whole wall of them working together.

The one-line idea: a cache is finite, so its real intelligence is in what it chooses to forget β€” and once it grows beyond one box, in how it spreads keys across many boxes without going cold every time the cluster changes.

We'll keep the desk-drawer image, but now the drawer has a clear-out policy and, by the end, a whole filing system spread across the office.


Sign in to continue reading

The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.

Sign in to read the full lesson

Sign in to MAANG.io

Use your Google or Microsoft account β€” no password to remember.

Continue with Google Continue with Microsoft

Please accept the terms above to continue.