Untitled Lesson
Skill Matrix
UNLOCK NODES BY LEARNING NEW TAGS.
Why is cache warming particularly important for a newly-scaled-up instance joining a load balancer's rotation specifically DURING a traffic spike?
💻 Code Challenge | +75 XP
Implement a warmCache() deploy step that fetches the top 1000 most-accessed items based on real access frequency metrics and populates them into the cache before the instance begins accepting production traffic.
A new application replica scaled up during a traffic spike caused a brief but severe database load spike immediately after joining the load balancer's rotation, due to its completely empty local cache. Reorder the steps to fix this using coordinated warming.
Task: Reorder the blocks in logical sequence to solve the problem.
A.D.A. Interface
Adaptive Didactic Assistant

Pascual Vila
Frontend Instructor // Code Syllabus
The Error //
Allowing a newly-scaled instance to begin receiving production traffic before its cache has been warmed
// Wrong: immediately joins rotation with a completely empty cache
await registerWithLoadBalancer();
// Correct: warmed BEFORE joining the rotation
await warmCache();
await registerWithLoadBalancer();The Solution //
A completely cold cache means every single request the new instance receives misses immediately, sending the full, unmitigated request load directly to the database — particularly dangerous if the instance is scaling up specifically in response to a traffic spike, since the database faces this full miss-rate load at exactly the moment it can least absorb it.
The Error //
Attempting to warm an entire large dataset indiscriminately, rather than the specific subset that accounts for most actual traffic
// Impractical: attempts to warm everything, slow and often unnecessary
await warmAllProducts(); // millions of products, most rarely accessed
// Correct: targeted at the subset that actually matters
const topProducts = await getTopNProducts(1000); // based on real access data
await Promise.all(topProducts.map(warmProduct));The Solution //
Warming an entire large dataset is often impractical, slow, and unnecessary — using real access frequency data to identify the comparatively small subset of keys responsible for the majority of actual traffic makes warming both faster and genuinely high-impact for the traffic that matters most.