SYSTEM-DESIGN
    advanced

    Consistent Hashing

    Software Engineer path · lesson 77 of 99

    Consistent Hashing Ring

    Load Balancing
    3 Servers
    6 Keys
    Server D position:
    Watch how keys redistribute when servers change
    Total Keys
    6
    in system
    Keys Moved
    0
    during scaling
    Rebalance %
    0%
    vs 100% traditional
    Stable Keys
    6
    unchanged
    0°
    90°
    180°
    270°
    Hash Ring
    360° Space
    Server A0°
    Server B120°
    Server C240°
    K1
    → B
    K2
    → B
    K3
    → C
    K4
    → C
    K5
    → A
    K6
    → A
    Server A(2 keys)
    Server B(2 keys)
    Server C(2 keys)
    ServerPositionAssigned KeysLoad
    Server A
    0°K5, K6
    33%
    Server B
    120°K1, K2
    33%
    Server C
    240°K3, K4
    33%

    Find a key’s server

    Sequence

    Order how a consistent-hash ring places and looks up a key.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    1. 1Drop a step here
    2. 2Drop a step here
    3. 3Drop a step here
    4. 4Drop a step here
    5. 5Drop a step here
    5 pieces left to place

    Test your knowledge

    21 questions
    Question 1 of 21
    Score: 0

    In a Consistent Hashing ring, what happens to the keys stored on Server C if a new Server D is placed between Server B and Server C?

    Interview Questions

    Amazon
    Discord
    Netflix
    Amazon
    Uber
    Meta
    Discord
    Cloudflare
    Stripe

    Love this visualization?

    Sign up to track your progress, earn achievements, use the AI assistant, and access your personal learning dashboard.

    100% free • No credit card required