Understanding the Benefits of Cloud Computing
Before the option of cloud computing, companies would have physical network components and server hardware to host roles that would allow them to manage identity, storage, databases, and web applications, among others. Each of these requires skill and money to install, configure, maintain, patch, and eventually upgrade.
If, for example, there was a sudden rise in incoming requests to one of your web servers, you may have had a drop in service availability because your hardware lacks the resources required to handle such traffic. If you predicted the sudden rise, perhaps due to seasonal patterns, you may have gone through a capital expenditure (CapEx) process. Once approvals are obtained and everything gets set up, if the actual traffic isn’t what was forecast, or once the traffic drops again, you might be stuck with expensive hardware that isn’t being fully utilized, while still having ongoing running and maintenance costs (as well as potentially grumpy financial controllers). This alone presents a problem, and this isn’t even touching on disaster recovery or high-availability requirements.
Enter cloud computing…
Perhaps the most noticeable change when a company moves to a cloud-based infrastructure is that the requirement for many physical components is greatly reduced. Identity management can be achieved without a single physical server for you to manage. Just log in to a web portal and do everything from there. Users no longer need to be connected directly to your internal network for secure connectivity.
Depending on the service-level agreement (SLA) you have with your cloud provider, even when something goes wrong, the cloud infrastructure can help keep your applications highly available with no noticeable downtime. With the previous scenario of a sudden rise in incoming requests, you may have decided to scale your application vertically (also known as scaling up/down), providing your application with new, underlying servers that have more compute resources, such as more powerful processors and/or more memory, but that results in some downtime during the upgrade.
You could have configured automatic horizontal scaling (also known as scaling in/out). For example, if your application gets a certain number of incoming requests or the underlying server(s) come close to fully utilizing their hardware, more instances of your application could be automatically created to handle the spike. Once the demand reduces again, the number of instances could be scaled down automatically, preventing any downtime and ensuring cost-effectiveness.
Take the example of a simple web app in Microsoft Azure configured to automatically scale using the autoscale feature. When monitoring the instances of the web app, there was a spike in the number of incoming requests (the lower line in Figure 1.1) over a period, which caused the instance count (the upper line) to be increased to 2, and once that spike subsided, the instances were reduced to 1 (in this context, instances refers to the number of servers over which the traffic is load balanced, which will be discussed in Chapter 2, Implementing Azure App Service Web Apps):
Figure 1.2: Automatically scaled instances during and after a spike in requests
Due to the elasticity that cloud computing brings, the application had the instances it needed without any downtime and scaled the number of instances back in when they were no longer needed.
With cloud computing, you not only have all the benefits mentioned here and more, but because cloud services are often (not all of them are) consumption-based, you only pay for the resources you use. This means there are no up-front costs, just operational expenditure (OpEx) costs, depending on what you use.
With the benefits just covered and many others, it’s no surprise that the number of workloads being migrated to the cloud is increasing exponentially. When thinking about moving workloads to the cloud, it’s important to understand the hosting options available to you, the most common of which we will cover in the next section.