How a cache stampede possibly cause problems

  • Normal Operation: Facebook, like many large-scale net services, uses caching drastically to improve overall performance.
  • Frequently accessed records are saved in a cache, reducing the need to retrieve them from the database whenever.
  • Cache Expiration or Invalidation: Due to everyday cache expiration or invalidation regulations, positive cached gadgets want to be refreshed or recomputed.
  • Cache Stampede Trigger: When a famous object’s cache expires, more than one person requests simultaneously to try to get admission to the useful resource.
  • Resource Intensive Recomputation: The technique of recomputing or regenerating the content for the cache can be aid-extensive, especially for popular items that many users are looking to get admission to simultaneously.
  • Increased Load on Resources: The surprising surge in requests for the identical resource can overload the backend systems, inclusive of databases or computation assets.
  • Service Degradation or Outage: The extended load and aid contention can result in service degradation or, in intense cases, a service outage.

How a Cache Stampede Caused One of Facebook’s Biggest Outages

On September 23, 2010, Facebook experienced one of its most severe outages to date, affecting hundreds of thousands of users internationally. The website online remained inaccessible for over 4 hours, causing extensive disruption and frustration.

The root reason for the outage changed into a cache stampede, a phenomena that happens when a large number of users try to access a cached resource at the same time, overloading the information supply and causing a series of failure.

Table of Content

  • How a cache stampede possibly cause problems
  • What happened in the case of Facebook?

A cache stampede, also known as cache thrashing or dog-piling, occurs when a massive range of requests try, and get entry to a specific resource that isn’t present inside the cache. This usually takes place when the cached object expires or is invalidated, and multiple requests attempt to repopulate the cache concurrently.

Similar Reads

How a cache stampede possibly cause problems

Normal Operation: Facebook, like many large-scale net services, uses caching drastically to improve overall performance. Frequently accessed records are saved in a cache, reducing the need to retrieve them from the database whenever. Cache Expiration or Invalidation: Due to everyday cache expiration or invalidation regulations, positive cached gadgets want to be refreshed or recomputed. Cache Stampede Trigger: When a famous object’s cache expires, more than one person requests simultaneously to try to get admission to the useful resource. Resource Intensive Recomputation: The technique of recomputing or regenerating the content for the cache can be aid-extensive, especially for popular items that many users are looking to get admission to simultaneously. Increased Load on Resources: The surprising surge in requests for the identical resource can overload the backend systems, inclusive of databases or computation assets. Service Degradation or Outage: The extended load and aid contention can result in service degradation or, in intense cases, a service outage....

What happened in the case of Facebook?

In the case of facebook, there was a problem because someone made a mistake in how things were set up. This mistake caused a lot of stored information i.e cache to become useless all at once, and many people tried to get the new information from the main server all at the same time. The main server couldn’t handle so many requests at once, and it crashed, causing the whole system to stop working....