Cloud providers sell reliability, but they do not give it automatically. You get it by building your system in the right way across the right places, and you pay for it. This lesson explains the vocabulary that every cloud course and interview uses: regions and zones, scaling, high availability, fault tolerance and disaster recovery, how cloud prices work, and the shared responsibility model that says who is in charge of security. The words are the same in AWS, Azure and Google Cloud, although the product names differ.
Why do we need it?
Apps fail: servers break, data centres lose power. Regions, zones, backups and good design keep services running and under budget, and the shared responsibility model tells you what you must secure yourself.
A real-life example
A chain of shops keeps stock in more than one warehouse, in different towns. If one floods, the other still delivers. Regions and zones are the warehouses, and the insurance plan (backups, disaster recovery) is the plan for the day something big goes wrong.
Regions and availability zones
- A region is a geographic area where the provider has data centres, for example Mumbai, London, Montreal or Cape Town. You choose a region for each resource. Pick one near your users to reduce delay, and check the law: some data must stay in a particular country. Prices and the list of services also differ by region.
- An availability zone (AZ) is one or more separate data centres inside a region, with their own power, cooling and network. Zones are close enough to talk fast and far enough that a fire or power cut in one does not take the others. Azure and Google Cloud use the same idea with their own names.
The usual pattern for a reliable application is to run copies in at least two zones of one region. If one zone fails, the others keep going. Not every region has the same number of zones, and the exact count changes, so look at your provider’s page when you plan.
Scalability and elasticity
- Scalability is the ability to handle more load. Vertical scaling means a bigger machine (more CPU and memory). It is simple, but has a limit, and often needs a restart. Horizontal scaling means more machines of the same size behind a load balancer. It has no real limit and is the usual cloud approach, but your application must work with several copies at once, which means keeping session data and files outside the individual server.
- Elasticity is scaling automatically, up when load rises and down when it falls, so you do not pay for idle machines. Auto scaling groups and Kubernetes autoscalers do this.
High availability, fault tolerance and disaster recovery
- High availability (HA) means the service stays up despite failures, with only a short interruption at most. You get it by removing single points of failure: two or more copies, in different zones, behind a load balancer, with health checks.
- Fault tolerance goes further: the system continues without any visible interruption when a part fails. It is more expensive, because it needs full spare capacity running all the time.
- Disaster recovery (DR) is the plan for a big failure, for example a whole region lost, a bad deployment that damages data, or an attack. It relies on backups and a way to rebuild elsewhere.
Two numbers define a DR plan, and you will hear them in interviews. RPO, recovery point objective, is how much data you can afford to lose, measured as time: with an RPO of one hour, you need a backup at least hourly. RTO, recovery time objective, is how long you can afford to be down. Lower numbers cost more. Typical strategies, from cheapest and slowest to dearest and fastest, are backup and restore, pilot light (a small core always running), warm standby (a scaled-down full copy) and active-active (full copies in several regions serving users all the time).
How cloud pricing works
- Pay-as-you-go (on demand): you pay for what you use, by the second, minute or hour, with no commitment. It is the most flexible and the most expensive per unit.
- Commitments: you promise to use a certain amount for a year or three in return for a lower price. AWS calls them Savings Plans and Reserved Instances. Azure and Google Cloud have similar offers.
- Spot or preemptible capacity: spare capacity at a big discount, which the provider can take back at short notice. Good for jobs that can be interrupted.
- Free tiers and credits: most providers give a small free allowance or trial credit for new accounts. Terms change often, so read the current offer.
Bills usually have several parts: compute time, storage, requests, and data transfer. Data leaving the provider to the internet is charged, while data coming in is often free. Surprises tend to come from things left running, large data transfers, idle but paid resources (such as unattached disks and public addresses) and logs that grow without limit. Protect yourself with a budget alert on day one, tags that show which project owns each resource, and a habit of deleting practice resources when you finish.
The shared responsibility model
When you use the cloud, security is shared. The provider is responsible for security of the cloud: the buildings, the hardware, the network and the virtualization layer. You are responsible for security in the cloud: your data, your accounts and permissions, your network rules, the operating system on a VM you manage, and your application code. How much falls on you depends on the model. With IaaS, you patch the operating system. With a managed database, the provider patches it, but you still decide who can connect to it and which data it holds.
- Most cloud data leaks come from the customer side: a storage bucket left public, an access key committed to Git, a database open to the whole internet, or a powerful account without multi-factor authentication.
- Protect the root or owner account with MFA, give people individual accounts, and grant only the access they need.
- Turn on logging of who did what, so you can investigate.
Architecture diagram
Here is the idea as a simple picture. You can use the same diagram in your own notes.
flowchart TB
subgraph Region
subgraph ZA[Zone A]
A1[App copy 1]
end
subgraph ZB[Zone B]
A2[App copy 2]
end
LB[Load balancer] --> A1
LB --> A2
A1 --> DB[(Primary DB)]
DB --> SB[(Standby DB)]
end
DB --> BK[(Backups in another region)]
How to check it worked
- You can explain the difference between a region and an availability zone.
- You can explain RPO and RTO with an example.
- You can name three things that are always the customer’s responsibility in the cloud.
How companies use it
Production systems run in at least two zones, keep backups in another region and track recovery targets. FinOps teams watch bills, use commitments for steady loads and spot capacity for flexible jobs.
Common errors and how to fix them
- Everything in one zone. One failure takes the app down. Spread over at least two zones.
- Backups never tested. Practice restores and time them.
- Surprise data transfer cost. Check pricing of traffic leaving the provider and between regions.
- Wrong region for data rules. Choose regions that meet legal needs.
- Public storage bucket. It is your responsibility under shared responsibility.
Best practices
- Design for failure.
- Test restores.
- Tag resources by project.
- Set budgets and alerts.
- Define RPO and RTO for each service.
Interview questions with simple answers
- Region vs availability zone? A region is a geographic area. A zone is a separate data centre inside it.
- What is high availability? Staying up despite failures by removing single points of failure.
- HA vs fault tolerance? Fault tolerance has no visible interruption and costs more.
- What is RPO? How much data you can lose, measured as time.
- What is RTO? How long you can be down.
- Name DR strategies. Backup and restore, pilot light, warm standby, active-active.
- What is shared responsibility? The provider secures the cloud; you secure what you put in it.
- Vertical vs horizontal scaling? Bigger machine vs more machines.
- On-demand vs reserved? Pay as you go vs commit for a discount.
- What are spot instances? Spare capacity at a discount that can be taken back.
Practical exercises
Try each one yourself before you look at the hint. Struggling for a few minutes is how the skill sticks.
- Find your provider’s nearest region and its zone count. Hint: The provider region page.
- Draw a two-zone web app. Hint: Use the diagram.
- Write an RPO and RTO for a shop website. Hint: Orders per hour.
- List three bill surprises and how to prevent each. Hint: Idle disks, data transfer, logs.
- Name three things that are always your responsibility. Hint: Data, accounts, public settings.
Mini project: Resilience plan
Write a two-page plan for a small web app: zones, backups, RPO and RTO, a restore test schedule and a monthly cost estimate method.
Knowledge test
Answer the ten questions in the quiz at the end of this lesson. You pass with 60 percent. If an answer is wrong, read the explanation, then reread the part of the lesson it points to.