System Design Part 4 Distributed data

Consistent Hashing: Moving Only 1/N When Nodes Change, Virtual Nodes, Rendezvous Hashing, and Deliberately Chosen Keys

Bill.Lin 20 min read

System Design series Part 4-3 | Previous: Sharding | Next: Distributed IDs | Series map

Read first: Part 2-3 Caching in Depth, Part 4-2 Sharding.

Scenario and problem

The cache for the talk detail pages lives on 10 independent Redis servers (not Redis Cluster), and the application uses hash(key) % 10 to decide which server each key goes to. At peak there are 50,000 reads a second with a 98% hit ratio, so the database only takes 1,000 queries a second.

One day one of the servers fails. Operations removes it from the list, and the formula becomes hash(key) % 9. Within the next few seconds, database queries shoot past 40,000 a second, and then the whole database goes down.

A second scenario: the platform has 1,000 business tenants, and each tenant needs a report aggregation run every 10 minutes. The application has 3 instances. Each tenant must be handled by exactly one instance, and when instances are added or removed, the tenants that are already assigned should change as little as possible.

Lose one Redis, lose the database1 / 4
Lose one Redis, lose the database10 RedisApplicationDatabase1,000 tenants3 instancesApplication10 RedisDatabase50k reads/s1,000 QPShash(key) % 1010 RedisApplication% 9: 90% of keys movealmost all missApplicationDatabase40k+ QPSGoes down1,000 tenants3 instancesevery 10 minOne owner per tenantFew moves when scaling
  1. Normally: 98% hit ratioThe cache for the talk detail pages is spread over 10 independent Redis servers, and hash(key) % 10 decides which server each key goes to. At peak there are 50,000 reads a second with a 98% hit ratio, so the database only takes 1,000 queries a second.
  2. One fails, switch to % 9One of them fails, and once it is removed from the list the formula becomes hash(key) % 9. The remainders after dividing by 10 and by 9 are mostly different, so about 90% of the keys move to another server, which is the same as all of them expiring at once.
  3. The database goes downEvery request that misses floods the database. Within seconds it shoots past 40,000 queries a second, and then the whole database goes down.
  4. Another scenario: assigning tenants1,000 business tenants each need their reports aggregated every 10 minutes. 3 instances share the work, and each tenant is handled by exactly one of them; when instances are added or removed, the tenants already assigned should ideally stay where they are.

The simplest approach and its limits

hash(key) % N spreads keys very evenly; the problem comes when N changes. For most keys, the hash modulo 10 and the hash modulo 9 are different. In the measurements in the Sharding post, going from 16 servers to 17 moved 94% of the data. For a cache, “moving” means a cache miss: one server fails, 90% of the keys are invalidated at the same time, and that is exactly the cache avalanche from the Caching post.

What we want: when a node is added or removed, only 1/N of the keys need to change nodes.

Core mechanism

Hash ring

Join the two ends of the hash value range and think of it as a ring:

  1. Each node gets a hash value computed from its name and is placed at the matching position on the ring
  2. Each key gets a hash value too; the first node found going clockwise from its position is its owner
  3. When a new node joins, only the keys “between the new node and the previous node counterclockwise from it” move to the new node; every other key stays exactly where it is
  4. When a node is removed, only the keys it owned move to the next node clockwise

Virtual nodes

With only 10 points cutting the ring into 10 arcs, the arcs differ a lot in length, and so does the load. The fix is to have every physical node appear on the ring many times, as virtual nodes: each node computes 100 positions from cache-3#0, cache-3#1, and so on, the ring is cut into 1,000 small arcs, and the total length each node gets comes close to the average.

Virtual nodes bring two more benefits:

  • When a node is removed, its load is spread over all the remaining nodes: with only one point per node, all its keys go to the next node clockwise, whose load instantly doubles; that node may well go down next, and you get a cascading failure
  • Weights: when machines differ in size, make the number of virtual nodes proportional to capacity: 200 for a large machine, 100 for a small one

Measured: load balance and keys moved

10 nodes, 1 million keys, with Guava’s murmur3 as the hash function:

Hash ring implementation (ConsistentHashRing.java)
java
package ring;

import com.google.common.hash.HashFunction;
import java.nio.charset.StandardCharsets;
import java.util.Map;
import java.util.NavigableMap;
import java.util.TreeMap;

