CloudAcademia
EN

Cloud Computing · Module 04 · Cloud Fundamentals: Service and Deployment Models

Cloud Fundamentals: Service and Deployment Models

Lesson45 minBeginnerMarkdown

Showing raw Markdown: the renderer could not load.

## Why this matters
A small veterinary group tells its board: "We are moving everything to the cloud." Six months later, three different things have happened under that one sentence. The staff email now runs as a subscription service that nobody patches. The booking website runs on a platform where the team only deploys code. And the old practice-management server, which the vendor only supports on a specific Windows version, now runs as a virtual machine that the team still has to patch and back up. The board expected one bill and one security model. They got three of each.

"Cloud" is not a place or a product. It is a way of consuming IT, and *how much* you hand over to the provider changes who patches, who backs up, who gets blamed after a breach and how the invoice looks. This lesson gives you the vocabulary to answer, for any workload: what makes it "cloud", what kind of service it is, where it runs, who is responsible for what, and what it costs.

## Learning objectives
- Explain the five essential characteristics of cloud computing defined in NIST SP 800-145.
- Compare the service models (IaaS, PaaS, SaaS and FaaS) and choose one for a given workload.
- Compare the deployment models: public, private, community, hybrid and multicloud.
- Apply the shared responsibility model to decide who secures and operates each layer.
- Assess the cost and resilience trade-offs of the cloud: capital versus operational expenditure (CapEx and OpEx), elasticity, regions and availability zones.

## Key concepts

### What makes a service "cloud": the five essential characteristics
Think of electricity. You don't build a power station; you plug in, use what you need and get a bill for the kilowatt-hours. Nobody phones the utility to ask for more power when you switch on the oven. Cloud computing aims at the same experience for computing resources.

The US National Institute of Standards and Technology (NIST) formalised it in **NIST SP 800-145**, *The NIST Definition of Cloud Computing* (2011). It defines **cloud computing** as a model for enabling convenient, on-demand network access to a shared pool of configurable computing resources that can be rapidly provisioned and released with minimal management effort or provider interaction. The model is composed of five essential characteristics:

1. **On-demand self-service.** You provision resources (servers, storage, a database) yourself, through a web console or an application programming interface (API), without a human at the provider in the loop.
2. **Broad network access.** Resources are available over the network and used through standard mechanisms from many kinds of client: laptops, phones, other servers.
3. **Resource pooling.** The provider serves many customers (**multi-tenancy**) from a pool of physical and virtual resources that it assigns and reassigns dynamically. You usually don't know or choose the exact physical host, though you can often choose a broader location such as a country or a datacentre region.
4. **Rapid elasticity.** Capacity can be provisioned and released quickly, in some cases automatically, to scale out and in with demand. To you the available capacity looks unlimited.
5. **Measured service.** The system meters usage (storage, processing, bandwidth, active user accounts) and optimises resources automatically. Usage can be monitored, controlled and reported, which makes billing by consumption possible.

<figure class="diagram" style="--dg-w: 1040px"><svg xmlns="http://www.w3.org/2000/svg" class="dg" viewBox="0 0 1040 320" width="1040" height="320" role="img" aria-labelledby="cloud-characteristics-title cloud-characteristics-desc" font-family="Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif" xml:lang="en">
<title id="cloud-characteristics-title">The five essential characteristics of cloud computing</title>
<desc id="cloud-characteristics-desc">Five cards, one for each essential characteristic in NIST SP 800-145. On-demand self-service: you provision servers or storage yourself, without talking to a salesperson. Broad network access: services are reachable over the network from laptops, phones and other standard clients. Resource pooling: pooled hardware serves many tenants and you don&#x27;t pick the physical host. Rapid elasticity: capacity grows and shrinks quickly, often automatically, with demand. Measured service: usage is metered and reported, so you pay for what you consume. A sixth panel notes that not every rented server is cloud: without elasticity and metering it is just hosting.</desc>
<rect class="dg-bg" x="0.5" y="0.5" width="1039" height="319" rx="16" fill="#ffffff" stroke="#e3e3dd"/>
<rect class="dg-card" x="24" y="24" width="320" height="128" rx="12" fill="#ffffff" stroke="#cfcfc8"/>
<g class="dg-l1"><g class="dg-icon" transform="translate(40 40) scale(1.2500)" fill="none" stroke="#0369a1" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16"/></g></g>
<g class="dg-l1"><text x="82" y="61" font-size="15" class="dg-ink" fill="#0369a1" font-weight="700">On-demand self-service</text></g>
<text x="42" y="92" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">You provision servers or storage yourself,</text>
<text x="42" y="112" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">without talking to a salesperson</text>
<rect class="dg-card" x="360" y="24" width="320" height="128" rx="12" fill="#ffffff" stroke="#cfcfc8"/>
<g class="dg-l1"><g class="dg-icon" transform="translate(376 40) scale(1.2500)" fill="none" stroke="#0369a1" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect width="10" height="14" x="3" y="8" rx="2"/><path d="M5 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-2.4"/><path d="M8 18h.01"/></g></g>
<g class="dg-l1"><text x="418" y="61" font-size="15" class="dg-ink" fill="#0369a1" font-weight="700">Broad network access</text></g>
<text x="378" y="92" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">Reachable over the network from laptops,</text>
<text x="378" y="112" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">phones and other standard clients</text>
<rect class="dg-card" x="696" y="24" width="320" height="128" rx="12" fill="#ffffff" stroke="#cfcfc8"/>
<g class="dg-l1"><g class="dg-icon" transform="translate(712 40) scale(1.2500)" fill="none" stroke="#0369a1" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect width="7" height="7" x="3" y="3" rx="1"/><rect width="7" height="7" x="14" y="3" rx="1"/><rect width="7" height="7" x="14" y="14" rx="1"/><rect width="7" height="7" x="3" y="14" rx="1"/></g></g>
<g class="dg-l1"><text x="754" y="61" font-size="15" class="dg-ink" fill="#0369a1" font-weight="700">Resource pooling</text></g>
<text x="714" y="92" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">Pooled hardware serves many tenants;</text>
<text x="714" y="112" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">you don&#x27;t pick the physical host</text>
<rect class="dg-card" x="24" y="168" width="320" height="128" rx="12" fill="#ffffff" stroke="#cfcfc8"/>
<g class="dg-l1"><g class="dg-icon" transform="translate(40 184) scale(1.2500)" fill="none" stroke="#0369a1" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"/></g></g>
<g class="dg-l1"><text x="82" y="205" font-size="15" class="dg-ink" fill="#0369a1" font-weight="700">Rapid elasticity</text></g>
<text x="42" y="236" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">Capacity grows and shrinks quickly,</text>
<text x="42" y="256" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">often automatically, with demand</text>
<rect class="dg-card" x="360" y="168" width="320" height="128" rx="12" fill="#ffffff" stroke="#cfcfc8"/>
<g class="dg-l1"><g class="dg-icon" transform="translate(376 184) scale(1.2500)" fill="none" stroke="#0369a1" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z"/><path d="m14.5 12.5 2-2"/><path d="m11.5 9.5 2-2"/><path d="m8.5 6.5 2-2"/><path d="m17.5 15.5 2-2"/></g></g>
<g class="dg-l1"><text x="418" y="205" font-size="15" class="dg-ink" fill="#0369a1" font-weight="700">Measured service</text></g>
<text x="378" y="236" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">Usage is metered and reported, so</text>
<text x="378" y="256" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">you pay for what you consume</text>
<rect class="dg-panel" x="696" y="168" width="320" height="128" rx="12" fill="#f0f0ec"/>
<g class="dg-l4"><g class="dg-icon" transform="translate(712 184) scale(1.0833)" fill="none" stroke="#c2410c" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/></g></g>
<text x="750" y="204" font-size="13" class="dg-text" fill="#17171c" font-weight="700">Not every rented server is cloud:</text>
<text x="750" y="224" font-size="13" class="dg-text" fill="#17171c" font-weight="700">without elasticity and metering it is hosting</text>
<text x="714" y="260" font-size="12.5" class="dg-muted" fill="#5c5c68" font-weight="600" font-family="JetBrains Mono, ui-monospace, Menlo, Consolas, monospace">NIST SP 800-145</text>
</svg></figure>

*Figure 1. The five essential characteristics. A service that lacks several of them, such as a server rented by the year with a manual request for each change, is hosting rather than cloud.*

