Cloud Computing: The Definitive Guide

19 January, 2022 |  Vladimir Djurovic 
img/cloud-computing.png

Ever since Amazon launched AWS in 2006, cloud computing has been taking over the world. It is estimated that cloud computing market will be worth almost 500 billion USD in 2022, with even more growth projected for the future.

With this rate of growth, also comes increase in demand for cloud professionals, like cloud engineers and developers. In one of previous posts about learning programming, I’ve listed knowledge of cloud computing as one of the requirements for aspiring developers.

In this post, I will try to layout basics of cloud computing in a way that complete beginners can understand.

Evolution of cloud computing

In order to see why cloud computing became so popular, let’s briefly go over the developments that led to it’s emergence. That way, it will be easier for you to understand the benefits and shortcomings that make cloud adoption so appealing.

On-premise: Physical servers

In the old days (before cloud), companies and organizations used to host all their applications on servers in their own data centers (on-premise). This made sense from the perspective of ownership, since all hardware, code and data was under direct control of organization. But, on the other hand, this approach brings a lot of overhead.

Consider the costs involved in operating this kind of infrastructure:

  • Data center itself - regardless of whether it is a full-blown, dedicated data center or just a room in the office, it requires the same resources:

    • space

    • networking equipment (racks, routers,cables, firewalls etc.)

    • Power supply, redundant in case of failure

    • Internet connection, also redundant

  • Server hardware - actual machines to run the applications

  • Staff to setup, configure and maintain everything

Full blown data center on-premise

So, running your own data center is a considerable undertaking, in both computing and human resources. But, the biggest issue is probably the rigid and inflexible nature of the whole setup. You have a fixed amount of computing power and storage, which means you have either to much or too little capacity. Consider the following graph:

Available vs needed capacity diagram

Orange line represents total capacity available in data center, while blue line represents the actual needed capacity. You can notice that most of the time blue line is beneath orange line, which means that we have excess capacity in data center, ie. our servers are idle.

When demand exceeds the capacity (blue line is above orange), we need to add more servers to data center. Now we end up in the same situation as above, with too much capacity than we actually need. This cycle goes on and on.

As you can see, the main drawback of on-premise data centers with physical servers is the mismatch between available and required capacity. Our servers are either idle, or they are handling too much load.

We can say that our resources are not elastic. In this context, elasticity refers to the capability of the system to scale up and down on demand, according to consumption of resources.

To address this problem, next step in evolution was to add virtual machines into the mix.

On-premise: Virtual machines

Virtual machines are isolated environments running inside physical computer which run complete operating system and applications. From the point of view of the system running within them, there is no distinction between physical and virtual machine.

In on-premise data center, instead of running applications directly on physical servers, they are being run inside virtual machines. These virtual machines are packed into physical servers.

You might be wondering, what is the point of this? Well, usually, one server runs only one application. This is to prevent one crashing application to crash other applications. This is good for resilience and reliability, but is not good for capacity standpoint.

Running apps inside virtual machines allows for better capacity usage, since you can increase and decrease virtual machine resources on demand. Let’s take a look at the chart bellow:

Available vs needed  vs VM capacity diagram

Green line represents capacity of virtual machines. You can see that it much more closely follows the blue line (actual demand for capacity), so we get a lot better utilization of resources.

But, we are still limited by the amount of the actual physical resources we have. If you look at the diagram, the green line never goes above the the brown line. The capacity of all virtual machines in data center is limited by the physical resources we have.

Here we see another problem with on-premise data centers, and that is scalability. Scalability means being able to increase or decrease available resource as needed. When we need more capacity, we need to buy more servers. When the demand decreases, these servers are not needed and are just a drain of resources.

Enter the cloud

Now that we’ve see what are the problems with on-premise data centers, let’s see how cloud computing fits the bill. In the rest of the post, we’ll focus on cloud basics, characteristics, benefits and drawbacks.

What is cloud computing?

Cloud computing is the delivery of computing resources over the internet. These resources can include servers, storage, network, database and software. Cloud providers offer multiple, redundant data centers spread across large geographical areas, with dedicated network links, power supply, security and compliance levels.

Cloud computing resources are generally paid by usage, without any upfront costs. It means that there are no big, one-time payments, but rather smaller monthly charges. This is referred to as CAPEX vs. OPEX.

On-premise data centers are capital expenditure (CAPEX). This means that businesses pay a large chunk of money upfront, for all the resources they think they might need. If resources are under utilized, that means money is wasted. If there are no sufficient amount of resources, more capital expenditures are needed for more resources.

