Replication · Multiple choice

Related reads share an id, and hash(id) % N over the replicas picks the same replica for all of them. One replica goes down. How should the pick change so that other ids keep their replica?

hard Consistency

Options

Why

Taking the modulo over only the live replicas changes N, which moves almost every id to a different, possibly further-behind replica, breaking monotonic reads for ids that had nothing to do with the failure. Hashing over the full configured list and re-picking only for the ids whose replica is down moves those ids alone. Shopify fixed exactly this in its ProxySQL fork.

Review this in your daily deck All cards in Replication