Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happens to requests during a Heroku deploy?

Does the Heroku router hold requests until the app is deployed and ready to handle them?

If a Rails or Rack app can be deployed quickly, all all requests handled by the app? Or does the Heroku router return 503 or another status code?

like image 672
B Seven Avatar asked Dec 06 '25 07:12

B Seven


1 Answers

I am under the impression that there is 30 seconds of downtime where requests will be lost. Unless request are sent to something like redis or sidekiq where they might be saved. This is why i use preboot. With preboot approximately 3 minutes after the deploy completes, HTTP requests will start routing to the new dynos and simultaneously stop routing to the old dynos.

Instead of stopping the existing set of web dynos before starting the new ones, preboot ensures that the new web dynos are started (and receive traffic) before the existing ones are terminated. This can contribute to zero downtime deployments.

like image 56
Joel Avatar answered Dec 08 '25 21:12

Joel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!