Load Testing · Middle · Question 66 of 76
How do you test a cache stampede scenario?
- 1Disable the cache permanently and then run a soak test
- 2Expire a hot key and send many requests for it at once
- 3Send one request per minute for a whole day
Show the answer
Correct answer: Expire a hot key and send many requests for it at once
Explanation
When a popular key expires, many requests may hit the DB at once. The test checks whether locking, request coalescing or stale-while-revalidate protect the DB.