How systems scale, from one server to many
How Systems Are Built
π»CLIENT
ClientβοΈLB
Load BalancerβοΈAPI
API ServerβοΈAPI
API Server 2β‘CACHEnew
CacheποΈDB
Databaseπ¬QUEUE
Message QueueStep 3 of 4
Step 3: Adding a Cache
Why
The Database becomes the bottleneck for read-heavy workloads. Reading the same data from disk for every request wastes CPU cycles and adds latency.
What it does
API Servers check the Cache (like Redis) before hitting the DB. If found (cache hit), return instantly. If not (cache miss), read from DB and store in Cache.
Impact
99% cache-hit rate converts 10,000 DB reads into 100. Reduces DB load dramatically, cuts read latency from ~40ms to <5ms, and doubles effective capacity.
Try it in Library β
Cache
