AdvancedAbout 20 min

    Consistent Hashing

    Read the full article on Substack

    7 min read.

    Understand how distributed caches handle scaling without massive data remapping using a hash ring.

    0°90°180°270°K1K2K3K4K5K6AB120°C240°

    Each key belongs to the next server clockwise. Add server D to see which keys move.

    Check your understanding

    Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.

    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

    Quiz

    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?

    Done with this lesson?

    Sign in free to keep your progress, streak and quiz scores.

    Keep going