/** Immutable hash ring: when membership changes, build a new ring and swap it in whole, so readers need no locks. */
public final class ConsistentHashRing {

    private final NavigableMap<Long, String> ring;
    private final HashFunction hash;

    private ConsistentHashRing(NavigableMap<Long, String> ring, HashFunction hash) {
        this.ring = ring;
        this.hash = hash;
    }

    /** The values of vnodesByNode are each node's number of virtual nodes on the ring, which is its weight. */
    public static ConsistentHashRing of(Map<String, Integer> vnodesByNode, HashFunction hash) {
        NavigableMap<Long, String> ring = new TreeMap<>();
        vnodesByNode.forEach((node, vnodes) -> {
            for (int i = 0; i < vnodes; i++) {
                ring.put(position(hash, node + "#" + i), node);
            }
        });
        return new ConsistentHashRing(ring, hash);
    }

    /** The first virtual node clockwise from the key's position; past the last one, wrap around to the start. */
    public String nodeFor(String key) {
        Map.Entry<Long, String> entry = ring.ceilingEntry(position(hash, key));
        return (entry != null ? entry : ring.firstEntry()).getValue();
    }

    private static long position(HashFunction hash, String value) {
        return hash.hashString(value, StandardCharsets.UTF_8).asLong();
    }
}
Rendezvous hashing implementation (Rendezvous.java)
java
package ring;

import com.google.common.hash.HashFunction;
import java.nio.charset.StandardCharsets;
import java.util.Collection;
import java.util.Comparator;

/** Rendezvous hashing: compute a score for each node together with the key; the node with the highest score owns the key. No ring needed; the cost is N computations per lookup. */
public final class Rendezvous {

    private Rendezvous() {
    }

    public static String ownerOf(String key, Collection<String> nodes, HashFunction hash) {
        return nodes.stream()
                .max(Comparator.comparingLong((String node) -> hash.hashString(node + "|" + key, StandardCharsets.UTF_8).asLong())
                        .thenComparing(Comparator.naturalOrder()))
                .orElseThrow();
    }
}
Simulation (RingSimulation.java)
java
package ring;

import com.google.common.hash.HashFunction;
import com.google.common.hash.Hashing;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Function;

public class RingSimulation {

    static final HashFunction MURMUR = Hashing.murmur3_128();
    static final int KEYS = 1_000_000;

    public static void main(String[] args) {
        List<String> keys = new ArrayList<>(KEYS);
        for (int i = 0; i < KEYS; i++) {
            keys.add("lecture:" + i);
        }
        List<String> ten = nodes(10);
        List<String> eleven = nodes(11);

        System.out.println("10 nodes, 1 million keys:");
        for (int vnodes : new int[] {1, 10, 100, 1000}) {
            ConsistentHashRing ring = ConsistentHashRing.of(weights(ten, vnodes), MURMUR);
            System.out.printf("  virtual nodes per node %4d: %s%n", vnodes, balance(keys, ring::nodeFor, ten.size()));
        }

        System.out.println("\nAdding an 11th node, keys that change nodes:");
        report("hash % N", keys, k -> ten.get(mod(k, 10)), k -> eleven.get(mod(k, 11)));
        ConsistentHashRing ring10 = ConsistentHashRing.of(weights(ten, 100), MURMUR);
        ConsistentHashRing ring11 = ConsistentHashRing.of(weights(eleven, 100), MURMUR);
        report("hash ring (100 virtual nodes)", keys, ring10::nodeFor, ring11::nodeFor);
        report("rendezvous hashing", keys, k -> Rendezvous.ownerOf(k, ten, MURMUR), k -> Rendezvous.ownerOf(k, eleven, MURMUR));
        report("Guava consistentHash", keys,
                k -> ten.get(Hashing.consistentHash(MURMUR.hashString(k, StandardCharsets.UTF_8), 10)),
                k -> eleven.get(Hashing.consistentHash(MURMUR.hashString(k, StandardCharsets.UTF_8), 11)));

        System.out.println("\nAfter removing cache-3, the heaviest node's load as a multiple of the average:");
        List<String> nine = new ArrayList<>(ten);
        nine.remove("cache-3");
        for (int vnodes : new int[] {1, 100}) {
            ConsistentHashRing before = ConsistentHashRing.of(weights(ten, vnodes), MURMUR);
            ConsistentHashRing after = ConsistentHashRing.of(weights(nine, vnodes), MURMUR);
            Map<String, Integer> receivers = new HashMap<>();
            for (String key : keys) {
                if (before.nodeFor(key).equals("cache-3")) {
                    receivers.merge(after.nodeFor(key), 1, Integer::sum);
                }
            }
            System.out.printf("  virtual nodes per node %3d: cache-3's keys go to %d node(s) | %s%n",
                    vnodes, receivers.size(), balance(keys, after::nodeFor, nine.size()));
        }
    }

