Consistent hashing in under 60s
3-Second Blueprint (English)
- Routing keys via hash(id) mod N breaks when scaling databases because changing N remaps and reshuffles nearly all stored data.
- Consistent hashing wraps the hash output space onto a circle and maps both database servers and user IDs onto points on the ring.
- Walking clockwise to the nearest server ensures adding a node only migrates keys between it and the preceding node on the ring.
Consistent HashingHash Ring TopologyModulo Reshuffling ProblemClockwise Node LookupHorizontal Database Scaling
3-Sekunden-Fazit (Deutsch)
- Einfaches Modulo-Hashing (hash mod N) scheitert beim Skalieren, da ein neuer Server fast alle Datensätze neu zuordnet.
- Consistent Hashing legt den Wertebereich der Hashfunktion als geschlossenen Ring an und platziert Server sowie IDs darauf.
- Die Suche im Uhrzeigersinn zum nächsten Server bewirkt, dass neue Knoten nur Schlüssel zum direkten Vorgänger übernehmen.
Consistent HashingHash-Ring-TopologieModulo-UmverteilungsproblemUhrzeigersinn-RoutingHorizontale DB-Skalierung
Note / Hinweis: Blueprints are AI-generated educational summaries (0% Politics · 0% Religion · 0% Brainrot) and do not constitute medical, legal, or financial advice. / KI-generierte Zusammenfassung zu Bildungszwecken – ersetzt keine medizinische, rechtliche oder finanzielle Fachberatung.