fivenines

Practice / target 80%

Cluster Sharding Practice

01

Why does adding a slot layer make resharding easier than direct key-to-node routing?

intro

Scenario

You are comparing a design that hashes keys directly to nodes against one that hashes keys to slots owned by nodes.

02

Which part of `user:{42}:cart` is hashed, and why does that matter for multi-key commands?

intro

Scenario

An application stores each user's cart under keys like `user:{42}:cart` and wants multi-key operations per user.

03

A client receives `MOVED 9000 node-b:6379`. What should it change locally?

applied

Scenario

Your client library sent `GET user:42` to node-a and got back a redirect naming a different node.

04

Why does Redis Cluster reject many multi-key commands across slots instead of coordinating every node?

applied

Scenario

A developer is surprised that `MSET a 1 b 2` fails in cluster mode when the two keys map to different slots.

05

How does client-side slot caching reduce cluster routing overhead?

advanced

Scenario

You are evaluating why cluster-aware client libraries keep a local slot table instead of asking the cluster where each key lives.