A quick test: if you rent a server by emailing a salesperson, wait two days, pay a fixed yearly fee and can't shrink it, it is hosting. If you launch it in two minutes from an API and are billed per second until you delete it, it is cloud.

> [!NOTE]
> NIST SP 800-145 also lists three service models and four deployment models, which the next sections cover. It doesn't mention Function as a Service (FaaS) or multicloud, which became common later. Their meaning comes from later industry usage and provider documentation rather than from this definition.

> [!CHECK]
> A company rents a physical server from a hosting firm. Every change (more RAM, a new disk) needs a support ticket and takes a few days, and the price is a fixed amount per year. Which essential characteristics is this arrangement missing?
>
> - [ ] Broad network access, because the server can't be reached from the Internet
> - [ ] Resource pooling, because a physical server can only have one tenant
> - [x] On-demand self-service, rapid elasticity and measured service
> - [ ] None: any rented server counts as cloud computing
>
> Slow, manual changes break self-service and elasticity, and a flat annual fee means usage isn't metered. The server is reachable over the network, so broad network access is not the gap.

### Service models: IaaS, PaaS, SaaS and FaaS
Imagine getting a pizza dinner. You can buy the ingredients and cook at home (you do everything), rent a kitchen (the building, oven and gas are provided, you cook), order a pizza for delivery (you set the table) or go to a restaurant (you just eat). The more you hand over, the less you control and the less you have to do. Cloud **service models** are the same ladder.

- **Infrastructure as a Service (IaaS).** The provider supplies virtualised compute, storage and networking. You get a virtual machine (VM) and manage everything from the operating system (OS) up: patches, runtime, application, data. Use it when you need full control or must run software that expects a specific operating system.
- **Platform as a Service (PaaS).** The provider also runs the operating system and the runtime. You deploy your own code (or a container) and your configuration; the platform handles patching, scaling and often built-in monitoring. Use it to run your own applications without managing servers.
- **Software as a Service (SaaS).** The provider runs the whole application. You use it through a browser or app and configure it: users, permissions, settings. Use it for commodity needs (email, office documents, customer relationship management) where building your own has no value.
- **Function as a Service (FaaS).** You upload small pieces of code, called functions, that run in response to events (an HTTP request, a file upload, a timer). The provider runs them on demand, scales them from zero to many instances and bills for the number of executions and the time they run. FaaS is a form of **serverless** computing: you don't manage servers, and idle code costs nothing. Typical limits are a maximum run time per execution and a startup delay (**cold start**) when no instance is warm.

> [!NOTE]
> "Serverless" doesn't mean there are no servers; it means you don't provision or manage them. The term also covers managed services such as databases and queues that scale to zero and bill per use, not only FaaS.

Where does each model sit? The figure shows seven layers and who manages each one.

