Question

Horizontally scale app without rebuild

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.


Submit an answer


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!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
March 27, 2024

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:

https://www.digitalocean.com/blog/introducing-cpu-based-autoscaling-app-platform

For more information on how to set this up, you can follow the documentaiton here:

https://docs.digitalocean.com/products/app-platform/how-to/scale-app/#auto-scale

Best,

Bobby

Jon Friesen
DigitalOcean Employee
DigitalOcean Employee badge
August 6, 2021

👋 @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!

Bobby Iliev
Site Moderator
Site Moderator badge
August 6, 2021

This comment has been deleted

    Try DigitalOcean for free

    Click below to sign up and get $200 of credit to try our products over 60 days!

    Sign up

    Get our biweekly newsletter

    Sign up for Infrastructure as a Newsletter.

    Hollie's Hub for Good

    Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

    Become a contributor

    Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

    Welcome to the developer cloud

    DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

    Learn more
    DigitalOcean Cloud Control Panel