Maarten De Moor
3 steps to optimize your capacity planning
Capacity planning in means of a cloud environment signifies: matching the demand of your workloads, with available resources. In most cases, the load on your workloads fluctuates. You should have enough capacity to be able to handle traffic spikes. However, when you do scale up your workload to these traffic spikes, the majority of the time, you end up overspending. The solution? Setting up autoscaling, which makes the available capacity dynamic, in accordance with the needs of your applications.
1. Determine workload capacity requirements
When deploying or migrating resources to a cloud environment, it is important to keep the capacity requirements of your workload in mind. How many requests should it be able to handle, and when should your application be available: 24/7 or only within business hours? These are some of the questions that need to be answered to determine the required capacity.
These requirements also determine which resources you should use and with which SKU/sizing. If you want to use autoscaling, you also have to verify if the chosen resource has support for autoscaling.
2. Choose metrics and thresholds for autoscaling
First, you should gain insights into your average usage, so you can set this as the minimum capacity that should be available. Most public Cloud vendors have a built-in tool where you can find that information. As an example, in Azure, you can use Metrics in Azure Monitor.
With the insights you have gained, you can now choose one or multiple metrics for autoscaling. Some examples are average CPU usage, number of incoming connections, etc.
Alternatively, you can also set up autoscaling based on a time schedule. For instance: week- or weekend day, within or outside of business hours.
3. Determine strategy and reevaluate
Now you have decided what will trigger your autoscaling, you should define a strategy. What are the thresholds for increasing or decreasing capacity? Note that you should regularly reevaluate your autoscaling scenarios as your capacity requirements will change over time.