Question 9 of 10Pro Only

What is a cache stampede, or thundering herd, and how do you prevent it?

Sample answer preview

A cache stampede, also called thundering herd, occurs when a popular cache entry expires and many requests arrive simultaneously. All these requests get a cache miss at the same time and query the database in parallel, potentially overwhelming it.

lockingmutexearly recomputejitterstale-while-revalidateSETNX

Unlock the full answer

Get the complete model answer, key points, common pitfalls, and access to 9+ more Backend Developer interview questions.

Upgrade to Pro

Starting at $19/month • Cancel anytime