By ljfc
I am wondering if there is any documentation or other discussion outlining what happens inside a Docker container in App Platform as it is shut down?
Does the process get sent a particular signal? Is it given any grace period to shut itself down safely? Does this vary between services and workers?
Outside the container, how does the cut-over work? Are the new containers all brought up and then it switches at the load-balancer level?
Apologies if I am missing this in the documentation, I have read what I think are the relevant pages, and I can’t see anything talking it at this level.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hi there,
The App Platform is based on Kubernetes, which allows for zero-downtime deployments.
Let’s say that you’ve made some changes to your code, and you are deploying the new version of your application to the App Platform. Once the build has finished and your deployment is ready, the App Platform will send a health check to your application to make sure it’s healthy. If an error occurs during running the deployment commands or the application doesn’t respond to the health check, App Platform will roll back the application to its previous version.
If the new deployment is healthy, the traffic will be routed to the new deployment and a SIGTERM
signal is sent to the old one for a graceful termination.
For more information you can take a look at the documentation here:
https://docs.digitalocean.com/products/app-platform/how-to/manage-deployments/
Also here is a great video on how to build Production-Ready apps with App Platform:
Hope that this helps!
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.