liveBook · Manning

Consistent hashing

Consistent hashing maps keys to a changing set of nodes or partitions while minimizing key reassignment when destinations are added or removed.

How 2 Manning books explain it

Elixir in Action, Third Edition

Consistent hashing is a key-to-node mapping technique that limits remapping when nodes are added to or removed from a distributed system.

How it is used
Reduces key remapping and data migration in distributed caches when cluster membership changes.
How deep it goes
Defines the operational benefit but stops short of implementing the hashing algorithm or migration procedure.
Examples
Uses a to-do cache that hashes list names onto sorted visible nodes before issuing a remote cache call.
What you can do after
Evaluate when a simple key-to-node mapping should give way to a more scalable, change-resistant approach.

Read how Elixir in Action, Third Edition explains consistent hashing →

Akka in Action, Second Edition

Consistent hashing is a hashing algorithm that assigns keys to a changing set of nodes while minimizing key reassignment when nodes are added or removed.

How it is used
Keeps related messages on the same routee when distributed workers must combine results reliably.
How deep it goes
Explains deterministic key-based routing and shows Akka configuration, while treating detailed router steps as internal.
Examples
Uses obfuscation, enrichment, aggregation, message identifiers, and an Akka group-router configuration.
What you can do after
Apply it via an Akka group router by defining a message-key mapping and consistent-hashing routee strategy.

Read how Akka in Action, Second Edition explains consistent hashing →

Also covered in

What to know first

Related concepts

Questions about consistent hashing

What is consistent hashing?

Consistent hashing maps keys to a changing set of nodes or partitions while minimizing key reassignment when destinations are added or removed.

Which Manning books explain consistent hashing?

Elixir in Action, Third Edition and Akka in Action, Second Edition.

What should I know before learning consistent hashing?

Manning books that teach consistent hashing usually introduce scalability first.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.