Setting up the right cloud capacity is a key prerequisite one has to address when starting operations in the cloud. Changing business needs, however, often call for flexibility. In other words, we may frequently face the challenge of adjusting capacity by expanding or reducing cloud resources.
Today’s article will look into this challenge. It will see how we can apply scalability to address our cloud capacity needs and will also outline the main ways of achieving it. It will further outline a basic comparison between horizontal and vertical scaling and their main benefits for the cloud. Finally, it will try to give some principal recommendations for what to consider when setting up our cloud capacity.
What is scalability?
The notion of scalability commonly refers to the general ability of our infrastructure resources to be able to support increasing or decreasing workloads without service interruption. Thus, it is directly related to our ability to respond to changing market demands.
Largely, we can pursue scalability by either adding more infrastructure nodes/instances to our cloud capacity (horizontal scaling) or by increasing the computing power of an individual resource (vertical scaling). Thanks to the different inherent logic of the two approaches, horizontal scaling is also described as scaling in and out, whereas vertical scaling – as scaling up and down.
The scaling strategy we choose to pursue appears an important factor for our overall cloud experience. It concerns both our performance capabilities and our overall cloud costs. We will come back to this later in the text.
Wondering how AWS defines scalability? Well, you can read here.
On-premise vs Cloud Scaling
As a whole, scaling may be both on-premise scaling and cloud scaling. When speaking of on-premise horizontal scaling we generally mean increasing the number of computer machines to deal with increasing demand. Similarly, vertical on-premise scaling entails upgrading the CPU or RAM of an existing machine.
Although cloud scaling functions by way of analogy, i.e. by either increasing servers or computing power, we are not going to discuss on-premise scaling in further detail today.
When speaking about scaling in the cloud, horizontal scaling largely entails ensuring additional servers to meet your needs. It aims at distributing the workload among servers so that to reduce the number of requests a single server is dealing with.
Likewise, vertical scaling in the cloud involves increasing the computing power of the individual server by additional memory, CPUs or I/O resources. In practice, it is often implemented by changing instance sizes (especially in AWS and Microsoft Azure).
A basic comparison between horizontal and vertical scaling in the cloud
As a whole, a basic comparison between the two approaches shows that usually, horizontal scaling is the better way to go in the cloud. This is so, as it is considered suited to attain better performance capability with higher elasticity and no risk of falling into resource deficit. Thus, it is easier to achieve without downtime!
Further, horizontal scaling allows automatic management. Although it involves a higher initial cost, it may subsequently turn out to be the more cost-effective option. It all depends on the number of instances you need. Here is what AWS has to say about horizontal scaling.
One of the biggest advantages of vertical scaling, on the other hand, is that you can change the size of your cloud capacity faster and without additional purchase. Also, vertical scaling enables right-sizing, which is a great way to control overall cloud costs. Yet, if it is not implemented properly, cloud prices may become considerably higher. This approach is chosen mostly by smaller companies.In practice, both approaches may be matched to your advantage.
Manual vs Scheduled vs Automatic Scaling
In cloud scaling, you may choose among scaling in a manual, scheduled or automatic way. It is generally recommended that you avoid manual scaling to escape salary costs, the inability to ensure real-time matching of cloud needs and capacity, as well as the risk of human errors.
Hence, automation is the principal way to go. In this respect, you can apply both scheduled and auto-scaling. Scheduled scaling is beneficial mostly when you can predict your peaks of usage. If this is your case, you can simply set up-scaling of resources in advance to anticipate demand accordingly.
Finally, the best-suited method for ensuring real-time alignment of usage and cloud resources is auto-scaling. Here, the increase or decrease of cloud capacity happens automatically. Actually, this is what most big cloud platforms such as Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform ensure by default.
What factors can determine your choice of a scaling approach?
By all means, the specific choice of a scaling approach will depend on your specific business case. Based on our experience, we have highlighted some key factors to consider.
Here is what these may comprise of:
- Cost – it depends on your specific needs, but horizontal scaling generally involves higher initial costs;
- Long-term viability – you should do good planning ahead as scaling up, for example, has limits;
- Geographic needs – if you would like to achieve global distribution you better consider multiple machines rather than a single node;
- Reliability – horizontal scaling ensures that if one of your machines fails, there will be another one to support your operation;
- Performance – scaling out will let you combine the power of multiple machines into one provided that you have enough capacity in a single machine;
- Flexibility – if you need the freedom to always enable optimum configuration for cost and performance, you better choose horizontal scaling;
- Regularity of updates – horizontal scaling will allow a more continuous process.
Finally, your choice is not necessarily for good. It is always possible to move between the two models.
Designing our best cloud capacity is often a matter of strategy. Given that this relates to both our ability to operate and the cost we pay, it is worth considering in detail. If you need expert guidance on how to set up your scaling strategy, do not hesitate to contact us.