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.
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.
Sign up for Infrastructure as a Newsletter.
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.
Heya @alif,
For that to happen, I’ll recommend Kubernetes
https://www.digitalocean.com/products/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:
https://docs.digitalocean.com/products/kubernetes/how-to/autoscale/
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!
Best,
Bobby
Hey, @alif
Autoscaling is available with our Kubernetes Cluster.
https://docs.digitalocean.com/products/kubernetes/how-to/autoscale/
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.
https://www.digitalocean.com/products/load-balancer
Hope that this helps!