<figure class="diagram" style="--dg-w: 1040px"><svg xmlns="http://www.w3.org/2000/svg" class="dg" viewBox="0 0 1040 460" width="1040" height="460" role="img" aria-labelledby="cloud-service-models-title cloud-service-models-desc" font-family="Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif" xml:lang="en">
<title id="cloud-service-models-title">Who manages each layer in each service model</title>
<desc id="cloud-service-models-desc">A grid with seven layers as rows and five models as columns: on-premises, IaaS, PaaS, FaaS and SaaS. Data and access control is managed by you in all five. The application is yours on-premises, IaaS, PaaS and FaaS (your code), and the provider&#x27;s in SaaS. Runtime and middleware and the operating system are yours on-premises and in IaaS and the provider&#x27;s in PaaS, FaaS and SaaS. Virtualisation, servers and storage, and network and datacentre are yours on-premises and the provider&#x27;s in IaaS, PaaS, FaaS and SaaS.</desc>
<rect class="dg-bg" x="0.5" y="0.5" width="1039" height="459" rx="16" fill="#ffffff" stroke="#e3e3dd"/>
<text x="332" y="46" font-size="16" class="dg-text" fill="#17171c" font-weight="700" text-anchor="middle">On-premises</text>
<text x="332" y="66" font-size="12" class="dg-muted" fill="#5c5c68" font-weight="500" text-anchor="middle">you run it all</text>
<text x="480" y="46" font-size="16" class="dg-text" fill="#17171c" font-weight="700" text-anchor="middle">IaaS</text>
<text x="480" y="66" font-size="12" class="dg-muted" fill="#5c5c68" font-weight="500" text-anchor="middle">virtual machines</text>
<text x="628" y="46" font-size="16" class="dg-text" fill="#17171c" font-weight="700" text-anchor="middle">PaaS</text>
<text x="628" y="66" font-size="12" class="dg-muted" fill="#5c5c68" font-weight="500" text-anchor="middle">app platform</text>
<text x="776" y="46" font-size="16" class="dg-text" fill="#17171c" font-weight="700" text-anchor="middle">FaaS</text>
<text x="776" y="66" font-size="12" class="dg-muted" fill="#5c5c68" font-weight="500" text-anchor="middle">functions</text>
<text x="924" y="46" font-size="16" class="dg-text" fill="#17171c" font-weight="700" text-anchor="middle">SaaS</text>
<text x="924" y="66" font-size="12" class="dg-muted" fill="#5c5c68" font-weight="500" text-anchor="middle">finished application</text>
<text x="24" y="109" font-size="13.5" class="dg-text" fill="#17171c" font-weight="600">Data and access control</text>
<g class="dg-l4"><rect class="dg-tint" x="262" y="84" width="140" height="40" rx="8" fill="#f8e8e2" stroke="#e4aa92" stroke-width="1.2"/><text x="332" y="109" font-size="13" class="dg-ink" fill="#c2410c" font-weight="700" text-anchor="middle">You</text></g>
<g class="dg-l4"><rect class="dg-tint" x="410" y="84" width="140" height="40" rx="8" fill="#f8e8e2" stroke="#e4aa92" stroke-width="1.2"/><text x="480" y="109" font-size="13" class="dg-ink" fill="#c2410c" font-weight="700" text-anchor="middle">You</text></g>
<g class="dg-l4"><rect class="dg-tint" x="558" y="84" width="140" height="40" rx="8" fill="#f8e8e2" stroke="#e4aa92" stroke-width="1.2"/><text x="628" y="109" font-size="13" class="dg-ink" fill="#c2410c" font-weight="700" text-anchor="middle">You</text></g>
<g class="dg-l4"><rect class="dg-tint" x="706" y="84" width="140" height="40" rx="8" fill="#f8e8e2" stroke="#e4aa92" stroke-width="1.2"/><text x="776" y="109" font-size="13" class="dg-ink" fill="#c2410c" font-weight="700" text-anchor="middle">You</text></g>
<g class="dg-l4"><rect class="dg-tint" x="854" y="84" width="140" height="40" rx="8" fill="#f8e8e2" stroke="#e4aa92" stroke-width="1.2"/><text x="924" y="109" font-size="13" class="dg-ink" fill="#c2410c" font-weight="700" text-anchor="middle">You</text></g>
<text x="24" y="155" font-size="13.5" class="dg-text" fill="#17171c" font-weight="600">Application</text>
<g class="dg-l4"><rect class="dg-tint" x="262" y="130" width="140" height="40" rx="8" fill="#f8e8e2" stroke="#e4aa92" stroke-width="1.2"/><text x="332" y="155" font-size="13" class="dg-ink" fill="#c2410c" font-weight="700" text-anchor="middle">You</text></g>
<g class="dg-l4"><rect class="dg-tint" x="410" y="130" width="140" height="40" rx="8" fill="#f8e8e2" stroke="#e4aa92" stroke-width="1.2"/><text x="480" y="155" font-size="13" class="dg-ink" fill="#c2410c" font-weight="700" text-anchor="middle">You</text></g>
<g class="dg-l4"><rect class="dg-tint" x="558" y="130" width="140" height="40" rx="8" fill="#f8e8e2" stroke="#e4aa92" stroke-width="1.2"/><text x="628" y="155" font-size="13" class="dg-ink" fill="#c2410c" font-weight="700" text-anchor="middle">You</text></g>
<g class="dg-l4"><rect class="dg-tint" x="706" y="130" width="140" height="40" rx="8" fill="#f8e8e2" stroke="#e4aa92" stroke-width="1.2"/><text x="776" y="155" font-size="13" class="dg-ink" fill="#c2410c" font-weight="700" text-anchor="middle">You</text></g>
<g class="dg-l1"><rect class="dg-tint" x="854" y="130" width="140" height="40" rx="8" fill="#e6f0f6" stroke="#8ebcd5" stroke-width="1.2"/><text x="924" y="155" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700" text-anchor="middle">Provider</text></g>
<text x="24" y="201" font-size="13.5" class="dg-text" fill="#17171c" font-weight="600">Runtime and middleware</text>
<g class="dg-l4"><rect class="dg-tint" x="262" y="176" width="140" height="40" rx="8" fill="#f8e8e2" stroke="#e4aa92" stroke-width="1.2"/><text x="332" y="201" font-size="13" class="dg-ink" fill="#c2410c" font-weight="700" text-anchor="middle">You</text></g>
<g class="dg-l4"><rect class="dg-tint" x="410" y="176" width="140" height="40" rx="8" fill="#f8e8e2" stroke="#e4aa92" stroke-width="1.2"/><text x="480" y="201" font-size="13" class="dg-ink" fill="#c2410c" font-weight="700" text-anchor="middle">You</text></g>
<g class="dg-l1"><rect class="dg-tint" x="558" y="176" width="140" height="40" rx="8" fill="#e6f0f6" stroke="#8ebcd5" stroke-width="1.2"/><text x="628" y="201" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700" text-anchor="middle">Provider</text></g>
<g class="dg-l1"><rect class="dg-tint" x="706" y="176" width="140" height="40" rx="8" fill="#e6f0f6" stroke="#8ebcd5" stroke-width="1.2"/><text x="776" y="201" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700" text-anchor="middle">Provider</text></g>
<g class="dg-l1"><rect class="dg-tint" x="854" y="176" width="140" height="40" rx="8" fill="#e6f0f6" stroke="#8ebcd5" stroke-width="1.2"/><text x="924" y="201" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700" text-anchor="middle">Provider</text></g>
<text x="24" y="247" font-size="13.5" class="dg-text" fill="#17171c" font-weight="600">Operating system</text>
<g class="dg-l4"><rect class="dg-tint" x="262" y="222" width="140" height="40" rx="8" fill="#f8e8e2" stroke="#e4aa92" stroke-width="1.2"/><text x="332" y="247" font-size="13" class="dg-ink" fill="#c2410c" font-weight="700" text-anchor="middle">You</text></g>
<g class="dg-l4"><rect class="dg-tint" x="410" y="222" width="140" height="40" rx="8" fill="#f8e8e2" stroke="#e4aa92" stroke-width="1.2"/><text x="480" y="247" font-size="13" class="dg-ink" fill="#c2410c" font-weight="700" text-anchor="middle">You</text></g>
<g class="dg-l1"><rect class="dg-tint" x="558" y="222" width="140" height="40" rx="8" fill="#e6f0f6" stroke="#8ebcd5" stroke-width="1.2"/><text x="628" y="247" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700" text-anchor="middle">Provider</text></g>
<g class="dg-l1"><rect class="dg-tint" x="706" y="222" width="140" height="40" rx="8" fill="#e6f0f6" stroke="#8ebcd5" stroke-width="1.2"/><text x="776" y="247" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700" text-anchor="middle">Provider</text></g>
<g class="dg-l1"><rect class="dg-tint" x="854" y="222" width="140" height="40" rx="8" fill="#e6f0f6" stroke="#8ebcd5" stroke-width="1.2"/><text x="924" y="247" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700" text-anchor="middle">Provider</text></g>
<text x="24" y="293" font-size="13.5" class="dg-text" fill="#17171c" font-weight="600">Virtualisation</text>
<g class="dg-l4"><rect class="dg-tint" x="262" y="268" width="140" height="40" rx="8" fill="#f8e8e2" stroke="#e4aa92" stroke-width="1.2"/><text x="332" y="293" font-size="13" class="dg-ink" fill="#c2410c" font-weight="700" text-anchor="middle">You</text></g>
<g class="dg-l1"><rect class="dg-tint" x="410" y="268" width="140" height="40" rx="8" fill="#e6f0f6" stroke="#8ebcd5" stroke-width="1.2"/><text x="480" y="293" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700" text-anchor="middle">Provider</text></g>
<g class="dg-l1"><rect class="dg-tint" x="558" y="268" width="140" height="40" rx="8" fill="#e6f0f6" stroke="#8ebcd5" stroke-width="1.2"/><text x="628" y="293" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700" text-anchor="middle">Provider</text></g>
<g class="dg-l1"><rect class="dg-tint" x="706" y="268" width="140" height="40" rx="8" fill="#e6f0f6" stroke="#8ebcd5" stroke-width="1.2"/><text x="776" y="293" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700" text-anchor="middle">Provider</text></g>
<g class="dg-l1"><rect class="dg-tint" x="854" y="268" width="140" height="40" rx="8" fill="#e6f0f6" stroke="#8ebcd5" stroke-width="1.2"/><text x="924" y="293" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700" text-anchor="middle">Provider</text></g>
<text x="24" y="339" font-size="13.5" class="dg-text" fill="#17171c" font-weight="600">Servers and storage</text>
<g class="dg-l4"><rect class="dg-tint" x="262" y="314" width="140" height="40" rx="8" fill="#f8e8e2" stroke="#e4aa92" stroke-width="1.2"/><text x="332" y="339" font-size="13" class="dg-ink" fill="#c2410c" font-weight="700" text-anchor="middle">You</text></g>
<g class="dg-l1"><rect class="dg-tint" x="410" y="314" width="140" height="40" rx="8" fill="#e6f0f6" stroke="#8ebcd5" stroke-width="1.2"/><text x="480" y="339" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700" text-anchor="middle">Provider</text></g>
<g class="dg-l1"><rect class="dg-tint" x="558" y="314" width="140" height="40" rx="8" fill="#e6f0f6" stroke="#8ebcd5" stroke-width="1.2"/><text x="628" y="339" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700" text-anchor="middle">Provider</text></g>
<g class="dg-l1"><rect class="dg-tint" x="706" y="314" width="140" height="40" rx="8" fill="#e6f0f6" stroke="#8ebcd5" stroke-width="1.2"/><text x="776" y="339" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700" text-anchor="middle">Provider</text></g>
<g class="dg-l1"><rect class="dg-tint" x="854" y="314" width="140" height="40" rx="8" fill="#e6f0f6" stroke="#8ebcd5" stroke-width="1.2"/><text x="924" y="339" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700" text-anchor="middle">Provider</text></g>
<text x="24" y="385" font-size="13.5" class="dg-text" fill="#17171c" font-weight="600">Network and datacentre</text>
<g class="dg-l4"><rect class="dg-tint" x="262" y="360" width="140" height="40" rx="8" fill="#f8e8e2" stroke="#e4aa92" stroke-width="1.2"/><text x="332" y="385" font-size="13" class="dg-ink" fill="#c2410c" font-weight="700" text-anchor="middle">You</text></g>
<g class="dg-l1"><rect class="dg-tint" x="410" y="360" width="140" height="40" rx="8" fill="#e6f0f6" stroke="#8ebcd5" stroke-width="1.2"/><text x="480" y="385" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700" text-anchor="middle">Provider</text></g>
<g class="dg-l1"><rect class="dg-tint" x="558" y="360" width="140" height="40" rx="8" fill="#e6f0f6" stroke="#8ebcd5" stroke-width="1.2"/><text x="628" y="385" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700" text-anchor="middle">Provider</text></g>
<g class="dg-l1"><rect class="dg-tint" x="706" y="360" width="140" height="40" rx="8" fill="#e6f0f6" stroke="#8ebcd5" stroke-width="1.2"/><text x="776" y="385" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700" text-anchor="middle">Provider</text></g>
<g class="dg-l1"><rect class="dg-tint" x="854" y="360" width="140" height="40" rx="8" fill="#e6f0f6" stroke="#8ebcd5" stroke-width="1.2"/><text x="924" y="385" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700" text-anchor="middle">Provider</text></g>
<g class="dg-l4"><rect class="dg-tint" x="24" y="418" width="26" height="18" rx="5" fill="#f8e8e2" stroke="#e4aa92" stroke-width="1.2"/></g>
<text x="60" y="432" font-size="12.5" class="dg-text" fill="#17171c" font-weight="500">You manage and secure it</text>
<g class="dg-l1"><rect class="dg-tint" x="258.0" y="418" width="26" height="18" rx="5" fill="#e1edf4" stroke="#8ebcd5" stroke-width="1.2"/></g>
<text x="294" y="432" font-size="12.5" class="dg-text" fill="#17171c" font-weight="500">The provider manages and secures it</text>
<text x="1016" y="432" font-size="12.5" class="dg-muted" fill="#5c5c68" font-weight="600" text-anchor="end">Data, identities and access settings stay with you in every model</text>
</svg></figure>

