Get the latest tech news

Thundering herd problem: Preventing the stampede


Couple of years back I wrote a post describing the thundering herd problem. Now that I look back, I had very cursory knowledge about the problem.

This means if your application starts experiencing lookup patterns that comprises of multiple such hot keys, your original solution of using a cache to decrease load on database no longer works. We have a simple backend application built using Spring Boot that uses a Postgres database to store records & Redis to cache the values. This way we avoid the network call to acquire the lock & also to double check the cache to prevent race condition.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of stampede

stampede

Photo of herd problem

herd problem

Related news:

News photo

What we’re listening to: I Dreamt I Found a Red Ruby, Stampede and more