O'Reilly logo

Instant Effective Caching with Ehcache by Daniel Wind

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Datasource read overloading (Intermediate)

In this recipe, we will cover the following topics:

  • What the thundering herd problem is
  • Avoiding read overloading with multithreaded blocking cache

We will examine how to implement a technique known as blocking cache to avoid the typical thundering herd problem. We will base our efforts by re-using Ehcache's already-provided constructs. We will also demonstrate how to use them with a simple program (included in the source code bundle for this book).

Getting ready

Datasource read overloading (also known as thundering herd) happens when a cached element is requested simultaneously and that element is no longer available in the cache (a cache miss), perhaps because it was evicted, or it was cleared due to some ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required