    static String balance(List<String> keys, Function<String, String> router, int nodes) {
        Map<String, Integer> load = new HashMap<>();
        keys.forEach(k -> load.merge(router.apply(k), 1, Integer::sum));
        double avg = (double) keys.size() / nodes;
        int max = load.values().stream().mapToInt(Integer::intValue).max().orElseThrow();
        int min = load.size() < nodes ? 0 : load.values().stream().mapToInt(Integer::intValue).min().orElseThrow();
        return String.format("heaviest %.2fx, lightest %.2fx", max / avg, min / avg);
    }

    static void report(String label, List<String> keys, Function<String, String> before, Function<String, String> after) {
        long moved = keys.stream().filter(k -> !before.apply(k).equals(after.apply(k))).count();
        System.out.printf("  %5.1f%% | %s%n", 100.0 * moved / keys.size(), label);
    }

    static int mod(String key, int n) {
        return Math.floorMod(MURMUR.hashString(key, StandardCharsets.UTF_8).asLong(), n);
    }

    static List<String> nodes(int n) {
        List<String> nodes = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            nodes.add("cache-" + i);
        }
        return nodes;
    }

    static Map<String, Integer> weights(List<String> nodes, int vnodes) {
        Map<String, Integer> weights = new LinkedHashMap<>();
        nodes.forEach(node -> weights.put(node, vnodes));
        return weights;
    }
}
text
10 nodes, 1 million keys:
  virtual nodes per node    1: heaviest 3.22x, lightest 0.04x
  virtual nodes per node   10: heaviest 2.21x, lightest 0.41x
  virtual nodes per node  100: heaviest 1.18x, lightest 0.89x
  virtual nodes per node 1000: heaviest 1.06x, lightest 0.94x

Adding an 11th node, keys that change nodes:
   90.9% | hash % N
    9.2% | hash ring (100 virtual nodes)
    9.1% | rendezvous hashing
    9.1% | Guava consistentHash

After removing cache-3, the heaviest node's load as a multiple of the average:
  virtual nodes per node   1: cache-3's keys go to 1 node(s) | heaviest 2.90x, lightest 0.04x
  virtual nodes per node 100: cache-3's keys go to 9 node(s) | heaviest 1.17x, lightest 0.87x
  • Number of virtual nodes: with only 1 point per node, the heaviest node carries 3.22 times the average and the lightest only 0.04 times, nearly idle. With 100 it is 1.18 times, with 1,000 it is 1.06 times
  • Keys moved: going from 10 servers to 11, hash % N moves 90.9% of the keys; the hash ring, rendezvous hashing, and Guava’s consistentHash all move only about 9.1%, which is 1/11, the share the new node should get
  • Removing a node: with only 1 virtual node, all of cache-3’s keys go to the same node, whose load becomes 2.90 times the average; with 100 virtual nodes, those keys are spread over the remaining 9 nodes, and the heaviest is still only 1.17 times

Other algorithms

  • Rendezvous hashing (highest random weight): compute a score for each node together with the key; the node with the highest score owns the key. It needs no ring and no virtual nodes, the distribution is even by nature, and removing any node affects only that node’s own keys. The cost is N computations per lookup, which is a good fit when there are at most a few dozen nodes
  • Guava Hashing.consistentHash: takes a hash value and a number of buckets and returns a bucket from 0 to N−1, using no memory at all. The limitation is that buckets can only be removed from the end: remove alpha from [alpha, bravo, charlie], and it has no way to express “alpha is gone”; instead, alpha’s traffic goes to bravo and bravo’s goes to charlie. It suits shards with fixed numbers that only grow or shrink in order, not nodes that can fail at random. Jump Consistent Hash, published by Lamping and Veach, has the same interface and the same limitation
  • Maglev hashing (Google): precomputes a fixed-size lookup table, so a lookup takes a single array access, and the distribution is very even too. It is common in load balancers
  • Bounded loads (consistent hashing with bounded loads): cap each node’s load at some multiple of the average, and when a node is over the cap, continue along the ring to the next node. HAProxy’s hash-balance-factor works this way, and its documentation recommends a value from 125 to 200 (1.25 to 2 times the average)

