Cloud Concepts
Cloud computing means renting computing resources (servers, storage, databases, networking) over the internet from a provider, paying for what you use instead of buying hardware. The main providers are Amazon Web Services, Microsoft Azure and Google Cloud.
Regions and availability
- A region is a geographic area, such as “West Europe”, containing cloud data centres. Choose one close to your users (lower latency) that satisfies legal requirements about where data may be stored.
- An availability zone is a separate data centre, or group of them, within a region, with independent power and networking. Running copies of an application in several zones lets it survive the loss of one.
- Availability is the share of time a service works. Redundancy, running more than one copy, is the usual way to raise it.
Scalability and elasticity
- Vertical scaling (scale up) gives one machine more CPU or memory. It is simple but limited.
- Horizontal scaling (scale out) adds instances behind a load balancer. The application must not keep important state in one instance (see State Management).
- Elasticity means adding and removing capacity automatically as load changes.
Service models
| Model | You manage | Provider manages | Example |
|---|---|---|---|
| IaaS (infrastructure) | OS, runtime, app | Hardware, virtualisation | Virtual machines |
| PaaS (platform) | App and its data | OS, runtime, scaling | Managed web app hosting |
| SaaS (software) | Your use of it | Everything | Email, issue trackers |
Managed services, such as a hosted database, queue or cache, hand patching, backups and failover to the provider. You give up some control and pay a bill, and you do less operational work.
Responsibilities, cost and lock-in
- Responsibility is shared. The provider secures its infrastructure, but you must configure your accounts, access and data correctly (see Secrets Management).
- Pricing is usage-based, so a forgotten resource costs real money.
- Infrastructure as Code defines infrastructure in versioned files.
- Cloud services are reached over a network, so the issues in Distributed Systems Basics apply. Provider-specific services can also make moving away harder.
Compute is usually offered as VMs, containers or functions.
Try it
Find the cloud region closest to you in a provider’s region list, and note how many availability zones it has.
Common mistakes
- Keeping important state in one instance, which blocks scaling out.
- Leaving forgotten resources running, since pricing is usage-based.
- Assuming the provider secures your accounts and data for you.
Check yourself
- What is the difference between a region and an availability zone?
- When would you scale horizontally instead of vertically?
- What do you manage under IaaS that you do not under PaaS?