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 ...

Get Instant Effective Caching with Ehcache now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.