What real systems do

  • Redis Cluster does not use a hash ring: keys map to 16,384 hash slots through CRC16, and each node is responsible for some of the slots. These are the logical shards from the Sharding post, and data moves one slot at a time
  • Dynamo and Cassandra use a token ring with virtual nodes; besides being stored on the first node clockwise, each key is also replicated to the next few distinct physical nodes (skipping other virtual nodes on the same machine)
  • Load balancers: Envoy offers two policies, ring hash and Maglev, and HAProxy has hash-type consistent. They keep sending the same user or the same URL to the same backend, which raises the hit ratio of the backend’s local cache (the Load Balancing post)

Comparing options

hash % N Hash ring + virtual nodes Rendezvous Guava consistentHash Slot map
Keys moved when nodes change Nearly all About 1/N About 1/N About 1/N Only the slots you reassign
Load balance Very even Depends on the number of virtual nodes Very even Very even Set by the map
Lookup cost O(1) O(log(N × V)) O(N) O(log N) O(1)
Removing any node Possible, but nearly everything is reshuffled Possible Possible Only the last one Possible
Needs a coordinator No No No No Yes, someone has to maintain the map

When a central coordinator can maintain the map (database sharding, for example), a slot map gives the most precise control. Consistent hashing comes into its own when there is no coordinator and every client has to compute the same answer by itself (cache routing, load balancing, work assignment).

In Java

1. Cache routing

ConsistentHashRing is immutable: when the node list changes, build a new ring and swap it in whole through a volatile field or an AtomicReference, so readers need no locks. Usage:

java
Map<String, Integer> weights = Map.of("cache-0", 100, "cache-1", 100, "cache-2", 200);   // cache-2 has twice the capacity
ConsistentHashRing ring = ConsistentHashRing.of(weights, Hashing.murmur3_128());
String node = ring.nodeFor("lecture:42");

If you can switch to Redis Cluster, let its slot mechanism handle this, and you do not need to maintain a ring yourself.

2. Assigning tenant jobs: rendezvous hashing

Each instance gets the list of live instances from the service registry (Kubernetes Endpoints, for example) and works out “which tenants are mine” by itself, without talking to the others:

java
package ring;

import com.google.common.hash.HashFunction;
import com.google.common.hash.Hashing;
import java.util.List;
import java.util.Set;
import java.util.function.Supplier;

/** Each instance handles only the tenants it owns. The member list comes from the service registry and is fetched again on every scheduled run. */
public class TenantJobRunner {

    private static final HashFunction HASH = Hashing.murmur3_128();

    private final String self;
    private final Supplier<Set<String>> liveInstances;

    public TenantJobRunner(String self, Supplier<Set<String>> liveInstances) {
        this.self = self;
        this.liveInstances = liveInstances;
    }

    public List<String> ownedTenants(List<String> tenants) {
        Set<String> members = liveInstances.get();
        if (!members.contains(self)) {
            return List.of();                   // not on the list itself (just started or already removed): handle no tenants
        }
        return tenants.stream()
                .filter(tenant -> Rendezvous.ownerOf(tenant, members, HASH).equals(self))
                .toList();
    }
}

How the 1,000 tenants shift as instances are added and removed:

Verification (OwnershipDemo.java)
java
package ring;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;

public class OwnershipDemo {

    public static void main(String[] args) {
        List<String> tenants = new ArrayList<>();
        for (int i = 1; i <= 1_000; i++) {
            tenants.add("tenant-" + i);
        }
        Map<String, String> abc = assign(tenants, Set.of("app-a", "app-b", "app-c"));
        Map<String, String> ac = assign(tenants, Set.of("app-a", "app-c"));
        Map<String, String> abcd = assign(tenants, Set.of("app-a", "app-b", "app-c", "app-d"));
        System.out.println("app-a, app-b, app-c: " + counts(abc));
        System.out.println("app-b goes offline: " + counts(ac) + " | tenants changing owner: " + moves(abc, ac));
        System.out.println("app-d joins: " + counts(abcd) + " | tenants changing owner: " + moves(abc, abcd));
    }

