# consistent hashing

A computing technique whose use can result in load imbalance in distributed storage systems.

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

## Load Balancing Starts Before the Load Balancer: Routing Patterns for Distributed Systems

DevFeed: [Load Balancing Starts Before the Load Balancer: Routing Patterns for Distributed Systems](<https://devfeed.tech/articles/load-balancing-starts-before-the-load-balancer-routing-patterns-for-distributed-systems-121760.md>)

Original publisher: [Read original article](<https://hackernoon.com/load-balancing-starts-before-the-load-balancer-routing-patterns-for-distributed-systems?source=rss>)

Author: Varsha Ganesh

Published: 2026-11-06T22:19:26Z

Content type: article

Language: en

Sources: [HackerNoon](<https://devfeed.tech/sources/hackernoon.md>)

Topics: [Load Balancing](<https://devfeed.tech/topics/load-balancing.md>), [consistent hashing](<https://devfeed.tech/topics/consistent-hashing.md>), [stream-processing](<https://devfeed.tech/topics/stream-processing.md>), [Apache Flink](<https://devfeed.tech/topics/apache-flink.md>), [Memcached](<https://devfeed.tech/topics/memcached.md>), [nginx](<https://devfeed.tech/topics/nginx.md>), [IP routing](<https://devfeed.tech/topics/ip-routing.md>)

Tags: [cache](<https://devfeed.tech/tags/cache.md>), [capacity-planning](<https://devfeed.tech/tags/capacity-planning.md>), [cassandra](<https://devfeed.tech/tags/cassandra.md>), [consistent-hashing](<https://devfeed.tech/tags/consistent-hashing.md>), [control-plane](<https://devfeed.tech/tags/control-plane.md>), [databases](<https://devfeed.tech/tags/databases.md>), [distributed-database](<https://devfeed.tech/tags/distributed-database.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [load-balancers](<https://devfeed.tech/tags/load-balancers.md>), [load-balancing](<https://devfeed.tech/tags/load-balancing.md>), [partitions](<https://devfeed.tech/tags/partitions.md>), [routing](<https://devfeed.tech/tags/routing.md>), [routing-patterns](<https://devfeed.tech/tags/routing-patterns.md>), [stateless-services](<https://devfeed.tech/tags/stateless-services.md>), [stream](<https://devfeed.tech/tags/stream.md>), [streams](<https://devfeed.tech/tags/streams.md>)

### AI overview

For stateless services, DNS or a proxy can distribute requests among healthy interchangeable backends; DNS is coarse and health probes add cost without showing relative load. Stateful systems require routing tied to data placement, so control planes must distribute partitions across hosts while honoring replication, failure domains, and hardware capacity. That placement can still produce hot partitions when particular keys attract disproportionate traffic. The article recommends partition-level metrics, thresholds that account for normal variance, and key attribution, followed by incremental, reversible live splits with routing metadata updated during the transition. Splitting will not help if a single hot key remains the cause. For caches, consistent hashing eases shard rebalancing but not hot keys; request coalescing and local caches can absorb spikes. For Kafka or Flink, ordering ties each key to a partition, making runtime splitting constrained: partition count and key distribution require advance planning. More partitions enable consumer parallelism but increase broker recovery, rebalance, and efficiency costs, and do not solve a single hot key.

### Source excerpt

Load balancing isn't just a load balancer. Learn how routing works for databases, caches, and stream processors, and how to handle hot partitions

## Hot keys defeat consistent hashing

DevFeed: [Hot keys defeat consistent hashing](<https://devfeed.tech/articles/hot-keys-defeat-consistent-hashing-55282.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/55-hot-keys-defeat-consistent-hashing/>)

Author: hello@ankit-rana.com

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

Content type: article

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>), [Cache](<https://devfeed.tech/topics/cache.md>), [Redis](<https://devfeed.tech/topics/redis.md>)

Tags: [cache](<https://devfeed.tech/tags/cache.md>), [caching](<https://devfeed.tech/tags/caching.md>), [capacity](<https://devfeed.tech/tags/capacity.md>), [cluster](<https://devfeed.tech/tags/cluster.md>), [consistent-hashing](<https://devfeed.tech/tags/consistent-hashing.md>), [hot-keys](<https://devfeed.tech/tags/hot-keys.md>), [node](<https://devfeed.tech/tags/node.md>), [redis](<https://devfeed.tech/tags/redis.md>), [scalability](<https://devfeed.tech/tags/scalability.md>), [sharding](<https://devfeed.tech/tags/sharding.md>), [traffic](<https://devfeed.tech/tags/traffic.md>)

### AI overview

Consistent hashing can distribute keys evenly across cache nodes without distributing request traffic evenly. The article explains how hot keys overload individual Redis nodes and outlines remedies such as key replication, value sharding, and local caching.

### Source excerpt

Consistent hashing distributes keys evenly across nodes, which is a different problem from distributing traffic evenly. One key that receives forty percent of requests lands on exactly one node no matter how many virtual nodes you configure, and adding capacity does nothing because the bottleneck is a single key rather than the cluster. Fixing it requires changing the key: replicating it under several suffixes, splitting the value into shards, or putting a small local cache in front of the handful of keys that are actually hot.

## Saving another 100TB of RAM with math (and Rust)

DevFeed: [Saving another 100TB of RAM with math (and Rust)](<https://devfeed.tech/articles/saving-another-100tb-of-ram-with-math-and-rust-55131.md>)

Original publisher: [Read original article](<https://blog.cloudflare.com/saving-100-tb-of-ram-with-math/>)

Author: Ivan Babrou

Published: 2026-09-18T17:23:58Z

Content type: article

Language: en

Sources: [Cloudflare Blog](<https://devfeed.tech/sources/cloudflare-blog.md>)

Topics: [consistent hashing](<https://devfeed.tech/topics/consistent-hashing.md>), [Pingora](<https://devfeed.tech/topics/pingora.md>), [Load Balancing](<https://devfeed.tech/topics/load-balancing.md>), [Cloudflare](<https://devfeed.tech/topics/cloudflare.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [data centers](<https://devfeed.tech/topics/data-centers.md>), [Rust](<https://devfeed.tech/topics/rust.md>), [Network](<https://devfeed.tech/topics/network.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [backend](<https://devfeed.tech/tags/backend.md>), [cloudflare](<https://devfeed.tech/tags/cloudflare.md>), [consistent-hashing](<https://devfeed.tech/tags/consistent-hashing.md>), [data-center](<https://devfeed.tech/tags/data-center.md>), [deep-dive](<https://devfeed.tech/tags/deep-dive.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [hash](<https://devfeed.tech/tags/hash.md>), [input](<https://devfeed.tech/tags/input.md>), [load-balancing](<https://devfeed.tech/tags/load-balancing.md>), [network](<https://devfeed.tech/tags/network.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [pingora](<https://devfeed.tech/tags/pingora.md>), [rust](<https://devfeed.tech/tags/rust.md>), [statistics](<https://devfeed.tech/tags/statistics.md>)

### AI overview

Cloudflare describes how small changes to the consistent-hashing algorithm used by its Pingora Backend Router significantly reduced memory usage, reclaiming more than 100 TB of RAM globally. The article explains the service, its routing use case, and the algorithm's role in distributing requests across servers.

### Source excerpt

Cloudflare's global network is immense but not limitless. As we look for small ways to trim our resource usage, we sometimes get lucky and we can cut significantly more. Here's how we reduced one of our Pingora-based service's RAM usage with statistics.

## 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>), [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>), [Cache](<https://devfeed.tech/topics/cache.md>), [sharding](<https://devfeed.tech/topics/sharding.md>), [Scalability](<https://devfeed.tech/topics/scalability.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>), [Algorithms](<https://devfeed.tech/topics/algorithms.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

## 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](<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>), [Scalability](<https://devfeed.tech/topics/scalability.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...

## Balls Into Bins In Distributed Systems

DevFeed: [Balls Into Bins In Distributed Systems](<https://devfeed.tech/articles/balls-into-bins-in-distributed-systems-12481.md>)

Original publisher: [Read original article](<http://brooker.co.za/blog/2018/01/01/balls-into-bins.html>)

Author: Marc Brooker

Published: 2018-01-01T00:00:00Z

Content type: article

Language: en

Sources: [Marc Brooker's](<https://devfeed.tech/sources/marc-brooker-s-blog.md>)

Topics: [Load Balancing](<https://devfeed.tech/topics/load-balancing.md>), [distributed algorithm](<https://devfeed.tech/topics/distributed-algorithm.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [least connections](<https://devfeed.tech/topics/least-connections.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [consistent hashing](<https://devfeed.tech/topics/consistent-hashing.md>), [Apache Cassandra](<https://devfeed.tech/topics/cassandra.md>)

Tags: [consistent-hashing](<https://devfeed.tech/tags/consistent-hashing.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [hash-table](<https://devfeed.tech/tags/hash-table.md>), [least-connections](<https://devfeed.tech/tags/least-connections.md>), [load-balancer](<https://devfeed.tech/tags/load-balancer.md>), [load-balancing](<https://devfeed.tech/tags/load-balancing.md>), [random](<https://devfeed.tech/tags/random.md>), [sharding](<https://devfeed.tech/tags/sharding.md>), [stateful](<https://devfeed.tech/tags/stateful.md>)

### AI overview

Random assignment can leave backends badly imbalanced when the number of requests is small relative to the number of backends, so load-sensitive balancing remains useful. The article models requests as balls and backends as bins, connecting the problem to hash tables, load balancing, and hash-based work allocation. It reviews theoretical bounds but favors simple repeated simulations in Python or R for practical planning: simulations are easier to adapt to variable request sizes, arrivals, completions, bursts, and backend scaling, while theoretical results can check that the simulation is plausible. In the reported examples, with 100 requests and 100 backends the busiest backend averages about 4.2 requests; with 1,000 requests and 100 backends, it averages 18.8 versus a mean of 10. The imbalance shrinks as requests increase, but the article concludes that random load balancing, shuffle sharding, and consistent hashing can distribute load poorly at small scale; stateful or stateless load-sensitive methods such as best-of-two remain relevant.

### Source excerpt

Balls Into Bins In Distributed Systems Throwing things can be fun. If you've come across the Balls Into Bins problem, you probably heard about in context of hash tables. When you hash things into a hash table (especially with separate chaining) it's really useful to be able to ask "If I throw 𝑀 balls into 𝑁 bins, what is the distribution of balls in bins?" You can see how this is fundamental to hash tables: the amortized complexity argument for hash tables depends on their being some load factor (i.e. 𝑀/𝑁) for which most bins contain a small number of items. Once this stops being true, lookup and insertion time on hash tables starts to get ugly. So from that perspective it's already clearly an important problem. Load Balancing and Work Allocation Hash tables aren't the only place that the Balls Into Bins problem is interesting. It comes up often in distributed systems, too. For one example, think about a load balancer (in this case a distributor of independent requests) sending load to some number of backends. Requests (𝑀) are balls, and the backends are bins (𝑁) and typically there are multiple requests going to each backend (𝑀 > 𝑁). If we know how to solve for the number of balls in each bin, we can understand the limits of random load balancing, or whether we need a stateful load balancing algorithm like least connections. This is an important question to ask, because sharing consistent state limits scalability, and sharing eventually-consistent state can even make load balancing decisions worse. Load balancing is much easier if it can be done statelessly. A related problem is push-based work allocation. Here, there is some co-ordinator handing out work items to a fleet of workers, and trying to have those workers do approximately equal amounts of work. One way that systems end up with this pattern is if they are using shuffle sharding or consistent hashing to distribute work items (or records). These hashing-based methods can be great for scaling, and so are wid