Tags

Caching

Caching

0 lessons
5 system designs
4 community items

caching

System Design

5 articles
System Design

Blob Storage, Object Stores & CDNs

Databases are wrong for storing large unstructured files - photos, videos, backups, logs. Object stores like S3 give you cheap, durable, infinitely scalable storage for blobs, while CDNs cache that content at edges close to users. This lesson covers the object-storage data model, multi-part upload, storage classes, presigned URLs, and how a CDN turns a globally slow origin into a globally fast experience. By the end you can design the media layer for any social, video, or e-commerce system.

blob-storage
object-storage
cdn
content-delivery-network
s3
caching
system-design
intermediate

698

20

Medium
System Design

Caching Fundamentals (Write-Through, Write-Back, Write-Around)

A cache is a small, fast store that holds copies of data so the next request does not pay the cost of fetching it from the source of truth. This lesson covers what a cache is, where it lives in a stack, the four read and write patterns you will be asked about (cache-aside, read-through, write-through, write-back, write-around), eviction policies, and the failure modes (stampedes, hot keys, stale data) that bite real systems. By the end you can pick a caching strategy and defend it in an interview.

caching
cache-aside
write-through
write-back
write-around
lru
ttl
performance
system-design
beginner

802

11

Easy
System Design

Distributed Caching (Redis, Memcached)

A single-node cache eventually runs out of RAM, CPU, or network. Distributed caching spreads keys across many nodes so total capacity and throughput scale horizontally. This lesson covers how Redis and Memcached partition data, replicate it for availability, fail over when nodes die, and how to choose between them. By the end you can design a multi-node cache layer for a real workload, defend the topology in an interview, and recognize the bug class behind 'why is one cache node maxed at 100% CPU while the others are idle?'.

caching
redis
memcached
consistent-hashing
distributed-systems
replication
failover
system-design
intermediate

806

6

Medium
System Design

Cache Invalidation Strategies & Consistency

There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors. This lesson tackles the first one. We cover TTL-based, write-driven, and event-driven invalidation; the canonical race conditions (lost-update, double-write inconsistency, stale-after-failover); the consistency models a cache can offer; and the patterns that real systems (Facebook, Stripe, AWS) use to keep cached data trustworthy. By the end you can pick an invalidation strategy, defend it under interviewer pressure, and explain exactly why your cache will not silently serve yesterday's data.

caching
cache-invalidation
consistency
ttl
distributed-systems
race-conditions
system-design
intermediate
premium

578

12

Medium
System Design

Design a URL Shortener (TinyURL)

Design a URL shortening service like TinyURL or bit.ly that maps a long URL to a 7 character code, redirects clicks in under 50 ms, and survives a 100:1 read-to-write ratio. This lesson walks through capacity estimation, the choice between counter based and hash based key generation, the database split between a key store and an analytics store, and the caching strategy that lets a single mid-tier service handle 10K redirects per second on commodity hardware.

design-tinyurl
url-shortener
case-study
social-content-platforms
base62-encoding
read-heavy
consistent-hashing
caching
cdn
system-design
beginner
free

690

4

Easy