When I deploy a new version of my service to Heroku, what happens exactly?
Suppose I have N web dynos online right now, M of them currently servicing requests.
- Do all of them shut down before the new version starts coming online? What happens to any pending requests currently being serviced?
- Is there downtime? (let's assume I just have a stateless service without any migrations)
- Is there a hook for doing custom migrations (e.g. migrate database tables)?
- Can I bring up N servers running the new version, have them start servicing requests, and bring the previous N servers down only once they're not servicing any requests?
- Does the answer depend on the stack/language? (Aspen/Bamboo/Cedar, Ruby/Node.js/Java/...)
I didn't any official documentation about this, just contrary posts (some saying hot migrations are not possible, while others say there is no downtime). Are there any official details about the deployment process and the questions above?