Skip to content
StackDecode
System Design
7. Caching ArchitectureAnimated

Cache Warming

Pre-loading the cache before traffic arrives.

The idea

After a deploy or restart the cache is cold. Warming fills it with known hot data.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

RequestL1 in-processL2 RedisDatabase
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Check the in-process cache: nanoseconds.

step:
1/4
at:
Request
1/10

The green dot is a request moving through the system.

Step by step

  1. 1Identify hot keys
  2. 2Load them before opening traffic
  3. 3Verify hit rate
  4. 4Shift traffic gradually

Where it is used

Launches and restarts.

Watch out for

Warming the wrong data wastes memory.

Related