Cache Warming & Monitoring 00:00:01 Open the doors with empty shelves A shop usually serves ninety-five percent of reads from cache. A replacement starts entirely empty just before opening. A database tuned for normal misses faces a different workload now. 95% hits. The database gets 5% of the reads and is at 20% of what it can do. It is empty, and the same users are still there. 20 times the normal reads arrive. At 400% of its limit it slows down or fails, so the cache fills slowly. Limit the traffic until the hit rate grows, then open up. It works, and users wait. Gradual admission can protect the database even if early shoppers wait. Set a measurable readiness condition using origin pressure and customer latency, not elapsed warming time alone. 00:00:49 Load the first shelves in advance The new cache has a list of previously hot keys. Warm them intentionally before moving all shoppers. Every preload consumes the same origin capacity needed by real customers. The new cache is empty. The job reads its list of hot keys. 100 keys, a pause, the next 100. The database barely notices. The job notes it and goes on. One bad row must not stop the start. Now the application reports ready and gets a little traffic. The hit rate is 93%. The numbers hold, so the rest of the users follow. Limit the preload rate and verify the values can still be used when traffic arrives. Warming an expired or unauthorized entry is not a readiness improvement. 00:01:34 Refresh while a good copy still exists A regularly read key has a long lifetime. Rebuild it before its hard deadline so a new shopper does not have to perform the entire load synchronously. The value has 60 minutes to live, and users read it. At 48 minutes, 12 are left. The background task loads a fresh value while users still get the current one. A minute later the key has 59 minutes again, and the same happens after another 48. Make refresh ownership clear. Multiple workers independently noticing the same nearing deadline can recreate the very burst that warming was supposed to avoid. 00:02:10 Four keys generate most requests The shop records a strongly skewed demand distribution. Compare the marginal benefit of preloading the next hot product with loading hundreds of almost-never-requested products. Four keys are read very often. About 900 others share the rest. The first two already cover 65%. Four keys reach 95%. The other 900 would add 5% for far more work. Use observed coverage, service cost and freshness to choose a warming budget. A tiny hot set can be more valuable than an indiscriminate copy of the database. 00:02:45 Rehearse the opening sale Start with a controlled share of sale traffic and check what happens to the database as the new cache fills. Only then allow the rest of the waiting customers through. The sale's product pages and the hottest keys are loaded slowly. 5% of users read from the new cache. The hit rate is 90%, good enough to go on. Three times the usual traffic. At 96% hits the database is at 48%. Rehearse cold-start and rollback conditions on the same workload. The shop's opening promise depends on warm coverage and sustainable refill throughput at the same moment.