Sub topic 1
What Cloud Computing Is
Prerequisites
This chapter assumes you know the basics of three things. A server is a computer that answers requests from other computers. An operating system is the software that manages a computer's hardware. An application is a program that does a useful job for a user. You should also be comfortable using web applications and know basic networking terms such as IP address and HTTP.
You do not need to know any cloud provider's products. Later chapters cover those.
A working definition
Cloud computing is a way of getting computing resources (processing, storage, networking, and software) over a network, from a shared pool, when you ask for them, and paying for what you use. You do not buy or house the hardware. A provider owns large data centers, and you use a slice of them through a web console, a command line, or an API.
The best-known formal definition comes from the US National Institute of Standards and Technology (NIST). It says cloud computing is a model for convenient, on-demand network access to a shared pool of configurable resources that can be provisioned and released with minimal management effort. The word that matters most is model. Cloud is not a single product. It is a way of delivering and consuming computing.
A simple comparison shows the difference. Before the cloud, a team that needed a server would estimate its peak load, order hardware, wait weeks for delivery, install it in a rack, and pay for it whether or not it was busy. In the cloud, the same team requests a server, gets it in minutes, and stops paying when it deletes it.
# Ask for one small virtual server. The AMI ID is a placeholder;
# use an image ID that exists in your region.
aws ec2 run-instances \
--image-id ami-0123456789abcdef0 \
--instance-type t3.micro \
--count 1This one command is the core idea. You described what you wanted in a request, and the provider supplied it from a pool without any human on your side touching hardware.
The essential characteristics
NIST lists five characteristics. If a service lacks most of them, calling it "cloud" is probably marketing.
| Characteristic | What it means | Example |
|---|---|---|
| On-demand self-service | You provision resources yourself, without talking to a salesperson or an administrator. | Launching a server from a console or CLI. |
| Broad network access | Resources are reachable over the network from many kinds of devices. | Calling an API from a laptop, phone, or another server. |
| Resource pooling | The provider serves many customers from the same shared hardware. | Your server and another customer's server run on the same physical machine. |
| Rapid elasticity | Capacity grows and shrinks quickly, often automatically, to match demand. | Adding servers during a sale and removing them afterward. |
| Measured service | Usage is metered, and you are billed for what you consume. | A bill based on instance hours and gigabytes stored. |
Two of these are easy to confuse. Scalability means a system can handle more load if you add capacity. Elasticity adds speed and reversibility: capacity is added and removed quickly, so you do not pay for idle resources. A system can be scalable without being elastic, for example if adding servers takes a week.
How the cloud works underneath
Two ideas make the five characteristics possible: virtualization and pooling.
Virtualization is software that divides one physical machine into several isolated virtual machines (VMs). A layer called a hypervisor sits between the hardware and the VMs. It gives each VM its own share of CPU, memory, and storage, and it keeps the VMs from seeing each other's data. Each VM runs its own operating system and believes it has a whole computer.
Resource pooling follows from this. The provider fills data centers with identical hardware and treats it as one large pool. When you request a server, software chooses a physical host with free capacity and starts a VM there. When you delete it, the capacity returns to the pool. Because many customers share the pool, the provider can run the hardware at high utilization, and that is how it can offer low prices.
This also explains why provisioning takes minutes. Nobody installs anything. A control plane (the provider's management software) receives your API call, finds capacity, and starts a VM from a stored image.
Deployment models
Where the cloud runs and who can use it gives four common arrangements.
- Public cloud: a provider owns the infrastructure and rents it to many customers over the internet. Amazon Web Services (AWS), Microsoft Azure, and Google Cloud are examples.
- Private cloud: the infrastructure is used by one organization. It may sit in the organization's own data center or be hosted by a third party. It still follows the cloud model, with self-service and metering, but one organization carries the cost and the operations.
- Hybrid cloud: a mix of private and public environments that are connected so workloads and data can move between them. A common reason is keeping regulated data on premises while running public-facing sites in a public cloud.
- Multi-cloud: using more than one public cloud provider, often to avoid depending on one vendor or to use a particular provider's strength.
Hybrid and multi-cloud are different. Hybrid combines private and public. Multi-cloud combines several public providers, and it can be hybrid as well.
Regions and availability zones
Providers do not run one giant data center. They split their infrastructure geographically.
A region is a geographic area, such as a metropolitan area or part of a country, that contains several data center groups. An availability zone (AZ) is one or more data centers inside a region with independent power, cooling, and networking. Zones in a region are connected by fast links but fail separately.
This structure gives you two choices to make:
- Region choice affects latency (users far away see slower responses), legal requirements about where data may be stored, price, and which services are available.
- Zone choice affects resilience. If you run copies of an application in two zones and one zone loses power, the other keeps serving users.
A common mistake is putting everything in one zone. The provider keeps the zone running, but a single zone is still a single point of failure for your application.
Common errors when learning this topic
- Treating "cloud" as "someone else's computer" and nothing more. Renting a VM is part of it, but the defining features are self-service, elasticity, and metering.
- Assuming the provider handles everything. Even in the cloud you remain responsible for some things, such as your data and who may access it. The service models in later chapters show exactly where the line falls.
- Confusing virtualization with the cloud. Virtualization is a technique the cloud uses. A company running a few VMs on its own server has virtualization but not necessarily self-service, pooling across customers, or metering.
- Forgetting that elasticity must be set up. Capacity does not shrink or grow by itself unless you configure rules for it.
Exercise
A company runs 20 virtual machines on its own server room hardware. Staff must file a ticket and wait three days for a new VM, and the cost is the same each month. Is this cloud computing under the NIST definition? Name two characteristics that are missing.
Show answer
Not fully. Virtualization is in use, but on-demand self-service is missing because staff must file a ticket and wait, and measured service is missing because the cost is flat and not based on usage. Rapid elasticity is also absent, since adding capacity takes days.
Exercise
An online shop expects ten times its normal traffic for one weekend. Which two cloud characteristics let it handle this without buying hardware, and which characteristic keeps it from paying for the extra capacity afterward?
Show answer
Rapid elasticity lets it add capacity quickly, and on-demand self-service lets it do so itself without a purchase process. Measured service means it pays only for the extra capacity while it is used, and releasing the resources after the weekend stops the charges.
Exercise
A team runs its application in two availability zones in one region. A fire disables one zone. Does the application stay available, and what risk remains?
Show answer
It can stay available, because the second zone fails independently and can keep serving users, provided the application is set up to run and switch between both zones. The remaining risk is that a problem affecting the whole region would still take the application down.