We’ve built an auto-scaler for our App Platform app, which uses the Apps API to scale up and down depending on our workload. However, we’ve noticed that App Platform will trigger a rebuild every time we scale up or down. Is there any way to prevent this?
The problem with this is that it causes our scale up/down time to be very slow since we have to wait for the build to finish, and we’re concerned about exceeding our monthly build time limit.
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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Hey!
Quick update here for anyone who comes across this in the future, the DigitalOcean App Platform now supports CPU based autoscaling out of the box:
For more information on how to set this up, you can follow the documentaiton here:
Best,
Bobby
👋 @philipCrab
Thanks for reaching out. You’ve brought up some good feedback that when scaling your app it does appear in a “building” state briefly, however if we have not detected changes in your code we will reuse the existing container image we created from the last time there was changes.
To add a bit more detail, when scaling up or down, a new deployment is created, we check to ensure the container image we have is still valid then we start up the instances. Once those instances are up and healthy we redirect traffic from your active deployment to the new deployment and shutdown the old deployment.
If you’re seeing unexpected build times with your app when scaling please reach out to support so we can take a look at your app.
Hope this helps!
This comment has been deleted