Auto increate CPU and MEMORY

Any advice is appreciated. Do you know any good servers that automatically increase CPU and memory when needed and decrease them when not needed? I have a Selenium application monitoring for visa slot openings. When slots open, I would like to run 22 Selenium instances.

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.

Site Moderator
Site Moderator badge
March 5, 2024

Heya @alif,

For that to happen, I’ll recommend Kubernetes

DigitalOcean Kubernetes provides a Cluster Autoscaler (CA) that automatically adjusts the size of a Kubernetes cluster by adding or removing nodes based on the cluster’s capacity to schedule pods.

You can enable autoscaling with minimum and maximum cluster sizes either when you create a cluster or enable it later. You can use the DigitalOcean Control Panel or doctl, the DigitalOcean command-line tool for autoscaling.

More on that here:

Bobby Iliev
Site Moderator
Site Moderator badge
March 4, 2024

Hi there,

For a scenario like yours, where the workload can fluctuate significantly, leveraging the capabilities of cloud infrastructure can be particularly beneficial.

One excellent option you could consider is the DigitalOcean Managed Kubernetes service. Kubernetes, by its very nature, is designed to handle such use cases where you need to automatically scale your resources up or down based on the application’s needs. With DigitalOcean’s managed service, you get the benefit of not having to manage the Kubernetes cluster’s underlying infrastructure yourself. You can define resource limits and requests for your containers, and Kubernetes will automatically adjust the number of pods running based on these definitions and the actual usage. This means when your Selenium instances need to scale up due to increased workload, Kubernetes can handle this scaling automaticallyL

Another approach is to use DigitalOcean Droplets with some custom automation. You can utilize doctl, DigitalOcean’s command-line tool, to programmatically manage your Droplets. With this setup, you could write a script that monitors your application’s resource usage and, when necessary, either spins up additional Droplets or resizes existing ones to meet your application’s demands. This approach gives you a bit more control over the scaling process and might be more suited to specific needs that can’t be as easily addressed with Kubernetes. You can also add a Load Balancer to distribute the traffic between the newly created Droplets:

Both these solutions offer the flexibility and scalability you need for your Selenium application, especially during those critical times when visa slot openings are detected, and you need to scale up your instances rapidly. It’s just a matter of choosing which approach best fits your operational preferences and the specific requirements of your application.

Hope that this helps!



Site Moderator
Site Moderator badge
March 3, 2024

Hey, @alif

Autoscaling is available with our Kubernetes Cluster.

If you would like to use a Loudbalancer cluster setup, this can be achieved manually as well. You’ll need to setup monitoring to track metrics and alerts for CPU, Memory and Disk space usage. Based on the metrics you can use DigitalOcean’s APIs to spin up additional droplets and ad them to the load balancer cluster.

Set up your own metrics/alert listeners to monitor the CPU, memory and disk space, then you can use DigitalOcean APIs to spin up additional servers and add them to the DO load balancer.

Hope that this helps!

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