7 Comments
User's avatar
Fearless Donkey's avatar

May I get a more concrete example of how the Thundering Herds issue could happens? In what circumstance will a value cache miss trigger multiple requests to update it?

Expand full comment
Deepa's avatar

If there are 1000 clients looking for the same value at the same time and has a cache miss, then all these 1000 requests would hit the database, increasing the traffic. With the leasing, the memcache server sees, that this particular key is being fetched by a client, so they ask the other clients to retry the request after a set time, instead of hitting the database. Which would prevent the thundering herd problem.

Expand full comment
Fearless Donkey's avatar

Thank you for the great example! It is clear to me now!

Expand full comment
Piyush Thacker's avatar

Superb explanation and lots of valuable insights. Thank you sharing 😍

Expand full comment
Adil Khan's avatar

This was a great read. Thank you!

Expand full comment
seonbn's avatar

Thank you sharing. Very fun to read and easy to understand. Would you mind if i translate this article to korean? I want to share this article to my korean teammates.

Expand full comment
Scooby's avatar

What a great read. Thanks for the through breakdown.

Expand full comment