Build Resilient Aggregation and Debug Routing
DoorDashSoftware Engineer · OnsiteLast updated
This question evaluates skills in building resilient API aggregation, fault-tolerant retry handling and test coverage for transient failures, as well as debugging and improving load-balancer routing policies including adding round-robin distribution and reasoning about consistent hashing.
This onsite combined two software-engineering exercises:
- Implement a service method that calls multiple mock downstream APIs, merges their responses into one nested result, handles transient failures, and optionally retries failed calls. You should also write tests for the success case, a single transient failure, and repeated failures, and verify the full expected nested output.
- Given an existing load balancer implementation with multiple bugs, identify and fix the issues, then improve the routing policy by adding round-robin request distribution. Finally, discuss how you would extend the design to support consistent hashing for better key affinity and less remapping when servers are added or removed.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.