    /** Each instance works out by itself which tenants it owns; put them together to see the assignment. */
    static Map<String, String> assign(List<String> tenants, Set<String> members) {
        Map<String, String> owner = new HashMap<>();
        for (String member : members) {
            new TenantJobRunner(member, () -> members).ownedTenants(tenants)
                    .forEach(tenant -> owner.merge(tenant, member, (a, b) -> a + "," + b));
        }
        return owner;
    }

    static Map<String, Integer> counts(Map<String, String> owner) {
        Map<String, Integer> counts = new TreeMap<>();
        owner.values().forEach(member -> counts.merge(member, 1, Integer::sum));
        return counts;
    }

    static String moves(Map<String, String> before, Map<String, String> after) {
        Map<String, Integer> moves = new TreeMap<>();
        before.forEach((tenant, from) -> {
            String to = after.get(tenant);
            if (!from.equals(to)) {
                moves.merge(from + " → " + to, 1, Integer::sum);
            }
        });
        return moves.toString();
    }
}
text
app-a, app-b, app-c: {app-a=340, app-b=307, app-c=353}
app-b goes offline: {app-a=491, app-c=509} | tenants changing owner: {app-b → app-a=151, app-b → app-c=156}
app-d joins: {app-a=250, app-b=222, app-c=277, app-d=251} | tenants changing owner: {app-a → app-d=90, app-b → app-d=85, app-c → app-d=76}
  • When app-b goes offline, only its original 307 tenants change owner, split evenly between app-a and app-c; the tenants app-a and app-c already had do not move at all
  • When app-d joins, each of the three gives up about 1/4 of its tenants to app-d, and they swap nothing among themselves

Note that the member list each instance sees is not necessarily updated at the same moment. In the first few seconds after app-b goes offline, app-a may not have seen the change yet, and during that window nobody handles app-b’s tenants. The other way round, a newly joined instance may handle a tenant at the same time as its old owner. The job itself must be safe to run more than once (idempotent), or you add a lease on top (the Distributed Locks and Fencing Tokens post).

Pitfalls and gotchas

  • Services implement the hash differently: a Java service and a Node.js service compute different nodes for the same key, so data is written to one server and read from another. Spell out the hash function, the input encoding, and how many leading bytes are taken. The HAProxy documentation also points out that multiple load balancers must use exactly the same server IDs to get the same distribution
  • Using IPs as node names: a Kubernetes Pod’s IP changes after a restart, and its position on the ring changes with it. Use stable names, such as StatefulSet Pod names
  • New nodes start empty: every one of the 1/N of keys a newly added cache node is responsible for misses. You can raise its weight (number of virtual nodes) step by step, so traffic moves over gradually
  • Nodes flapping: when health checks are too sensitive, nodes keep going in and out of the ring, and each time part of the keys move. Both removal and rejoining need a grace period
  • Expecting consistent hashing to fix hot keys: the same key always lands on the same node. Hot keys need a local cache, multiple copies, or bounded loads
  • Too few virtual nodes: in the measurements, with 10 virtual nodes per node, the heaviest node still carried 2.21 times the average