*Figure 2. Moving right, the provider takes over more layers. Data and access settings never move to the provider.*

| | IaaS | PaaS | FaaS | SaaS |
|---|---|---|---|---|
| You bring | OS images, software, data | Application code, data | Function code, event triggers | Users, settings, data |
| Control | Highest | Medium | Low | Lowest |
| Effort to operate | Highest | Medium | Low | Lowest |
| Billed by | VM size and time running, plus disks and traffic | Platform size or usage | Executions and run time | Users or subscription tier |
| Typical example workload | A legacy application with specific OS needs | A web application or API | Resizing an image after upload | Email, CRM, video meetings |
| Provider examples | Amazon EC2, Azure Virtual Machines, Google Compute Engine | Azure App Service, Google App Engine, Heroku | AWS Lambda, Azure Functions | Microsoft 365, Google Workspace, Salesforce |

The provider names are examples, not recommendations: every large provider and many smaller ones sell all four models, and product names change.

How to choose, in order:
1. Is there a SaaS product that meets the need? Use it. Building and operating your own email server is rarely a good use of time.
2. Is it your own code? If it is small, event-driven and bursty, consider FaaS. If it is a long-running web application or API, consider PaaS.
3. Do you need control of the operating system, special drivers, a licence tied to a machine, or software you can't change? Use IaaS.

Higher-level models trade control and portability for less work. A function written against one provider's event format is harder to move than a VM image.

> [!CHECK]
> A team has a nightly report generator in Python. It must run for about 3 minutes once a day, and nobody wants to patch or pay for a server that is idle 23 hours and 57 minutes. Which service model fits best?
>
> - [x] FaaS: run the code as a scheduled function billed per execution
> - [ ] IaaS: rent a small VM and keep it running all day
> - [ ] SaaS: buy a reporting subscription and move the code there
> - [ ] On-premises: buy a small server so there is no hourly cost
>
> Short, scheduled, event-driven code is the textbook FaaS case: there is nothing to patch and nothing is billed while it is idle. SaaS means using someone else's finished application, not running your own code.

### Deployment models: where the cloud runs and who can use it
Service models say *what* you consume. **Deployment models** say *who owns and runs the infrastructure and who can use it*. NIST defines four; a fifth is common in practice.

- **Public cloud.** The infrastructure is open for use by the general public. It is owned, managed and operated by a provider (a business, academic or government organisation) and exists on the provider's premises.
- **Private cloud.** The infrastructure is provisioned for exclusive use by a single organisation with several consumers (for example, business units). It may be owned and run by the organisation, by a third party or both, and may be on or off premises. A private cloud is not just "our servers": to be a cloud it still needs the five characteristics, such as self-service and metering.
- **Community cloud.** The infrastructure serves a specific community of organisations with shared concerns, such as a mission, security requirements or regulation: a group of hospitals, or government agencies in one country.
- **Hybrid cloud.** A composition of two or more distinct cloud infrastructures (private, community or public) that remain separate but are bound by technology that enables data and application portability. A common form is a private cloud on premises connected to a public cloud (for example through a virtual private network (VPN) or a dedicated link), so that extra capacity can burst into the public side at peak times.
- **Multicloud.** You use services from two or more cloud providers. It's about *how many providers*, not about how they are connected, and it isn't one of the NIST models. Reasons include best-of-breed services, avoiding dependence on one provider, regulation and acquisitions. The price is complexity: different consoles, APIs, identity systems and skills.

<figure class="diagram" style="--dg-w: 1040px"><svg xmlns="http://www.w3.org/2000/svg" class="dg" viewBox="0 0 1040 364" width="1040" height="364" role="img" aria-labelledby="cloud-deployment-models-title cloud-deployment-models-desc" font-family="Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif" xml:lang="en">
<title id="cloud-deployment-models-title">Deployment models: public, private, community, hybrid and multicloud</title>
<desc id="cloud-deployment-models-desc">Five deployment models. Public cloud is open to the general public and owned and operated by the provider. Private cloud serves one organisation only and is run by it or by a third party. Community cloud is shared by organisations with common needs, for example hospitals. Hybrid cloud combines two different infrastructures, for example a private cloud on-premises or hosted and a public cloud in a provider&#x27;s region, connected by a VPN or private link so they work as one system. Multicloud uses several providers side by side, for example public cloud provider A and provider B, with your apps and data spread across them.</desc>
<rect class="dg-bg" x="0.5" y="0.5" width="1039" height="363" rx="16" fill="#ffffff" stroke="#e3e3dd"/>
<rect class="dg-card" x="24" y="24" width="320" height="112" rx="12" fill="#ffffff" stroke="#cfcfc8"/>
<g class="dg-l1"><g class="dg-icon" transform="translate(40 40) scale(1.2500)" fill="none" stroke="#0369a1" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"/></g></g>
<g class="dg-l1"><text x="82" y="61" font-size="15" class="dg-ink" fill="#0369a1" font-weight="700">Public cloud</text></g>
<text x="42" y="92" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">Open to the general public;</text>
<text x="42" y="112" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">the provider owns and operates it</text>
<rect class="dg-card" x="360" y="24" width="320" height="112" rx="12" fill="#ffffff" stroke="#cfcfc8"/>
<g class="dg-l7"><g class="dg-icon" transform="translate(376 40) scale(1.2500)" fill="none" stroke="#6d28d9" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="11" width="16" height="10" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></g></g>
<g class="dg-l7"><text x="418" y="61" font-size="15" class="dg-ink" fill="#6d28d9" font-weight="700">Private cloud</text></g>
<text x="378" y="92" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">One organisation only; run by</text>
<text x="378" y="112" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">it or by a third party</text>
<rect class="dg-card" x="696" y="24" width="320" height="112" rx="12" fill="#ffffff" stroke="#cfcfc8"/>
<g class="dg-l2"><g class="dg-icon" transform="translate(712 40) scale(1.2500)" fill="none" stroke="#15803d" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z"/><path d="M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2"/><path d="M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2"/><path d="M10 6h4"/><path d="M10 10h4"/><path d="M10 14h4"/><path d="M10 18h4"/></g></g>
<g class="dg-l2"><text x="754" y="61" font-size="15" class="dg-ink" fill="#15803d" font-weight="700">Community cloud</text></g>
<text x="714" y="92" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">Shared by organisations with</text>
<text x="714" y="112" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">common needs, e.g. hospitals</text>
<g class="dg-l3"><rect class="dg-tint" x="24" y="160" width="488" height="180" rx="16" fill="#faf5f0" stroke="#e1ba9d" stroke-width="1.2" stroke-dasharray="6 5"/>
<g class="dg-icon" transform="translate(40 173) scale(0.7500)" fill="none" stroke="#b45309" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1"/><path d="M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9"/><path d="M21 21v-2h-4"/><path d="M3 5h4V3"/><path d="M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3"/></g>
<text x="66" y="187" font-size="13" class="dg-ink" fill="#b45309" font-weight="700">Hybrid cloud</text></g>
<rect class="dg-card" x="44" y="210" width="166" height="82" rx="12" fill="#ffffff" stroke="#cfcfc8"/>
<g class="dg-l7"><g class="dg-icon" transform="translate(60 226) scale(1.2500)" fill="none" stroke="#6d28d9" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="11" width="16" height="10" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></g></g>
<g class="dg-l7"><text x="102" y="247" font-size="15" class="dg-ink" fill="#6d28d9" font-weight="700">Private cloud</text></g>
<text x="62" y="278" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">on-premises or hosted</text>
<rect class="dg-card" x="326" y="210" width="166" height="82" rx="12" fill="#ffffff" stroke="#cfcfc8"/>
<g class="dg-l1"><g class="dg-icon" transform="translate(342 226) scale(1.2500)" fill="none" stroke="#0369a1" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"/></g></g>
<g class="dg-l1"><text x="384" y="247" font-size="15" class="dg-ink" fill="#0369a1" font-weight="700">Public cloud</text></g>
<text x="344" y="278" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">a provider&#x27;s region</text>
<g class="dg-l3"><path class="dg-stroke" d="M212.0 251H324.0" stroke="#b45309" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></g>
<text x="268" y="273" font-size="11.5" class="dg-muted" fill="#5c5c68" font-weight="600" text-anchor="middle">VPN or private link</text>
<text x="268" y="326" font-size="12.5" class="dg-muted" fill="#5c5c68" font-weight="500" text-anchor="middle">Different infrastructures, connected to work as one system</text>
<g class="dg-l3"><rect class="dg-tint" x="528" y="160" width="488" height="180" rx="16" fill="#faf5f0" stroke="#e1ba9d" stroke-width="1.2" stroke-dasharray="6 5"/>
<g class="dg-icon" transform="translate(544 173) scale(0.7500)" fill="none" stroke="#b45309" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/></g>
<text x="570" y="187" font-size="13" class="dg-ink" fill="#b45309" font-weight="700">Multicloud</text></g>
<rect class="dg-card" x="548" y="210" width="166" height="82" rx="12" fill="#ffffff" stroke="#cfcfc8"/>
<g class="dg-l1"><g class="dg-icon" transform="translate(564 226) scale(1.2500)" fill="none" stroke="#0369a1" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"/></g></g>
<g class="dg-l1"><text x="606" y="247" font-size="15" class="dg-ink" fill="#0369a1" font-weight="700">Provider A</text></g>
<text x="566" y="278" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">public cloud</text>
<rect class="dg-card" x="830" y="210" width="166" height="82" rx="12" fill="#ffffff" stroke="#cfcfc8"/>
<g class="dg-l1"><g class="dg-icon" transform="translate(846 226) scale(1.2500)" fill="none" stroke="#0369a1" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"/></g></g>
<g class="dg-l1"><text x="888" y="247" font-size="15" class="dg-ink" fill="#0369a1" font-weight="700">Provider B</text></g>
<text x="848" y="278" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">public cloud</text>
<g class="dg-l3"><path class="dg-stroke" d="M716.0 251H828.0" stroke="#b45309" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></g>
<text x="772" y="273" font-size="11.5" class="dg-muted" fill="#5c5c68" font-weight="600" text-anchor="middle">your apps and data</text>
<text x="772" y="326" font-size="12.5" class="dg-muted" fill="#5c5c68" font-weight="500" text-anchor="middle">Several providers, used side by side</text>
</svg></figure>

