API Design · Senior · Question 65 of 75
How can you replace a legacy API with a new implementation without a big-bang switch?
- 1Ask all clients to migrate before writing the new API
- ✓Correct answer: Strangler fig: put a routing layer in front, move endpoints to the new service one by one, compare responses, and retire the old ones gradually
- 3Turn off the old API and launch the new one the same day
Explanation
Shadowing traffic to the new implementation and diffing responses builds confidence before switching each route.