Lesson 1 of 4 Benefits of Cloud Services

Explaining High Availability and Scalability in the Cloud

This lesson explains high availability and service-level agreements, and the vertical and horizontal forms of scaling, including elasticity.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe high availability and interpret an SLA percentage.
  • Distinguish vertical scaling from horizontal scaling.
  • Explain elasticity and its benefit over on-premises capacity.

High availability and service-level agreements

High availability means designing a solution so that it remains accessible with as little downtime as possible, regardless of disruptions such as hardware failure, maintenance or a datacentre problem. Availability is usually expressed as a percentage of time. Azure publishes a service-level agreement (SLA) for each service: a formal commitment to a level of uptime, such as 99.9% or 99.99%, together with the service credits customers receive if Microsoft does not meet it.

Each extra nine reduces the permitted downtime by about ten times. The following table shows the approximate downtime each SLA allows, which helps when interpreting exam scenarios that quote an SLA.

SLADowntime per monthDowntime per year
99%About 7.2 hoursAbout 3.65 days
99.9%About 43.2 minutesAbout 8.76 hours
99.95%About 21.6 minutesAbout 4.38 hours
99.99%About 4.32 minutesAbout 52.6 minutes
99.999%About 26 secondsAbout 5.26 minutes

Azure achieves high availability through redundancy. A single VM has a lower SLA than two or more VMs spread across fault domains in an availability set, which in turn has a lower SLA than VMs spread across availability zones. Higher availability therefore usually means more instances and higher cost, and the right target depends on what downtime would cost the business. When an application depends on several services, its overall availability is lower than that of any one service, because a failure in any of them affects the whole.

Fill in the value

What an SLA allows

Exam skills 1.2.1

Work out the downtime that common SLA levels permit.

Log in to try this activity Interactive activities are free with an account.

Scalability: vertical and horizontal

Scalability is the ability to adjust resources to meet demand. If traffic suddenly increases, the system scales to handle it; when traffic drops, it scales back so that the organization stops paying for capacity it does not need. There are two directions of scaling.

Vertical scaling
Also calledScaling up or down
What changesThe capability of a resource: more or fewer CPUs, more or less memory
ExampleResizing a VM from 2 vCPUs to 8 vCPUs
LimitsLimited by the largest available size; often needs a restart
Horizontal scaling
Also calledScaling out or in
What changesThe number of resources: more or fewer VMs or instances
ExampleIncreasing a scale set from 3 to 10 VMs
LimitsNeeds an application that can run on several instances behind a load balancer

Horizontal scaling also improves availability, because several instances can survive the loss of one, which is why cloud-native applications are designed to scale out.

The following diagram contrasts the two directions of scaling.

Vertical compared with horizontal scaling. Scaling up or down changes the capability of a resource, such as resizing a virtual machine from 2 to 8 vCPUs; it is limited by the largest size and often needs a restart. Scaling out or in changes the number of resources, such as growing a scale set from 3 to 10 virtual machines behind a load balancer; it needs an application that runs on several instances, and it also improves availability.
Cloud-native applications are designed to scale out.
Sort into groups

Up or out?

Exam skills 1.2.1

Decide whether each change is vertical or horizontal scaling.

Log in to try this activity Interactive activities are free with an account.

Elasticity and autoscaling

When scaling happens automatically in response to demand, it is often called elasticity. Services such as Virtual Machine Scale Sets, Azure App Service and Azure Functions can add instances when a metric, such as average CPU, crosses a threshold, or on a schedule, and remove them when demand falls. Elasticity is a key benefit over on-premises infrastructure, where adding capacity means buying hardware weeks in advance and that capacity stays in place, and costs money, after the peak has passed.

True or false

Elasticity

Exam skills 1.2.1

Check how elasticity works in Azure and why it matters.

Log in to try this activity Interactive activities are free with an account.
Worked example

Scaling direction and availability

An online shop runs on two web servers behind a load balancer. During a holiday sale the servers reach 95% CPU, and the shop wants to add three more servers for the sale and remove them afterwards. Which kind of scaling is this, and how does it affect availability?

Adding servers is horizontal scaling (scaling out), and removing them afterwards is scaling in. Because the application already runs behind a load balancer, it can use more instances immediately, and having five instances rather than two also means that the loss of one server has less effect, so availability improves. Resizing the two servers to a larger VM size would be vertical scaling, which is limited by the largest size and does not add redundancy. If the change happened automatically when CPU rose, it would be an example of elasticity.

Check yourself

Roughly how much downtime per month does a 99.99% SLA allow?

Show answer

About 4.3 minutes. Each extra nine reduces permitted downtime about ten times; 99.9% allows about 43 minutes.

Exam Tips

Remember for the exam

  • SLAs express availability as a percentage; each extra nine allows about ten times less downtime.
  • Vertical scaling changes the size of a resource; horizontal scaling changes the number of resources.
  • Automatic scaling with demand is elasticity.
  • Redundancy increases availability and usually increases cost.