*Figure 3. Public, private and community describe who the infrastructure is for; hybrid and multicloud describe combinations.*

The two combinations are easy to confuse. **Hybrid** joins *different kinds* of cloud (private plus public) so they work as one system. **Multicloud** uses *several providers*, usually all public, often for different workloads. You can be both: a private cloud on premises plus two public providers.

Data residency and legal requirements often drive the choice. Some regulations require certain data to stay in a country or under a specific legal regime; that can mean a private cloud, a community cloud, or a public cloud with a region in the right place.

> [!CHECK]
> A company runs its customer database in a private cloud in its own datacentre and rents extra web servers from a public provider for busy periods. The two are connected by a VPN. Which term describes this best?
>
> - [ ] Multicloud, because it uses two environments
> - [x] Hybrid cloud, because a private and a public cloud are connected and used together
> - [ ] Community cloud, because two parties are involved
> - [ ] Public cloud, because part of it is rented
>
> Hybrid joins different types of cloud infrastructure. Multicloud would mean using two or more providers, for example public clouds from two vendors.

### The shared responsibility model
When you rent an apartment, the landlord fixes the roof and the lifts; you lock your door and decide who gets a key. If a burglar walks through an unlocked door, you can't blame the landlord. The **shared responsibility model** says the same about cloud security: the provider secures *the cloud* (the facilities, hardware and the layers it operates), and you secure *what you put in it and how you configure it*. The line moves with the service model, as Figure 2 showed.

What the provider always handles, in every model: the physical datacentre (buildings, power, cooling, physical access), the hardware and the virtualisation layer (the hypervisor). What you always handle, in every model: your **data** (what you store, how you classify it), **identities and access** (who has accounts, what they may do, multi-factor authentication), and your own configuration choices.

| Responsibility | IaaS | PaaS | FaaS | SaaS |
|---|---|---|---|---|
| Physical security and hardware | Provider | Provider | Provider | Provider |
| Hypervisor and virtualisation | Provider | Provider | Provider | Provider |
| Operating system patches | **You** | Provider | Provider | Provider |
| Runtime and middleware patches | **You** | Provider | Provider | Provider |
| Application code and its vulnerabilities | **You** | **You** | **You** | Provider |
| Network controls (firewall rules, open ports) | **You** | **You** (shared) | **You** (limited) | Provider |
| Data classification, backups and retention choices | **You** | **You** | **You** | **You** |
| Identities, roles and multi-factor authentication | **You** | **You** | **You** | **You** |

Some cells are blurry on purpose. In SaaS, for example, the provider backs up its own platform, but if an employee deletes a mailbox, whether you can recover it depends on retention settings *you* chose or never chose. Each provider publishes its own responsibility matrix; read it for every service you use, because the exact split differs between providers and between services.

> [!IMPORTANT]
> The most common cloud breaches come from the customer's side of the line: storage left open to the Internet, access keys committed to a public code repository, accounts without multi-factor authentication. "It's in the cloud" never means "someone else secures it."

> [!CHECK]
> A company stores customer files in a SaaS file-sharing service. An employee sets a folder to "anyone with the link can view" and the link leaks. Who is responsible?
>
> - [ ] The provider, because SaaS means the provider runs everything
> - [ ] The provider, because it should have blocked public links
> - [x] The company, because data sharing settings and access control stay with the customer in every model
> - [ ] Nobody, because the file was shared by mistake
>
> Even in SaaS, the customer decides who can see its data. The provider secures the platform, but a permissive sharing setting is a customer-side configuration choice.

### The economics: CapEx, OpEx, elasticity and pay-as-you-go
Owning a car costs a lot at the beginning (the purchase) and a bit every month (fuel, insurance). Using taxis costs nothing up front and a fee per trip. Which is cheaper depends on how often you ride.

- **Capital expenditure (CapEx)** is money spent up front on assets that last: servers, network gear, a datacentre. You pay before you know how much you'll use, size for the peak, and write it off over several years.
- **Operational expenditure (OpEx)** is money spent as you go on running costs: subscriptions, electricity, rented capacity. Cloud turns much IT spending from CapEx into OpEx, because you rent instead of buy. How each is treated for accounting and tax depends on the country, so check with your finance team.
- **Pay-as-you-go** (or pay-per-use) billing is OpEx in its purest form: you pay for the units you consume, typically by the second, minute or hour, with no minimum term. Providers also offer discounts for commitments (a one- or three-year commitment to a certain level of use) and cheaper interruptible capacity; both trade flexibility for price.
- **Elasticity** is the ability to add and remove capacity as demand changes, so that you pay for what you need *now*. It is related to, but not the same as, **scalability**, the ability to handle growth at all. A system can scale to ten times its size over a year (scalable) yet need weeks to do so (not elastic).

The economic point is utilisation. If you buy servers for a Black Friday peak that lasts a day, they sit mostly idle the other 364. If you rent, you pay for the peak only while it lasts. If, on the other hand, your load is flat and high all year, owning can be cheaper than renting. You will calculate both cases in the lab.

Cloud also has costs that surprise newcomers: data leaving the provider's network (**egress**) is usually charged; forgotten resources keep billing; and commitment discounts can lock you in. Managing this is a discipline in itself, called **FinOps**.

> [!CHECK]
> A shop's website needs 2 servers on a normal day and 40 servers during a three-day sale each quarter. Which statement is correct?
>
> - [ ] Buying 40 servers is cheaper, because CapEx is always cheaper than OpEx
> - [x] Renting elastic capacity is likely cheaper, because you pay for 40 servers only during the sale
> - [ ] Renting 40 servers all year is cheapest, because you avoid any scaling mistakes
> - [ ] The cost is the same either way, because the total capacity used is the same
>
> Sizing for the peak means 38 servers idle most of the year, whether you own them or rent them non-stop. Elasticity makes the spare capacity cost nothing while it isn't needed.

### Regions and availability zones
Hardware fails, and so do buildings: a power cut, a flood, a fibre cut by a digger. A shop with one till has no till when it breaks; a shop with tills in different rooms stays open when one fails. Cloud providers organise their infrastructure the same way, in two levels.

