DoorDash·Software Engineer·Technical Phone Screen
- You're given a buggy round-robin request distributor. Find and fix the bugs, including an off-by-one error in the index, a local vs instance variable mix-up, and missing wrap-around logic.
- Replace the round-robin distributor with consistent hashing. Implement the hash ring, add virtual nodes, and write the key-to-server lookup.
- When would you choose consistent hashing over round-robin, and why?
“The local vs instance variable thing tripped me up longer than it should have.”