# consistent hashing

Published articles for consistent hashing.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Cache stampede: how one expired key takes down the database

DevFeed: [Cache stampede: how one expired key takes down the database](<https://devfeed.tech/articles/cache-stampede-how-one-expired-key-takes-down-the-database-39600.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/48-cache-stampede-expired-key/>)

Author: hello@ankit-rana.com

Published: 2026-09-05T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [Cache](<https://devfeed.tech/topics/cache.md>), [Caching](<https://devfeed.tech/topics/caching.md>), [Database](<https://devfeed.tech/topics/database.md>), [consistent hashing](<https://devfeed.tech/topics/consistent-hashing.md>), [Redis](<https://devfeed.tech/topics/redis.md>)

Tags: [cache-stampede](<https://devfeed.tech/tags/cache-stampede.md>), [caching](<https://devfeed.tech/tags/caching.md>), [connection-pool](<https://devfeed.tech/tags/connection-pool.md>), [consistent-hashing](<https://devfeed.tech/tags/consistent-hashing.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [jitter](<https://devfeed.tech/tags/jitter.md>), [query](<https://devfeed.tech/tags/query.md>), [redis](<https://devfeed.tech/tags/redis.md>), [reliability](<https://devfeed.tech/tags/reliability.md>), [thundering-herd](<https://devfeed.tech/tags/thundering-herd.md>), [traffic](<https://devfeed.tech/tags/traffic.md>), [ttl](<https://devfeed.tech/tags/ttl.md>)

### AI overview

This article explains how a cache stampede occurs when a hot key expires and many requests simultaneously recompute the same value against the database. It recommends TTL jitter to prevent synchronized expirations and request coalescing so only one caller recomputes while others wait or serve stale data. It also discusses cache warming and consistent hashing for broader cache-failure scenarios.

### Source excerpt

A cache TTL is a scheduled simultaneous failure: every request being served from one key misses at the same instant and goes to the origin together. If the recompute takes two seconds, every request arriving during those two seconds also misses, so the pileup grows faster than it drains. Jitter on the TTL stops keys expiring in lockstep, and request coalescing so only one caller recomputes while the rest wait or serve stale is what stops a single expensive key from saturating the database.

## Scaling a distributed cache: Why consistent hashing is mandatory

DevFeed: [Scaling a distributed cache: Why consistent hashing is mandatory](<https://devfeed.tech/articles/scaling-a-distributed-cache-why-consistent-hashing-is-mandatory-39578.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/26-scaling-distributed-cache-consistent-hashing/>)

Author: hello@ankit-rana.com

Published: 2026-05-17T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [consistent hashing](<https://devfeed.tech/topics/consistent-hashing.md>), [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [Caching](<https://devfeed.tech/topics/caching.md>), [sharding](<https://devfeed.tech/topics/sharding.md>), [scaling](<https://devfeed.tech/topics/scaling.md>), [Database](<https://devfeed.tech/topics/database.md>), [Memcached](<https://devfeed.tech/topics/memcached.md>), [Redis](<https://devfeed.tech/topics/redis.md>)

Tags: [caching](<https://devfeed.tech/tags/caching.md>), [consistent-hashing](<https://devfeed.tech/tags/consistent-hashing.md>), [database](<https://devfeed.tech/tags/database.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [distributed-cache](<https://devfeed.tech/tags/distributed-cache.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [memcached](<https://devfeed.tech/tags/memcached.md>), [redis](<https://devfeed.tech/tags/redis.md>), [scaling](<https://devfeed.tech/tags/scaling.md>), [sharding](<https://devfeed.tech/tags/sharding.md>)

### AI overview

The article explains why modulo-based cache sharding can remap nearly every key when a node fails, causing a large cache miss surge and database overload. It presents consistent hashing on a fixed ring as a way to limit movement to keys assigned to the failed node, and notes that virtual nodes improve distribution across physical cache nodes.

### Source excerpt

Sharding a cache with hash(key) modulo N means the denominator changes when a node dies, remapping nearly every key. Dropping from five nodes to four invalidates about 80 percent of the cache instantly and routes that miss storm straight at the primary database. Consistent hashing maps nodes and keys onto a fixed ring so only the dead node's keys move, and virtual nodes fix the uneven distribution a handful of physical nodes would otherwise produce.

## Consistent hashing algorithm

DevFeed: [Consistent hashing algorithm](<https://devfeed.tech/articles/consistent-hashing-algorithm-33602.md>)

Original publisher: [Read original article](<https://highscalability.com/consistent-hashing-algorithm/>)

Author: NK

Published: 2023-02-22T16:39:15Z

Content type: tutorial

Language: en

Sources: [High Scalability](<https://devfeed.tech/sources/high-scalability-3.md>)

Topics: [consistent hashing](<https://devfeed.tech/topics/consistent-hashing.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [Scalability](<https://devfeed.tech/topics/scalability.md>), [Server](<https://devfeed.tech/topics/server.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [cache](<https://devfeed.tech/tags/cache.md>), [consistent-hashing](<https://devfeed.tech/tags/consistent-hashing.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [hashing](<https://devfeed.tech/tags/hashing.md>), [high-availability](<https://devfeed.tech/tags/high-availability.md>), [load-balancing](<https://devfeed.tech/tags/load-balancing.md>), [low-latency](<https://devfeed.tech/tags/low-latency.md>), [scalability](<https://devfeed.tech/tags/scalability.md>), [sharding](<https://devfeed.tech/tags/sharding.md>), [system-design](<https://devfeed.tech/tags/system-design.md>)

### AI overview

The article explains how consistent hashing places nodes and data keys on a virtual hash ring, then assigns data by traversing the ring clockwise to the next node. It discusses cache-server scaling, hotspot reduction, dynamic load, replication, availability, and latency in distributed systems.

### Source excerpt

You can subscribe to the system design newsletter to excel in system design interviews and software architecture. You can view the original article Consistent hashing explained on systemdesign.one website. How does consistent hashing work? At a high level, consistent hashing performs the following operations: The output of the hash

## Consistent hashing algorithm

DevFeed: [Consistent hashing algorithm](<https://devfeed.tech/articles/consistent-hashing-algorithm-27905.md>)

Original publisher: [Read original article](<http://highscalability.com/blog/2023/2/22/consistent-hashing-algorithm.html>)

Author: NK

Published: 2023-02-22T16:39:15Z

Content type: tutorial

Language: en

Sources: [High Scalability](<https://devfeed.tech/sources/high-scalability.md>), [High Scalability](<https://devfeed.tech/sources/high-scalability-2.md>)

Topics: [hashing](<https://devfeed.tech/topics/hashing.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [Scalability](<https://devfeed.tech/topics/scalability.md>), [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [Software](<https://devfeed.tech/topics/software.md>), [Availability](<https://devfeed.tech/topics/availability.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [availability](<https://devfeed.tech/tags/availability.md>), [cache](<https://devfeed.tech/tags/cache.md>), [consistent-hashing](<https://devfeed.tech/tags/consistent-hashing.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [hashing](<https://devfeed.tech/tags/hashing.md>), [hotspot](<https://devfeed.tech/tags/hotspot.md>), [load-balancing](<https://devfeed.tech/tags/load-balancing.md>), [low-latency](<https://devfeed.tech/tags/low-latency.md>), [scalability](<https://devfeed.tech/tags/scalability.md>), [sharding](<https://devfeed.tech/tags/sharding.md>), [software-architecture](<https://devfeed.tech/tags/software-architecture.md>)

### AI overview

A tutorial explaining consistent hashing: nodes and data keys are mapped onto a virtual hash ring, and clockwise traversal assigns data to nodes. It discusses terminology, cache-server scaling requirements, hotspot reduction, dynamic load, replication, availability, and latency.

### Source excerpt

This is a guest article by NK. You can view the original article Consistent hashing explained on systemdesign.one website. How does consistent hashing work? At a high level, consistent hashing performs the following operations: The output of the hash function is placed on a virtual ring structure (known as the hash ring) The hashed IP addresses of the nodes are used to assign a position for the nodes on the hash ring The key of a data object is hashed using the same hash function to find the position of the key on the hash ring The hash ring is traversed in the clockwise direction starting from the position of the key until a node is found The data object is stored or retrieved from the node that was found Terminology

## Deep Dive into Maglev, Google's Load Balancer

DevFeed: [Deep Dive into Maglev, Google's Load Balancer](<https://devfeed.tech/articles/deep-dive-into-maglev-google-s-load-balancer-39613.md>)

Original publisher: [Read original article](<https://www.gauravsarma.com/posts/2020-05-24_Deep-Dive-into-Maglev--Google-s-Load-Balancer-f5fa943d578c>)

Published: 2020-05-24T00:00:00Z

Content type: article

Language: en

Sources: [Gaurav Sarma's Blog](<https://devfeed.tech/sources/gaurav-sarma-s-blog.md>)

Topics: [Google](<https://devfeed.tech/topics/google.md>), [consistent hashing](<https://devfeed.tech/topics/consistent-hashing.md>), [scaling](<https://devfeed.tech/topics/scaling.md>), [Software](<https://devfeed.tech/topics/software.md>), [Availability](<https://devfeed.tech/topics/availability.md>), [Hardware](<https://devfeed.tech/topics/hardware.md>)

Tags: [consistent-hashing](<https://devfeed.tech/tags/consistent-hashing.md>), [deep-dive](<https://devfeed.tech/tags/deep-dive.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [google](<https://devfeed.tech/tags/google.md>), [hardware](<https://devfeed.tech/tags/hardware.md>), [health](<https://devfeed.tech/tags/health.md>), [load-balancer](<https://devfeed.tech/tags/load-balancer.md>), [performance](<https://devfeed.tech/tags/performance.md>), [scaling](<https://devfeed.tech/tags/scaling.md>), [software](<https://devfeed.tech/tags/software.md>)

### AI overview

This article explains Maglev, Google's software load balancer, and summarizes design choices that support operation at Google's scale. It covers commodity hardware, distributed scale-out architecture, connection-tuple routing, line-rate traffic handling, Direct Server Return, Maglev hashing, reduced cross-thread synchronization, and backend health tracking.

### Source excerpt

I recently heard about Maglev, the load balancer that Google uses in front of most of its services. I wanted to get a short gist on the matter to understand the reason why Google had to create its own load balancer and the optimizations that they took in order to actually run a load balancer at Google's scale...