Security

  • Attackers can choose keys: when keys come from users (usernames, custom URLs, uploaded file names) and the hash function used for routing is public, an attacker can pick, on their own computer, keys that all land on the same node:

    Demo (HashFloodDemo.java)
    java
    package ring;
    
    import com.google.common.hash.HashFunction;
    import com.google.common.hash.Hashing;
    import java.security.SecureRandom;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.LinkedHashMap;
    import java.util.List;
    import java.util.Map;
    import java.util.Random;
    
    /** The attacker knows the system uses unkeyed murmur3 and knows the node names (open-source config files, error messages), and picks keys that land on the same node. */
    public class HashFloodDemo {
    
        public static void main(String[] args) {
            Map<String, Integer> vnodes = new LinkedHashMap<>();
            for (int i = 0; i < 10; i++) {
                vnodes.put("cache-" + i, 100);
            }
            ConsistentHashRing publicRing = ConsistentHashRing.of(vnodes, Hashing.murmur3_128());
    
            Random attacker = new Random(1);
            List<String> crafted = new ArrayList<>();
            long attempts = 0;
            while (crafted.size() < 10_000) {
                String key = "user:" + Long.toHexString(attacker.nextLong());
                attempts++;
                if (publicRing.nodeFor(key).equals("cache-3")) {
                    crafted.add(key);
                }
            }
            System.out.printf("The attacker tried %,d keys on their own computer and picked %,d that land on cache-3%n", attempts, crafted.size());
    
            SecureRandom secret = new SecureRandom();
            HashFunction keyed = Hashing.sipHash24(secret.nextLong(), secret.nextLong());
            ConsistentHashRing keyedRing = ConsistentHashRing.of(vnodes, keyed);
            System.out.println("Unkeyed murmur3: " + share(crafted, publicRing));
            System.out.println("SipHash with a secret key: " + share(crafted, keyedRing));
        }
    
        static String share(List<String> keys, ConsistentHashRing ring) {
            Map<String, Integer> load = new HashMap<>();
            keys.forEach(k -> load.merge(ring.nodeFor(k), 1, Integer::sum));
            int max = load.values().stream().mapToInt(Integer::intValue).max().orElseThrow();
            return String.format("cache-3 gets %.1f%%, the busiest node gets %.1f%%",
                    100.0 * load.getOrDefault("cache-3", 0) / keys.size(), 100.0 * max / keys.size());
        }
    }
    text
    The attacker tried 103,741 keys on their own computer and picked 10,000 that land on cache-3
    Unkeyed murmur3: cache-3 gets 100.0%, the busiest node gets 100.0%
    SipHash with a secret key: cache-3 gets 9.9%, the busiest node gets 13.1%

    With 10 nodes, on average 1 in every 10 keys tried lands on cache-3. The attacker tried about 100,000, and the 10,000 keys picked all land on cache-3. Switch to SipHash with a secret key, and the attacker cannot compute anything in advance: the same keys are spread evenly. This is the same kind of attack as HyperLogLog count inflation in the Bloom Filters and HyperLogLog post and hash flooding against hash tables. Note that just giving murmur3 a random seed is not enough: collisions that do not depend on the seed are known, so use a keyed function designed for this, such as SipHash. Every router must share the same key, and changing the key reshuffles the whole ring

  • Verify cluster members: in systems where nodes join the ring automatically through gossip (Cassandra, the Redis Cluster bus), a malicious node that joins without verification gets a share of the keys and the data. Nodes must authenticate each other with mTLS or another mechanism

  • Different tenants’ data on the same node: routing only decides which server holds the data; it provides no isolation. Prefix keys with the tenant, and still check permissions on reads

When to use it, and when not to

  • Use it: cache clusters that clients route to themselves, affinity routing in load balancers, assigning work among instances that are added and removed dynamically, Dynamo-style distributed storage
  • Don’t use it: when a central coordinator can maintain a slot map (usually the case for database sharding); when the number of nodes is fixed and almost never changes
  • Which one to pick: few nodes that may fail at random → rendezvous; many nodes that need weights → hash ring with virtual nodes; fixed numbering that only grows in order → Guava consistentHash; load balancers → Maglev or bounded loads

References

  • David Karger et al., “Consistent Hashing and Random Trees: Distributed Caching Protocols for Relieving Hot Spots on the World Wide Web”, STOC, 1997
  • David G. Thaler, Chinya V. Ravishankar, “Using Name-Based Mappings to Increase Hit Rates”, IEEE/ACM Transactions on Networking, 1998
  • John Lamping, Eric Veach, “A Fast, Minimal Memory, Consistent Hash Algorithm”, arXiv:1406.2294, 2014
  • Daniel E. Eisenbud et al., “Maglev: A Fast and Reliable Software Network Load Balancer”, NSDI, 2016
  • Vahab Mirrokni, Mikkel Thorup, Morteza Zadimoghaddam, “Consistent Hashing with Bounded Loads”, SODA, 2018
  • Giuseppe DeCandia et al., “Dynamo: Amazon’s Highly Available Key-value Store”, SOSP, 2007
  • Jean-Philippe Aumasson, Daniel J. Bernstein, “SipHash: a fast short-input PRF”, INDOCRYPT, 2012
  • HAProxy Configuration Manual (hash-type, hash-balance-factor): https://www.haproxy.org/download/3.3/doc/configuration.txt
  • Interactive diagrams: Dilum Sanjaya, System Design — an interactive course: https://designed-to-scale.vercel.app/

Comments