Online Magazine
What causes costs to increase in the cloud?

The Microsoft Azure Cloud is a good example to explain how costs are generated in the cloud. It is important to understand that cost structures and cost generators in the cloud are fundamentally different from those in on-premises environments.
By Manuel Meyer

Basically, 6 different factors can be identified in a cloud platform that influence the costs:
- The procurement model
- The type of services
- The pricing tier used for the services (dimensioning)
- The actual use of services (usage)
- The geographical location
- The amount of data that is processed (bandwidth)
The following section explains these 6 factors in detail.
The procurement model
We take the Azure Cloud as an example. The services of the Azure Cloud can be obtained in 3 different ways:
- Enterprise Agreement
- Cloud Solution Provider
- Web Direct (Pay-as-you-go)
An Enterprise Agreement is an overall contract with Microsoft that regulates the procurement of all Microsoft products and services. The Enterprise Agreement is the option for larger companies that purchase products, licences, services and cloud services on a large scale from Microsoft and is therefore often out of the question for smaller and medium-sized companies. An Enterprise Agreement always requires a certain company size and a monetary and time commitment. Cloud services can be purchased at a discount via the Enterprise Agreement, whereby the discount depends on the agreed turnover.
The Cloud Solution Provider (CSP) model is suitable for all customers who are too small for the Enterprise Agreement. Here, the cloud services are obtained from a partner who takes over the billing, provisioning and technical support and passes on the costs from Microsoft to the customer. In the CSP cost model, the cloud services are billed monthly, there is no time or monetary obligation. In the CSP model, cloud services are also purchased at a discount compared to the pay-as-you-go price.
The third and last model, Web Direct, is also called pay-as-you-go. This means that a customer independently purchases services from Microsoft, which are usually charged directly via a credit card. The advantage of pay-as-you-go is that, as with CSP, there are no obligations. The disadvantage is that the most expensive, actually the list price, has to be paid.
The Type of Services, Pricing Tier & Usage
Each product that incurs costs in the cloud can be managed individually. In Azure, these products are called "resources". The resources can be divided into the two cloud service types Infrastructure-as-a-Service (IaaS) and Platform-as-a-Service (PaaS). IaaS uses infrastructure in the sense of virtual machines, networks and storage solutions. A virtual data centre is created in the cloud, which is very similar in structure to a classic on-premises data centre.
With Platform-as-a-Service (PaaS), platform services are obtained from the cloud, which are basically only available in the cloud and are also implemented differently per cloud provider. Examples are databases-as-a-service, container platforms or platforms for web applications or data analytics.
As the basis of IaaS workloads are virtual machines, we consider these first. In the Azure Cloud, the following items are charged for virtual machines:
- Compute power
- Operating system licence
- Disk storage
- Bandwidth
The most expensive item is definitely the computing power, i.e. the compute power. This is directly dependent on the size of the virtual machine, is charged on a per-minute basis and is only due when the machine is in use, i.e. not switched off.
In addition, if it is a Windows operating system, the licence for the Windows server is also included in the price per minute.
The next item is the storage space used for the virtual machine's disks. In contrast to the computing power, the disks are a constant cost factor, regardless of whether the machine is in operation or not. The amount charged depends on the size and speed of the storage media used.
The last item to be paid for is the bandwidth. It depends on the data traffic into, out of and between the Microsoft Data Centres. More on bandwidth follows in a separate section.
It is important to mention that there is a huge range in costs. The smallest virtual machine with one processor core and 0.75 gigabytes of RAM costs about $15 per month, while the largest machine, appropriately nicknamed "The Beast", with 416 processor cores and 11 terabytes of RAM costs $95,000 per month. The selection of this size, also called pricing tier, is shown below. In addition to the price and performance, the pricing tier also determines the availability of other features.
Pricing Tier using the example of a virtual machine (Source: Azure Portal)
With Platform-as-a-Service (PaaS), there is a different billing model. When using a platform service, a distinction must be made between two approaches. Classic PaaS and serverless computing. With classic PaaS, the user decides how much service he wants to buy. There are different ways in which this selection can be made. But all platform services have in common that there is a "price versus performance" agreement. This means, for example, that a PaaS database is purchased with a certain performance. In the operation of the database, it must then be monitored how much performance the database actually needs. If the database reaches its performance limit, it must be scaled up. Unlike virtual machines, it does not matter whether the database is "running" or not. PaaS services usually cannot be switched off either. This means they cost money until they are deleted. Of course, the possibilities of scaling platform services offer great savings potential.
A big disadvantage of IaaS and the PaaS model is that there is always overprovisioning. The user has to decide how much power to buy, regardless of how much power the workloads use. Or in other words, as soon as the virtual machine is running or the PaaS service is purchased, the costs are incurred. Regardless of whether performance is used or not.
Serverless computing solves this problem conceptually. Serverless services can be created in the cloud without incurring costs. The costs are only incurred when they are used. An example from the Azure Cloud is the Azure Functions product. Azure Functions are functions programmed in code that are initiated by a trigger and execute logic. Functions can be operated serverless, which means that no costs are incurred for the creation of the function and costs are only charged when the function is called. This means that in the serverless model, only the power that is actually used and not the reserved power has to be paid for. Serverless computing is therefore very efficient in terms of costs. But of course there is also a flip side to the coin, for example that functions that are rarely called "fall asleep" and only react with a delay the next time they are called.
Location
The global cloud hyperscalers such as Microsoft or AWS make their infrastructure available across the globe. This has great advantages for us as users. On the one hand, regional compliance requirements can be met, and on the other hand, workloads can be brought close to the customer.
Azure Regions (Source: azure.microsoft.com)
However, the geographical region also has an impact on the cost structure. In the Azure Cloud, as an example, all types of services have a regional price tag. It is interesting to note that there are massive price differences between the regions. The website www.azureprice.net offers good assistance in this regard. It offers cost comparisons between the regions. For example, you can see where a certain machine size is cheapest. Or there is a diagram showing the machine price per region (see picture below).
Prices for virtual machines by region (Source: www.azureprice.net)
Bandwidth
Last but not least, we come to the issue of brand range. In contrast to the cost factors presented so far, which have a clear price indication, bandwidth is somewhat less tangible.
With bandwidth, we are talking about the amount of data that is transported around in the cloud. We distinguish between three different directions. The ingress refers to the data that is copied into the cloud data centre. From the point of view of a company, this is equivalent to an upload into the cloud. With egress, we are talking about data that leaves a cloud data centre, which is a download from a company's point of view. The third point is the data that is copied back and forth between cloud data centres.
In the Azure Cloud, Ingress is free, while Egress and Inter-Region Transfer must be paid for per gigabyte. More information is available in this documentation.
Part 2 of the article "Cost optimisation in the cloud" will be published next Monday.