Cloud computing is an operational expenditure (OPEX), You pay exactly for the amount of resources used, no more and no less. This kind of expense makes more sense from business perspective.

How does cloud computing work?

Cloud providers build data centers ar geographically distributes locations, install and setup equipment (racks, servers, network equipment, etc). Then they make these resources available to their customers over the internet.

Virtualization plays a vital role here. Customers do not get actual physical servers, but rather a virtual machines on which they can install their applications. Relying on virtualization enables cloud providers to easily provision services on client’s request.

So, what happens when you request a cloud server? Cloud provider’s system receives the request, creates the virtual machine on one of the servers, and makes it available to you. Connecting to the server is done through remote access protocol, like SSH or RDP.

In addition to servers, cloud can also virtualize storage and networking. That allows users to create completely isolated environments in within cloud provider’s infrastructure.

Types of cloud computing platforms

As mentioned earlier, virtualization plays a major role in cloud computing. In that sense, virtualization enables abstraction of cloud resources on a different level. Abstraction in this context means that end user can be aware of more or less details of the underlying system.

There is a trade-off here: lower level of abstraction means you have more control of the actual resources and can configure them in more fine-grained level. But, this has the cost of additional labor required to configure and setup everything.

On the other hand, higher level of abstraction means you give up control for more convenience. Cloud provider manages all of the underlying details for you, while you can focus on actual logic of the application.

If this does not make sense to you, I will explain it in more details in the following sections.

Infrastructure as a Service (IaaS)

IaaS is the lowest level of abstraction of all the cloud platform types. It is basically a virtualized data center, where you have complete control of your virtual infrastructure. This is the mode of operation of the largest cloud providers, such as AWS. This mode of operation is depicted int he diagram bellow.

Cloud provider provides physical infrastructure, like servers, network, power supply, and adds virtualization layer on top of it. This layer is used to create virtual machines and make them available to users.

Infrastructure as a service diagram

Infrastructure as a service

In addition to virtual machines, cloud providers also provide other resources, such as storage, virtual networks, firewalls, databases etc.

All this infrastructure is automated through an API (Application programming Interface) , which cloud providers make available to users. Users can use this API to allocate and destroy resources, assign access privileges, track expenses and so on. Ultimately, this API can be used to integrate cloud infrastructure with user’s own applications and infrastructure.

IaaS gives you the most control over resources out of all other types. But, it also means that you need a lot of work to deploy, configure and maintain everything. Usually, it means that you need dedicated personnel to manage IaaS cloud. That is the biggest drawback of this cloud type.

In this kind of service, user is responsible for managing and configuring entire infrastructure above the virtualization layer. Anything beneath it is responsibility of cloud provider.

Different cloud vendors may offer different services on IaaS level, but most common are computing power, storage and networking. Let’s go into these services in a little more detail.

Compute resources (CPU)

The basic offering for this kind of resources are virtual machines, often called instances. You get the virtual server with complete operating system at your disposal. You can install any type of application on it, just as you would on regular physical server. An example of this is Amazon EC2 (Elastic Compute Cloud).

Using cloud provider’s API, you can easily spin virtual machines up and down. Cost is usually calculated down to the second, so you pay exactly for what you use. When instances are no longer needed, you just dispose of them.

Another kind of compute resources are containers. Containers are ““lighter”” form of virtualization. They usually run a single application on bare-bones operating system. Cloud vendors provide managed container runtimes on which users can launch their containers. An example of this is Amazon ECS (Elastic Container Service).

Storage

Storage is another kind of resources provided by IaaS. Usually, it comes into two forms.

Block storage is equivalent to regular hard drives used in computers. Users can create virtual hard drives and attach them to virtual machines as needed. These virtual drives can be easily resized as needed, backed up and restored. An example is Amazon EBS (Elastic Block Storage).

Object storage works with data at an object (file) level. Each object includes the data, metadata about of the object and globally unique identifier. This kind of storage can scale to include massive amounts of data. The most widely known is Amazon S3 (Simple Storage Service).

Networking resources

Cloud vendors provide networking virtualization. This capability allows users to create their own isolated networks independent of other users. They can then connect virtual machines to these networks, so they can communicate with each other.

Using this feature, you can create public-facing networks for publically accesible applications, and also private networks for isolated workloads.

An example of network virtualization is Amzon VPC (Virtual public Cloud).

Platform as a Service (PaaS)

In Platform as a Service model, all underlying infrastructure is abstracted away from the user and managed by cloud provider. Users are only responsible for application code and data. An example of PaaS provider is Heroku.

Platform as a service diagram

Platform as a service

