Report this

What is the reason for this report?

Is it possible to scale horizontally?

Posted on June 1, 2017

I have a droplet, where my Parse Server is deployed and now, I’m going to get another one for my Parse LiveQuery Server… Before I do that, I need to know if it’s possible to scale horizontally - automatically AND manually - and how!

Thanks in advance!



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.

@Selfit

Auto-Scaling can be done, though currently, it’s not automatic. You’d need to use the API and one of the existing libraries for your preferred programming language, then interact with it programatically.

https://developers.digitalocean.com/documentation/v2/

You can scale manually from the DigitalOcean control panel by clicking on the name of the Droplet, then Resize from the left side menu. From there you have two options, the first being to scale only the CPU and RAM, and the second being to scale CPU, RAM, and Disk.

The difference between the two is that you can scale down if you only choose to scale the CPU and RAM. If you choose to scale the CPU, RAM, and Disk, you can’t scale back down (currently).

Hi @Selfit, I’ll join @jtittle in this question for few more samples.

Above mentioned way is vertical scaling, which means you’re adding more resources to existing Droplet. You also have horizontal scaling, which means that you’re adding more Droplets rather than expanding existing.

Vertical is easiest, but there is a big downside. To scale vertically, you need to power-off your Droplet, resize it, then turn it up again. If you don’t have another Droplet, your service will not be available until resizing is done.

With horizontal, you add new Droplet so existing doesn’t need to go down.

However, there downside with Horizontal scaling is that you need more complex infrastructure. You need some sort of Load Balancer to balance requests between multiple servers.

For Load Balancing, DigitalOcean got you covered. An Introduction to DigitalOcean Load Balancers will show you how LB works. Price for an LB is $20/mo, without traffic or number of Droplets restrictions.

Also, you will need something that will watch your current Droplets and order creating new one when needed. For that, you will need to build yourself solution, as it depends on user and I’m not sure is there any unified solution.

To help with creating new Droplets, you can resort to API. With new Droplet, you need to configure them appropriately. To help you with provisioning new Droplets, you can build Droplet from Snapshot which will contain everything pre-installed, or to use User data to configure new Droplets. An Introduction to Cloud-Config Scripting will show you how to use User Data.

What is High Availability? will help you better understand some of key concepts.

If you have any question, feel free to ask anything.

Hi there,

Quick update here, Droplet autoscale pools are now available. Autoscale pools enable automatic horizontal autoscaling based on resource utilization.

In the Autoscale Pool Configuration section, you can choose the configuration of the pool:

  • Autoscale dynamically manages the number of Droplets in the pool based on their aggregate resource utilization. You choose:

    • Pool Size, which controls the minimum and maximum number of Droplets in the pool.

    • Target Utilization, which control which metrics (CPU, memory, or both) to monitor and at what thresholds to scale.

      Autoscale pools set to autoscale determine how many Droplets the pool should have by multiplying the utilization ratio by the current number of Droplets in the pool and taking the ceiling of the result. With multiple metrics set, the pool uses the largest result of this calculation across all metrics.

      For example, an autoscale pool with 2 Droplets, a target utilization of 80% CPU, and a current utilization of 95% CPU would scale to 3 Droplets: ceil(2 Droplets * (80% target CPU / 95% current CPU)) = ceil(2.375) = 3.

    • Cooldown Duration, which is the minimum amount of time the autoscale pool waits between making modifications to the Droplets in the pool. This cooldown prevents thrashing during scaling and prevents downtime during configuration changes by giving new Droplets time to boot before destroying the old ones.

      Choose a cooldown duration at least as long as it takes your Droplets to boot.

  • Fixed Size maintains a fixed number of Droplets in the pool. Autoscale pools set to fixed size have a cooldown duration of 10 minutes which you cannot change. You choose:

    • Number of Droplets. The quantity of Droplets you want in the pool.

- Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.