Node.js · Senior · Question 74 of 75
How do you deploy a new version of a Node.js API without dropping requests?
- 1Stop all instances, then start the new version
- ✓Correct answer: Rolling update: start new instances, route traffic only after readiness checks pass, then drain old instances with graceful shutdown
- 3Restart the process with
kill -9and rely on client retries
Explanation
Database migrations must be backward compatible during the rollout, since old and new code run at the same time (expand, then contract).