---
title: "Adding One Server Should Be Boring. In Most Candidates’ Designs, It Quietly Wipes the Entire Cache."
url: https://daily.dev/posts/adding-one-server-should-be-boring-in-most-candidates-designs-it-quietly-wipes-the-entire-cache--0dutnpvg3
source_url: https://blog.devgenius.io/adding-one-server-should-be-boring-in-most-candidates-designs-it-quietly-wipes-the-entire-cache-f40ecae14639
type: article
source: "Dev Genius"
published: 2026-08-11T18:51:38.589Z
updated: 2026-08-11T18:52:10.356Z
tags: ["career", "distributed-systems"]
reading_time: 10
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding One Server Should Be Boring. In Most Candidates’ Designs, It Quietly Wipes the Entire Cache.

**[Dev Genius](https://daily.dev/sources/devgenius)** · 10 min read · 0 upvotes · 0 comments

## Summary

Modulo-based cache key routing is a common and initially correct answer to distributing cached data across servers, but it contains a critical flaw: adding or removing even one server reshuffles nearly every key's assignment, causing a cache-miss storm that floods the database. Consistent hashing solves this by placing both keys and servers on a ring, so only a small fraction of keys move when the server count changes. The post also covers virtual nodes for load balance and replication for availability, and frames the core lesson as designing for routine operational changes — not just the static steady state.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.devgenius.io/adding-one-server-should-be-boring-in-most-candidates-designs-it-quietly-wipes-the-entire-cache-f40ecae14639>

## Questions this post answers

### Why does adding a server to a cache cluster cause a cache miss storm with modulo-based routing?

With modulo routing, each key is assigned to a server by computing hash(key) % server_count. Changing server_count by even one causes nearly every key to map to a different server than the one holding its data. The result is a near-total cache invalidation: almost all lookups miss, traffic falls through to the database, and a routine capacity increase can trigger a full outage.

_Engineers scaling distributed caches track patterns like this on daily.dev before the capacity change hits production._

### How does consistent hashing prevent cache invalidation when adding or removing a server?

Consistent hashing places both servers and keys on a hash ring. Each key is owned by the nearest server clockwise from its position. When a server is added, only the keys in the arc between it and its predecessor move — every other key is undisturbed. When a server is removed, only its keys migrate to the next server clockwise. The cache stays warm for the vast majority of keys.

_Distributed systems engineers choosing between routing strategies find the trade-offs covered on daily.dev._

### What are virtual nodes in consistent hashing and why are they needed?

Virtual nodes place each physical server at multiple positions on the hash ring rather than one. Without them, random single-position placement creates uneven arc sizes, causing some servers to own much larger key slices and become overloaded. Multiple positions per server statistically even out the load distribution across all nodes.

_Developers implementing consistent hashing in production find edge cases like arc imbalance discussed on daily.dev._

## Similar posts on daily.dev

- [Consistent Hashing in a Nutshell](https://daily.dev/posts/consistent-hashing-in-a-nutshell-pd2r4z3hs) · System Design Codex · 2 upvotes · 0 comments
- [Eli Bendersky's website](https://daily.dev/posts/eli-bendersky-s-website-05uihsz00) · Eli Bendersky · 2 upvotes · 0 comments
- [Load Balancing and Scaling LLM Serving](https://daily.dev/posts/load-balancing-and-scaling-llm-serving-dclfpxlwi) · DigitalOcean · 2 upvotes · 0 comments

---

Tags: [#career](https://daily.dev/tags/career), [#distributed-systems](https://daily.dev/tags/distributed-systems)

[View this post on daily.dev](https://daily.dev/posts/adding-one-server-should-be-boring-in-most-candidates-designs-it-quietly-wipes-the-entire-cache--0dutnpvg3)
