Level 3 of 13 · about 1 week
Caching and speed
Making reads fast and cheap, and the bugs caches bring.
Modules
Core: everyone needs it. Common: most jobs use it. Specialist: optional depth, safe to skip on a first read.
1
Why caching works
Locality, hit ratio and the latency numbers that make a cache pay off
Core 7 parts · about 3 hours
2
Cache patterns
Cache-aside, read-through, write-through, write-back and write-around, and what each does on a read and a write
Core 6 parts · about 3 hours
3
Eviction and expiry
LRU, LFU and friends, time to live, and how to set memory limits
Core 6 parts · about 3 hours
4
Cache problems
Stampede, penetration, avalanche, hot keys, stale data and poisoning, with a fix for each
Core 8 parts · about 3 hours
5
In-process and distributed caches
Where the cache runs, what Redis and Memcached are for, how to size and spread a cache, and what to do when it fails
Core 7 parts · about 3 hours
6
Caching layers end to end
Browser, CDN, reverse proxy, application cache and database: what each layer saves, and how stale the total can get
Common 7 parts · about 3 hours