At the beginning of a project, it is often easiest to perform an initial rightsizing. This is to ensure that the selected public cloud instances are suitable for the requirements of the application. Experience shows that both CPU and necessary RAM can be reduced by up to 60% during initial rightsizing.
At the same time, the storage classes can be evaluated: There are not only price differences between different storage classes such as managed disks, file storage, Azure Data Lake storage, and block blobs, but also within these storage classes. For example, the first 50 TB/month of Azure File Storage costs €0.16445 per GB for Premium Storage. For Archive Storage, however, only €0.00152 per GB is charged. Significant cost savings can thus be achieved by choosing the right storage. (More information about rightsizing.)
In the next step, companies can save costs through initial automation. This essentially involves automating processes to save process costs.
A first step could be to automate the creation of Azure subscriptions or the provisioning of entire sandbox environments so that test scenarios and ideas can be tried out more quickly. This also includes, for example, automatically deleting unused resources. The simplest way to save costs in the public cloud is to remove unused resources. Experience shows that unused resources often continue to be operated because it is not known whether they are still needed.
In the public cloud, such resources can be easily removed - because if there is a need for them again, they are simply provisioned again automatically. Removing unused instances is also important for security, as unused resources can create vulnerabilities.
The longer the public cloud is used for different workloads, the more experience can be gained about load peaks or the behavior of the application. Only through longer use and the collection of information on the utilization of individual workloads can initial decisions on reservations be made. Reserved instances offer a significant discount compared to on-demand resource pricing. Rightsizing should always be performed before making a reservation.
In addition to experience with workload utilization, other aspects are also relevant when reserving VMs, for example:
- First of all, the period should be considered for how long an application will continue to use certain services. For example, it is conceivable not to reserve VMs if the application is migrated to higher-quality services such as containers or serverless in the near future.
- Reservation should also be avoided if the application is to be shut down completely in the near future.
The impact of a reservation on costs can be very high - in some cases, cost savings of up to 80% are possible if reservations are carried out correctly. This value is impressive at first, but it is important to note that canceling or downsizing a reservation can result in cancellation fees. So to properly utilize reservations, it is important to know what is actually needed. (More information about reserved instances.)
Deletion and shutdown of services
If the utilization of applications and workloads is known over a longer period of time, planned shutdown and deletion of services can also be considered.
It is important to consider when customers or users use the applications in detail. An online store in the B2C environment, for example, should be available on Sundays, while a B2B platform may be deleted or shut down for entire weekends, nights, and even holidays.
With a higher understanding of the public cloud mechanisms and a high adaptation of the services, the use of now very mature cost management mechanisms becomes possible: One of them is the use of discounted instances. These usually do not have a defined availability, as is the case with other VMs. Therefore, they are not suitable for mission-critical workloads and are not intended to run for more than 730 hours per month. However, for occasional use, they can lead to significant cost reductions.
In Azure, B-Series is among these discounted instances. The background to B-Series is that for many workloads running in Azure - such as web servers, small databases, and development and test environments - CPU performance is very erratic. These workloads run for a long time at a small fraction of the possible CPU power and then require the full power of the CPU at peak times due to incoming traffic or required work. The B-Series provides a cost-effective option for the workloads. While the B-Series VMs run in the low points and do not fully utilize the CPU's base power, the VM instance builds up credits. When the VM has accumulated enough credits, usage can "burst" up to 100% of the vCPU for the period of time that the application requires the higher CPU performance. Proper implementation requires great expertise on the application and the mechanism described above. (More information about discounted instances.)
Spot instances in Azure are similar to the B-Series. Azure virtual spot machines (Spot VMs) can provide discounts of up to 90% compared to usage-based payment pricing on unused Azure compute capacity. No more than the maximum price is paid, which can be optionally set beforehand. Spot VMs are ideal for workloads that can be interrupted and offer scalability at a lower cost. However, unlike B-Series, Spot instances are not continuously and unrestrictedly available. In addition, Spot instances do not accumulate credits. Spot instances are based on the fact that the hyper-scaler has immense excess capacity, which is also to be used by customers. In order to use this excess capacity, they are offered very cheaply - but for a limited time. So workloads are removed when Azure has less excess capacity. Workloads are also removed if the current price exceeds the maximum price that was agreed upon before the VMs were allocated. However, if scheduled events have been subscribed to, a notification is generated 30 seconds before the workload is removed. This instance type is therefore particularly suitable for the following types of workloads: High-performance computing scenarios, batch processing jobs or visual rendering applications, dev/test environments, Big Data applications, analytics applications, and container-based applications, as well as large, stateless applications.