- A **region** is a geographic area, such as a country or a metropolitan area, where the provider runs datacentres. Regions are far enough apart that a disaster in one doesn't affect another.
- An **availability zone (AZ)** is one or more datacentres inside a region with independent power, cooling and networking, connected to the other zones of the region by fast, low-latency links. If one zone goes down, the others keep running.

The exact definitions vary between providers (some use different names), so check the documentation of the one you use.

<figure class="diagram" style="--dg-w: 1070px"><svg xmlns="http://www.w3.org/2000/svg" class="dg" viewBox="0 0 1070 418" width="1070" height="418" role="img" aria-labelledby="cloud-regions-zones-title cloud-regions-zones-desc" font-family="Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif" xml:lang="en">
<title id="cloud-regions-zones-title">Regions and availability zones</title>
<desc id="cloud-regions-zones-desc">Region 1 contains three availability zones, each a separate datacentre with its own power, cooling and network, joined by low-latency links. Region 2 is a second region, shown with two availability zones, connected to Region 1 by a wide-area link with higher latency. Below, three columns show what each level of spread protects against: if a server or rack fails, run copies on several servers; if a datacentre fails, for example from a power cut or fire, spread across availability zones; if a whole region is unavailable, replicate to another region.</desc>
<rect class="dg-bg" x="0.5" y="0.5" width="1069" height="417" rx="16" fill="#ffffff" stroke="#e3e3dd"/>
<g class="dg-l1"><rect class="dg-tint" x="20" y="20" width="606" height="250" rx="16" fill="#f0f6f9" stroke="#9ac3d9" stroke-width="1.2" stroke-dasharray="6 5"/>
<g class="dg-icon" transform="translate(36 33) scale(0.7500)" fill="none" stroke="#0369a1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/></g>
<text x="62" y="47" font-size="13" class="dg-ink" fill="#0369a1" font-weight="700">Region 1</text></g>
<g class="dg-l7"><rect class="dg-tint" x="666" y="20" width="384" height="250" rx="16" fill="#f6f2fd" stroke="#c5a9f0" stroke-width="1.2" stroke-dasharray="6 5"/>
<g class="dg-icon" transform="translate(682 33) scale(0.7500)" fill="none" stroke="#6d28d9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/></g>
<text x="708" y="47" font-size="13" class="dg-ink" fill="#6d28d9" font-weight="700">Region 2</text></g>
<g class="dg-l2"><rect class="dg-tint" x="36" y="70" width="182" height="182" rx="16" fill="#f1f7f3" stroke="#a1ccb1" stroke-width="1.2" stroke-dasharray="6 5"/>
<g class="dg-icon" transform="translate(52 83) scale(0.7500)" fill="none" stroke="#15803d" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z"/><path d="M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2"/><path d="M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2"/><path d="M10 6h4"/><path d="M10 10h4"/><path d="M10 14h4"/><path d="M10 18h4"/></g>
<text x="78" y="97" font-size="13" class="dg-ink" fill="#15803d" font-weight="700">Availability zone 1</text></g>
<rect class="dg-card" x="48" y="110" width="158" height="100" rx="12" fill="#ffffff" stroke="#cfcfc8"/>
<g class="dg-l2"><g class="dg-icon" transform="translate(64 126) scale(1.2500)" fill="none" stroke="#15803d" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="8" x="2" y="2" rx="2"/><rect width="20" height="8" x="2" y="14" rx="2"/><path d="M6 6h.01"/><path d="M6 18h.01"/></g></g>
<g class="dg-l2"><text x="106" y="147" font-size="15" class="dg-ink" fill="#15803d" font-weight="700">Datacentre</text></g>
<text x="66" y="178" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">own power, cooling</text>
<text x="66" y="198" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">and network</text>
<g class="dg-l2"><rect class="dg-tint" x="232" y="70" width="182" height="182" rx="16" fill="#f1f7f3" stroke="#a1ccb1" stroke-width="1.2" stroke-dasharray="6 5"/>
<g class="dg-icon" transform="translate(248 83) scale(0.7500)" fill="none" stroke="#15803d" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z"/><path d="M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2"/><path d="M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2"/><path d="M10 6h4"/><path d="M10 10h4"/><path d="M10 14h4"/><path d="M10 18h4"/></g>
<text x="274" y="97" font-size="13" class="dg-ink" fill="#15803d" font-weight="700">Availability zone 2</text></g>
<rect class="dg-card" x="244" y="110" width="158" height="100" rx="12" fill="#ffffff" stroke="#cfcfc8"/>
<g class="dg-l2"><g class="dg-icon" transform="translate(260 126) scale(1.2500)" fill="none" stroke="#15803d" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="8" x="2" y="2" rx="2"/><rect width="20" height="8" x="2" y="14" rx="2"/><path d="M6 6h.01"/><path d="M6 18h.01"/></g></g>
<g class="dg-l2"><text x="302" y="147" font-size="15" class="dg-ink" fill="#15803d" font-weight="700">Datacentre</text></g>
<text x="262" y="178" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">own power, cooling</text>
<text x="262" y="198" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">and network</text>
<g class="dg-l2"><rect class="dg-tint" x="428" y="70" width="182" height="182" rx="16" fill="#f1f7f3" stroke="#a1ccb1" stroke-width="1.2" stroke-dasharray="6 5"/>
<g class="dg-icon" transform="translate(444 83) scale(0.7500)" fill="none" stroke="#15803d" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z"/><path d="M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2"/><path d="M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2"/><path d="M10 6h4"/><path d="M10 10h4"/><path d="M10 14h4"/><path d="M10 18h4"/></g>
<text x="470" y="97" font-size="13" class="dg-ink" fill="#15803d" font-weight="700">Availability zone 3</text></g>
<rect class="dg-card" x="440" y="110" width="158" height="100" rx="12" fill="#ffffff" stroke="#cfcfc8"/>
<g class="dg-l2"><g class="dg-icon" transform="translate(456 126) scale(1.2500)" fill="none" stroke="#15803d" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="8" x="2" y="2" rx="2"/><rect width="20" height="8" x="2" y="14" rx="2"/><path d="M6 6h.01"/><path d="M6 18h.01"/></g></g>
<g class="dg-l2"><text x="498" y="147" font-size="15" class="dg-ink" fill="#15803d" font-weight="700">Datacentre</text></g>
<text x="458" y="178" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">own power, cooling</text>
<text x="458" y="198" font-size="13" class="dg-muted" fill="#5c5c68" font-weight="500">and network</text>
<g class="dg-l2"><rect class="dg-tint" x="682" y="70" width="168" height="182" rx="16" fill="#f1f7f3" stroke="#a1ccb1" stroke-width="1.2" stroke-dasharray="6 5"/>
<g class="dg-icon" transform="translate(698 83) scale(0.7500)" fill="none" stroke="#15803d" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z"/><path d="M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2"/><path d="M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2"/><path d="M10 6h4"/><path d="M10 10h4"/><path d="M10 14h4"/><path d="M10 18h4"/></g>
<text x="724" y="97" font-size="13" class="dg-ink" fill="#15803d" font-weight="700">AZ 1</text></g>
<rect class="dg-card" x="694" y="110" width="144" height="64" rx="12" fill="#ffffff" stroke="#cfcfc8"/>
<g class="dg-l2"><g class="dg-icon" transform="translate(710 126) scale(1.2500)" fill="none" stroke="#15803d" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="8" x="2" y="2" rx="2"/><rect width="20" height="8" x="2" y="14" rx="2"/><path d="M6 6h.01"/><path d="M6 18h.01"/></g></g>
<g class="dg-l2"><text x="752" y="147" font-size="13.5" class="dg-ink" fill="#15803d" font-weight="700">Datacentre</text></g>
<g class="dg-l2"><rect class="dg-tint" x="866" y="70" width="168" height="182" rx="16" fill="#f1f7f3" stroke="#a1ccb1" stroke-width="1.2" stroke-dasharray="6 5"/>
<g class="dg-icon" transform="translate(882 83) scale(0.7500)" fill="none" stroke="#15803d" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z"/><path d="M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2"/><path d="M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2"/><path d="M10 6h4"/><path d="M10 10h4"/><path d="M10 14h4"/><path d="M10 18h4"/></g>
<text x="908" y="97" font-size="13" class="dg-ink" fill="#15803d" font-weight="700">AZ 2</text></g>
<rect class="dg-card" x="878" y="110" width="144" height="64" rx="12" fill="#ffffff" stroke="#cfcfc8"/>
<g class="dg-l2"><g class="dg-icon" transform="translate(894 126) scale(1.2500)" fill="none" stroke="#15803d" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="8" x="2" y="2" rx="2"/><rect width="20" height="8" x="2" y="14" rx="2"/><path d="M6 6h.01"/><path d="M6 18h.01"/></g></g>
<g class="dg-l2"><text x="936" y="147" font-size="13.5" class="dg-ink" fill="#15803d" font-weight="700">Datacentre</text></g>
<g class="dg-l2"><path class="dg-stroke" d="M127 234H519" stroke="#15803d" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/></g>
<g class="dg-l2"><rect class="dg-bg-plain" x="214.18" y="222" width="217.64" height="24" rx="12" fill="#ffffff"/><text x="323" y="238.5" font-size="11.5" class="dg-ink" fill="#15803d" font-weight="600" text-anchor="middle">low-latency links between zones</text></g>
<path class="dg-line" d="M628 160H664" stroke="#cfcfc8" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="7 6"/>
<text x="646" y="146" font-size="11.5" class="dg-muted" fill="#5c5c68" font-weight="700" text-anchor="middle">WAN</text>
<rect class="dg-panel" x="20" y="290" width="1030" height="108" rx="12" fill="#f0f0ec"/>
<text x="40" y="316" font-size="11" class="dg-muted" fill="#5c5c68" font-weight="700" letter-spacing="1.2">WHAT EACH LEVEL OF SPREAD PROTECTS AGAINST</text>
<g class="dg-l4"><g class="dg-icon" transform="translate(40 334) scale(1.0833)" fill="none" stroke="#c2410c" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/></g></g>
<text x="78" y="352" font-size="13" class="dg-text" fill="#17171c" font-weight="700">A server or rack fails</text>
<text x="78" y="372" font-size="12.5" class="dg-muted" fill="#5c5c68" font-weight="500">→ Run copies on several servers</text>
<g class="dg-l1"><g class="dg-icon" transform="translate(376.667 334) scale(1.0833)" fill="none" stroke="#0369a1" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z"/><path d="M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2"/><path d="M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2"/><path d="M10 6h4"/><path d="M10 10h4"/><path d="M10 14h4"/><path d="M10 18h4"/></g></g>
<text x="414.667" y="352" font-size="13" class="dg-text" fill="#17171c" font-weight="700">A datacentre fails (power, fire)</text>
<text x="414.667" y="372" font-size="12.5" class="dg-muted" fill="#5c5c68" font-weight="500">→ Spread across availability zones</text>
<g class="dg-l7"><g class="dg-icon" transform="translate(713.333 334) scale(1.0833)" fill="none" stroke="#6d28d9" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/></g></g>
<text x="751.333" y="352" font-size="13" class="dg-text" fill="#17171c" font-weight="700">A whole region is unavailable</text>
<text x="751.333" y="372" font-size="12.5" class="dg-muted" fill="#5c5c68" font-weight="500">→ Replicate to another region</text>
</svg></figure>

