System Design · LinkedIn · Medium
Assume you already have a multiset that supports random selection on a single node. Describe how to extend that design so it operates across many servers. The multi-server version must keep the same logical operations: insert(val) — store another occurrence of val. remove(val) — delete one occurrence of val. getRandom() — return a value chosen uniformly among all occurrences currently stored. Your explanation must cover: how calls are routed to the node that can handle the…
Checking your access…