The Right-Sizing Problem in Cloud Computing, and How to Solve It
There are lots of cloud service providers all over the world, and finding a good one is not a problem. Nowadays, the bigger challenge can be to request the right amount of resources, ensuring that it is enough to handle the variable load without overpaying for the unused resources. Herewith, this operation is more tricky than you can assume at first glance. Actually, due to the complexity of the process, a dedicated term “right-sizing” was created.
Right-sizing is a process of reserving the cloud computing instances (containers, VMs, or bare metal) with enough resources (RAM, CPU, storage, network) to achieve a sufficient performance at the lowest cost possible.
However, modern technologies can give you a hand by automating resource allocation processes and its cost assessments. As a result, you don’t need to precisely pinpoint the limits or guess in advance how much resources should be reserved while having a clear estimation of the bills to expect. Historically, the right-sizing process is mostly an educated guess that vastly relies on the experience of the developer or system administrator. Additionally, due to the dynamic nature of the web applications, right-sizing is often a continuous procedure with periodic adjustments applied to each software stack runtime instance.
So, why exactly is it important to choose the correct size of the instances for your application? As in most cases that concern the business, the answer is money. Cloud computing resources are costly, so you obviously want to minimize infrastructure-related spendings as much as possible. However, if savings on the resources cause performance issues or even downtime then the business will miss the profit. Maneuvering between optimizing spends and keeping performance at the acceptable level is the problem that the right-sizing process intends to solve.
The dynamic and unpredictable nature of the load, which depends on the end-users’ activity on your website, service or application, makes it difficult to find the golden mean that covers all cases. Usually, resource usage estimation is done based on the monitoring of the recent application activity, and some margin is added on top to handle unexpected user influx and load spikes.
After the initial right-sizing, you still need to keep tracking your application performance to ensure that prediction is correct and resources are utilized efficiently. Herewith, both the deficit and significant amount of idling resources indicate a nonoptimal choice of the cloud infrastructure size.
Technical and Business Consequences
Why is the problem of right-sizing so severe and hard to solve? In its majority, cloud computing is delivered in the form of virtual machines (VMs), which are not very flexible in terms of vertical scaling. Often, you’ll need to move your workload to a completely new VM for adjusting the available resource limit within a single instance. The migration process is not automated, thus complex, time-consuming, and even can cause a downtime. So you are forced to get a bigger VM than you really need now, just in case your application will require more resources in the near future.
The vertical scaling step for virtual machines at many cloud service providers is rather big (every new machine is twice larger than the previous). And the pricing policy is directly tied to the size of the ordered VM regardless of the real consumption, so financial losses can be significant. In addition, some cloud vendors can oversell your allocated but idle resources to other customers. Such wise, you are paying for resources but not protected from performance degradation.
To sum up, the lack of right-sizing has two main consequences:
- Overallocation leads to inefficient utilization of the cloud infrastructure and overpayment for resources that are not actually used
- Underallocation results in resource shortage that causes performance issues or even downtime of the hosted projects, and thus leads to poor end-user experience, missed clients and revenue losses
Now, as we are aware of the issue’s roots and its consequences, let’s analyze how to find that sweet spot between overallocation and resource shortage. You’ve may already pick up from the problem description that manual right-sizing is not a foolproof solution. So we are going to rely on the tools offered by modern cloud hosting providers to automate the process.
Here are thе features you should aim for in order to automate the right-sizing of your project instances:
- First of all, the cloud hosting should be able to run containers with granular resource allocation. The smaller the resource increase step — the better, as it allows choosing the required instance size more precisely.
- Look for the modern cloud infrastructure, where unused resources are returned to the shared pool and thus are not charged. Such an approach (so-called pay-per-use) allows us to set high scaling limits and handle load spikes without constant overpayment.
- Automatic vertical scaling (adjusting the number of resources within the same container on the fly) can help you to save a lot of time and effort. Dynamic resource provisioning based on the application needs is the must-have feature for solving the right-sizing problem in the best possible way.
With a cloud hosting provider that meets these requirements, you’ll just need to set a maximum resource limit for your instance, and the right-sizing “magic” will be done automatically. So thorough investigation of the market while looking for the cloud provider that suits your needs is definitely worth your time. And don’t hesitate to request new technological and business solutions from your current hosting service providers, as the functionality to overcome the right-sizing problem is already available, and you have a full right to benefit from it.