*Figure 4. Each level of spread protects against a bigger failure. Zones in a region are close, so replication between them is fast; regions are far apart, so it is slower.*

Choosing where to run:

| Level | Protects against | Cost of using it |
|---|---|---|
| Several servers in one zone | A server or rack failing | Little: more instances |
| Several zones in one region | A datacentre failing (power, fire, cooling) | Low latency between zones; some providers charge for traffic between zones |
| Several regions | A whole-region outage, or a disaster | Higher latency, more complexity, data transfer costs, often more money |

Which region you pick for a workload depends on four things: **data residency** (where the law lets the data live), **latency** (distance to your users), **service availability** (not every service exists in every region) and **price** (it varies by region).

> [!CHECK]
> A web application runs on two VMs, both in the same availability zone. The zone loses power for an hour. What happens?
>
> - [ ] Nothing: two VMs are always enough for high availability
> - [ ] The provider automatically moves both VMs to another region
> - [x] The application is down, because both VMs shared the same failure domain
> - [ ] Only one VM fails, because the other is a backup
>
> Two servers protect against a server failure, not against a zone failure. To survive a zone outage, you must place instances in at least two zones.

## How it works
What does "elastic, pooled, measured, self-service" look like in practice? Follow a request to launch a virtual machine, which is how an IaaS provider turns the five characteristics into a mechanism.

1. **Request.** You call the provider's API (directly, or through the web console or a command-line tool) and say: one VM, 2 virtual CPUs (vCPU), 8 GB of memory, in region R1, zone 2. You authenticate with your identity and a token. *(On-demand self-service, broad network access.)*
2. **Authorisation and quota.** The provider checks that you are allowed to do this and that you are within your account limits (quotas), which protect both you and the provider from runaway usage.
3. **Placement.** A scheduler looks at the pool of physical hosts in that zone and picks one with free capacity. Your VM shares the host with other customers' VMs, isolated by the hypervisor. *(Resource pooling.)*
4. **Provisioning.** The VM is created from an image, attached to a virtual network and a virtual disk, and given an address. This takes seconds to minutes. *(Rapid elasticity.)*
5. **Metering.** From the moment the VM runs, the provider records its usage: vCPU-seconds, disk gigabytes, network traffic. *(Measured service.)*
6. **Billing.** At the end of the billing period, the metered usage is multiplied by the prices and appears on your invoice. When you delete the VM, its capacity returns to the pool and the metering for it stops (disks and addresses may keep billing until you delete them too).

Scaling out is the same flow driven by software instead of by you: an **autoscaler** watches a metric (average CPU, requests per second) and calls the same API to add or remove instances.

> [!CHECK]
> In the flow above, which step lets the provider bill you for exactly what you used?
>
> - [ ] Authorisation and quota
> - [x] Metering
> - [ ] Placement
> - [ ] Provisioning
>
> Metering records consumption (for example vCPU-seconds), and billing multiplies those records by the price list. Quotas only limit how much you can use.

## Worked example
Riverside Vet Group (the invented organisation of the lab) wants to put its **online booking portal** in the cloud. Work through the four decisions in this lesson.

**1. Service model.** The portal is the group's own Python web application. No SaaS product does exactly what it needs, so it isn't SaaS. The team has no wish to patch an operating system, so it isn't IaaS. A web application that runs all day suits **PaaS**; they only deploy code.

**2. Deployment model.** Appointment data is personal data, but nothing requires an on-premises installation, and the portal must be reachable by clients from the Internet. A **public cloud** is fine, in a region inside their country to respect data-residency rules.

**3. Shared responsibility.** On PaaS the provider patches the operating system and runtime. The group still owns its application code and its vulnerabilities, the user accounts, multi-factor authentication for staff, backup and retention choices for the appointment data, and the settings of the platform (which ports and endpoints are public).

**4. Resilience.** The portal is business-critical during opening hours. A single zone would be the cheapest option, but the group wants to survive a datacentre failure, so the platform runs instances in two zones behind a load balancer. How much does the second zone buy? Suppose, for illustration, that one zone is available 99.9% of the time and the regional load balancer in front is available 99.99% of the time. If zones fail independently, at least one of *n* zones is up with probability 1 - (1 - 0.999)^n, and both the load balancer and a zone must work. This short script, which you can run with `python3`, computes it:

```python
HOURS_YEAR = 8760

def downtime(a):
    return HOURS_YEAR * 60 * (1 - a)

zone = 0.999          # one zone, assumed 99.9 percent (illustrative)
front = 0.9999        # the regional load balancer in front, assumed 99.99 percent

for n in (1, 2, 3):
    replicas = 1 - (1 - zone) ** n          # at least one of n independent zones is up
    total = front * replicas                # the load balancer AND a zone must both work
    print(f"{n} zone(s): {total:.6%} available, about {downtime(total):7.1f} minutes of downtime a year")
```

Expected output:
```text
1 zone(s): 99.890010% available, about   578.1 minutes of downtime a year
2 zone(s): 99.989900% available, about    53.1 minutes of downtime a year
3 zone(s): 99.990000% available, about    52.6 minutes of downtime a year
```

The second zone cuts expected downtime from about 9.6 hours to under an hour a year. The third zone adds almost nothing, because the load balancer in front (99.99%, about 52.6 minutes a year) is now the weakest link. The model assumes independent failures, which real systems only approximate: a bad deployment or a shared dependency takes down all zones at once.

> [!NOTE]
> The availabilities above are made-up round numbers for the exercise. Real providers publish their own service level agreements (SLAs); look up the figure for the exact service and configuration you use, and note that an SLA is a refund policy, not a guarantee.