The way this works is, you as a user choose which resources you want ot use and what capacity you need. You also need to supply the application code and configuration. It is then cloud provider’s responsilibility to build and deploy the application.

In addition, all runtime monitoring, scaling and operation is managed by cloud provider. Each time you push new code, it gets automatically deployed.

This mode of operation is much more convenient than IaaS, but you give up a lot of control for sake of convenience. This type of cloud is suitable for small teams which can not afford dedicated staff for cloud management, since all infrastructure is managed by a cloud provider.

The downside of this type of cloud is that it is generally more expensive than IaaS.

Software as a Service (SaaS)

With Software as a Service, cloud vendor provides complete end-user application over the internet. Applications usually run in browser, and are comparable to classic desktop applications in functionality. An example of this approach would be applications like Gmail or Office 365.

Software as a service diagram

Software as a service

Benefits of this cloud mode for users are that applications can generally be accessed from anywhere and from any device. They are usually charged monthly fee based on usage volume, number of users or something else. Users always have the most up-to-date version of software, without the need for manual updates.

For application vendor, benefits are ease of development and deployment, since they only need to support single platform (the browser). In addition, they have monthly subscription as revenue source, instead of single purchases.

Function as a Service (FaaS)

Function as a Service is a type of serverless computing in which cloud infrastructure gets further abstracted away from user. Cloud vendor provides runtime environment for code to run on, and this runtime is completely transparent for user. An example of this approach is AWS Lambda.

Function as a service diagram

Function as a service

This approach is a lot similar to PaaS, but instead of complete applications, here we are dealing with single functions. FaaS is ideal for short lived computing tasks, like ones that need to run on schedule, or there the demand is limited, so it doesn’t make sense to have server running 24/7.

FaaS is one of the building blocks of serverless computing.

Cloud deployment models

There are three different deployment models for the cloud: public, private and hybrid.

Public cloud is the most common deployment model, one which largest cloud providers use (AWS, Azure, Google cloud). In this model, cloud providers deliver services over the public networks. Payment model is most commonly monthly subscription or based on usage.

The main concern with public cloud is usually the security of data. Since public clouds are always multitenant, possibilities for data breaches and exposing private information is increased.

Private cloud deployment model refers to entire cloud infrastructure deployed within a single organization. Infrastructure can also be deployed in public cloud provider’s data centers, but in this case it is run as single tenant, ie. there is not sharing of infrastructure.

Cloud deployment models

Cloud deployment models

Hybrid model is a mix of the above two approaches. Private cloud or on-premise infrastructure can be connected to public cloud, reaping the benefits of both models.

In this case, private part is used to sensitive data and applications, while public part is used as an extension for public-facing, non-critical parts.

Advantages of cloud computing

As all technologies, cloud computing has it’s pros and cons. In this section, we’ll list some of the advantages of cloud computing:

  • Self-service provisioning - users can allocate and terminate resources as needed, simply by using cloud API or user interface.

  • Elasticity - available resources can be increased or decreased as needed to meet required capacity

  • Pay-as-you-go billing - users pay for resources based on usage. This can be extremely granular, leading to serious savings at scale

  • Scalability - cloud providers operate at huge scale, often globally. This gives users access to incredible amount of resources, virtually infinite

  • Security - cloud vendors provide different levels of security, from data center level to application level. It helps with industry certification such as HIPPA, PCI DSS etc.

  • Network access - users can access cloud services from anywhere

Drawbacks of cloud computing

After the benefits, let’s now take a look at the drawbacks of cloud computing:

  • Unpredictable cost - since cloud is charged based on usage, spikes in the amount of required resources can lead to nasty surprises when the bill comes

  • Privacy concerns - being that user data is stored with the third party, privacy of data is a major concern. Although cloud providers take all possible measures to protect user data, there is a certain lack of transparency that may cause concerns

  • Personnel shortage - like with any IT infrastructure, when dealing with cloud, you need to have staff which is competent and has needed expertise. Errors in cloud deployment and operation can lead to significant financial loses, data breaches and security lapses. Demand for cloud professionals is extremely high and finding the right talent is very difficult

  • Vendor lock-in - once you go with the cloud provider, it is very difficult to switch to another one without significant effort and cost. Providers have widely different APIs, services and infrastructure. There is no common standard between, which makes the migration difficult

Final thoughts

Cloud computing is in the expansion, and has been for a while. Cloud offers an incredible level of flexibility, scale and automation.

This post was an introduction to cloud computing for complete beginners and people looking to learn more about the cloud. I hope it explained some of the basic cloud computing concepts and shed some light on the cloud itself.

If you have any questions, comments or thoughts about ti, I encourage you to leave a comment bellow.