**5. Cost.** The portal is busy on weekday mornings and almost idle at night, and a marketing email occasionally sends a spike of visitors. That is a spiky load profile, which favours renting elastic capacity over buying servers sized for the spike. The lab prices exactly this case.

## Common pitfalls
- **Treating "cloud" as one thing.** "We're in the cloud" says nothing about who patches or pays for what. Always name the service model *and* the deployment model.
- **Lift and shift, then expecting savings.** Moving a VM unchanged from your server room to IaaS keeps all the operating work and adds a metered bill. The savings come from elasticity and managed services, not from the move itself.
- **Assuming the provider secures your data.** The provider secures the platform it runs; you secure your data, identities and configuration (see the shared responsibility section).
- **One zone, "because it's cloud".** A single zone is a single point of failure. Resilience is something you design, by using more than one zone.
- **Confusing elasticity with scalability.** A system that can grow, but only after a week of manual work, doesn't have elasticity.
- **Ignoring the small-print costs.** Egress traffic, idle resources, premium storage tiers and support plans can be a large part of the bill. Set budgets and alerts from day one.
- **Mixing up hybrid and multicloud.** Hybrid is about connecting different kinds of cloud (private plus public); multicloud is about using more than one provider.
- **Choosing the model by fashion.** FaaS is not "more modern" than a VM; it is a better fit for some workloads and a worse one for others (long-running jobs, steady heavy load, special OS needs).

## Security considerations
Cloud changes who does the work of securing a system, not whether it must be done.

- **Identity is the new perimeter.** Resources are reachable through APIs from the Internet, so accounts and credentials are the main target. Use multi-factor authentication, least privilege (give each person and application only the permissions it needs), and separate roles for administration and daily work. Protect the account that owns the whole subscription like a master key.
- **Configuration errors cause most incidents.** Public storage, overly open network rules and default credentials are customer-side mistakes. Review settings regularly and use the provider's or an independent tool to detect risky configurations.
- **Secrets don't belong in code.** Access keys in a public repository are found by automated scanners within minutes. Keep secrets in a managed secrets store and rotate them.
- **Protect data in every model.** Classify it, encrypt it in transit and at rest, decide who holds the encryption keys, and test restores of backups. A SaaS provider's backup of its platform is not a substitute for your retention policy.
- **Know your multi-tenancy.** Isolation between tenants is a core provider responsibility, but for highly sensitive data, assess whether a private or community cloud is warranted.
- **Plan for provider incidents and exit.** Outages, account lock-outs and price changes happen. Keep backups you control, document how you would move away, and prefer open formats and standard interfaces where they cost little.
- **Compliance remains yours.** Providers publish certifications for their part (for example ISO/IEC 27001), but your own use must still meet the laws and standards that apply to you.

## Summary
- NIST SP 800-145 defines cloud computing by five essential characteristics: on-demand self-service, broad network access, resource pooling, rapid elasticity and measured service. Without them, a rented server is just hosting.
- IaaS gives you virtual infrastructure and you manage the OS upwards; PaaS runs the platform and you deploy code; SaaS delivers a finished application; FaaS (serverless) runs your functions on events and bills per execution. Prefer the highest level that meets the need.
- Deployment models say who the infrastructure is for: public, private, community. Hybrid combines different cloud kinds; multicloud uses several providers.
- Under the shared responsibility model the provider secures the cloud and you secure what you put in it. The split moves with the service model, but data, identities and access settings always stay with you.
- Cloud turns CapEx into OpEx. Elasticity and pay-as-you-go pay off for variable load; owning can win for steady, high load. Watch egress and idle resources.
- A region is a geographic area; an availability zone is an isolated datacentre (or group) within it. Spread across zones for datacentre failures and across regions for regional ones.

## Glossary
| Term | Definition |
|---|---|
| Cloud computing | A model for on-demand network access to a shared pool of configurable computing resources that can be rapidly provisioned and released with minimal management effort (NIST SP 800-145). |
| On-demand self-service | The ability to provision resources yourself, automatically, without human interaction with the provider. |
| Broad network access | Resources are available over the network through standard mechanisms to many types of client. |
| Resource pooling | The provider serves many consumers from a shared pool of resources that it assigns dynamically. |
| Multi-tenancy | Several customers (tenants) share the same physical resources, isolated from each other. |
| Rapid elasticity | Capacity can be provisioned and released quickly, sometimes automatically, to follow demand. |
| Measured service | Resource usage is metered and reported, which enables billing by consumption. |
| Service model | How much of the stack the provider manages for you: IaaS, PaaS, SaaS or FaaS. |
| Infrastructure as a Service (IaaS) | Virtualised compute, storage and networking; you manage the OS and everything above it. |
| Platform as a Service (PaaS) | A managed platform on which you deploy your own application code; the provider runs the OS and runtime. |
| Software as a Service (SaaS) | A complete application run by the provider and used through a browser or app. |
| Function as a Service (FaaS) | Event-driven functions run on demand by the provider and billed per execution and run time. |
| Serverless | A style of cloud service where you don't provision or manage servers and, ideally, pay nothing while idle. |
| Cold start | The extra delay when a function runs on a new instance because no warm instance was available. |
| Deployment model | Who owns and runs the infrastructure and who may use it: public, private, community, hybrid or multicloud. |
| Public cloud | Infrastructure open to the general public, owned and operated by a provider. |
| Private cloud | Infrastructure for exclusive use by a single organisation, run by it or by a third party. |
| Community cloud | Infrastructure shared by organisations with common concerns, such as regulation or mission. |
| Hybrid cloud | Two or more distinct cloud infrastructures that remain separate but are bound together to enable data and application portability. |
| Multicloud | Using services from two or more cloud providers. |
| Shared responsibility model | The division of security and operations duties between provider and customer; it changes with the service model. |
| Data residency | The requirement, often legal, that data is stored or processed in a specific country or region. |
| Capital expenditure (CapEx) | Up-front spending on long-lived assets such as servers. |
| Operational expenditure (OpEx) | Ongoing spending on running costs such as subscriptions and rented capacity. |
| Pay-as-you-go | Billing for the units actually consumed, with no up-front purchase or minimum term. |
| Elasticity | Adding and removing capacity quickly to match demand. |
| Scalability | The ability of a system to handle growth in load by adding resources. |
| Egress | Data leaving the provider's network, usually charged. |
| FinOps | The practice of managing and optimising cloud spending across engineering, finance and business teams. |
| Region | A geographic area where a provider runs datacentres, isolated from other regions. |
| Availability zone (AZ) | One or more datacentres in a region with independent power, cooling and networking, linked to the other zones by low-latency connections. |
| Autoscaler | Software that adds or removes instances automatically based on a metric. |
| Service level agreement (SLA) | A provider's published commitment about service availability, usually with a credit if it is missed. |
| Virtual machine (VM) | A software-emulated computer running on a physical host. |
| Application programming interface (API) | A programmatic interface; in cloud computing, how you and your tools create and manage resources. |

## Check your understanding
1. A friend says "my web hosting is cloud computing." Which three questions do you ask to decide whether it meets the NIST definition?
2. Place each workload on a service model and justify it: (a) a company intranet wiki you buy as a subscription, (b) a custom order-processing API, (c) a 20-year-old application that needs Windows Server 2012 and a hardware licence dongle, (d) a function that sends a welcome email when a user registers.
3. A hospital group wants to share an imaging platform among six hospitals, with strict health-data rules. Which deployment model fits, and why might they prefer it to a public cloud? What could still make a public cloud region acceptable?
4. For a PaaS web application, list five things the provider secures and five that you still secure.
5. Your finance team says "cloud is cheaper." Give one workload where that is likely true, one where it may not be, and say what you would measure to decide.
6. A critical application runs on three VMs in one availability zone and has a backup in the same region. Name two failures it can't survive and the cheapest design change for each.

## References
- [NIST SP 800-145](https://csrc.nist.gov/pubs/sp/800/145/final) — The NIST Definition of Cloud Computing.
- [NIST SP 500-292](https://www.nist.gov/publications/nist-cloud-computing-reference-architecture) — NIST Cloud Computing Reference Architecture.
- [ISO/IEC 22123-1](https://www.iso.org/standard/80350.html) — Cloud computing: Vocabulary.
- [Cloud Security Alliance](https://cloudsecurityalliance.org/) — Security guidance for cloud computing.
- Your provider's shared responsibility documentation (every major provider publishes one).