Availability

Availability is counted in nines, and each nine is ten times harder

Promised availabilitydowntime that still keeps the promise, in one year99%two nines3 days 16 hours99.9%three nines8 hours 46 minutes99.99%four nines53 minutes99.999%five nines5 minutesAvailability is counted in nines, and each extra nine allows ten times less downtime.A service promised at 99.9% may be down nearly nine hours a year and still have kept its word. Each furthernine costs far more than the last: more copies, more zones, more automation. So the question is never “howavailable can it be?” but “how much downtime can this system afford?” A payroll run and a payment page differ.

Availability is the share of time a system works. 99.9% allows nearly nine hours of downtime a year; 99.99% allows 53 minutes.

Availability · Going deeper

Service level agreements, and how availability combines

In a chain, every part must workBalancer99.99%Servers99.95%Database99.95%99.99% × 99.95% × 99.95%= 99.89%about 9 hours 38 minutes down a year: lower than its weakest partSide by side, only one must workZone a: 99.9%Zone b: 99.9%either will doboth down at once: 0.1% × 0.1%= 99.9999%about 32 seconds down a year: higher than either part aloneParts in a chain multiply availability down. The same part twice, side by side, multiplies it up.A service level agreement (SLA) is the provider’s written promise for one service, and the design decides whatyou really get. One virtual machine is promised at about 99.5 to 99.9%; machines spread across zones at 99.99%.If the provider misses its SLA you receive credit on the bill, not payment for the business you lost.

An SLA is a promised availability. Parts in series multiply it down; redundant parts multiply it up.

High availability

No single point of failure: two of everything, kept apart

One of everythingZone aOne serverOne databaseThree single points of failure: the server, the database, the zone.Lose any one and the site is down.Two of everything, in two zonesZone aprimary databaseZone bstandby databaseA server, a database or a whole zone can fail,and the other half carries on.High availability means no single point of failure: two of everything, kept apart.Hardware fails; in a large cloud something is failing every minute. A design is reliable when no one failure canstop it. Every piece here was built in an earlier lesson: zones (3), autoscaled servers (4), a load balancer (6),a database with a standby (7). Put together, they are the standard highly available application.

A single point of failure is any part whose loss stops the system. Remove them with redundancy across zones.

High availability · Going deeper · 1 of 2

High availability, fault tolerance and disaster recovery

High availabilityFault toleranceDisaster recoverySurvivesa failed machine or zonethe same, without a flickerthe loss of a whole regionHowspare copies, quick failoverfull duplicates, all workinga copy elsewhere, and a planUsers noticeseconds to a few minutesnothingminutes to hoursCostmoderatehighlow to very high: you chooseThree promises that sound alike: recover quickly, never stop at all, or come back after a catastrophe.High availability accepts a brief interruption while a standby takes over. Fault tolerance does not: every partis duplicated and running, so a failure changes nothing users can see, at roughly double the cost. Disasterrecovery is about the rare event that takes out everything in one place, and is planned separately.Most systems need the first, a few need the second, and every important system needs the third.

High availability recovers quickly, fault tolerance does not stop at all, and disaster recovery restores service after losing a region.

High availability · Going deeper · 2 of 2

The words the exams use

Fundamentals exams test a handful of terms for the benefits of cloud. Each has a precise meaning.

  • High availability the system keeps working despite failures, measured as a percentage of time.
  • Reliability it recovers from failures and keeps doing what it should. The cloud helps by letting you spread across zones and regions.
  • Scalability it can grow to meet demand. Vertical: a bigger machine. Horizontal: more machines.
  • Elasticity it grows and shrinks automatically as demand changes, so you do not pay for idle capacity.
  • Agility resources can be created and changed in minutes.
  • Predictability performance and cost can be forecast, using autoscaling, load balancing and cost tools.
  • Governance and manageability rules are applied automatically (policies, templates) and everything can be managed through a portal, a command line or code.
Scalability is the ability to grow; elasticity is doing it automatically in both directions. An exam answer that mentions “automatically” or “shrinks” is describing elasticity.

Disaster recovery

Two numbers define a recovery plan: data lost, and time down

02:0011:0015:00last backupdisaster9 hours of data, goneRecovery point objective (RPO)how much data you can afford to loseback in service4 hours downRecovery time objective (RTO)how long you can afford to be downA recovery plan is two numbers: how much data you may lose, and how long you may be down.RPO looks backward from the disaster to the last good copy: it is set by how often you back up or replicate.RTO looks forward to the moment service returns: it is set by how much is ready and waiting elsewhere.The business chooses both numbers for each system, and the smaller they are, the more the plan costs.

RPO is how much data you can afford to lose; RTO is how long you can afford to be down.

Disaster recovery · Going deeper

Four recovery strategies, from cheap and slow to instant

What waits in the second regiontime to recovercostBackup and restoreonly backups wait in the second regionhoursPilot lightdata copied live; servers defined but offtens of minutesWarm standbya small working copy, always runningminutesActive in two regionsa full copy, already serving userssecondsBars and dots show the order, not exact amounts.Four ways to prepare a second region: the more that is already running there, the faster you recover.Backup and restore is cheap and slow: everything is rebuilt from backups after the event. A pilot light keepsthe data current and the rest switched off. A warm standby runs a small copy that is scaled up when needed.Running fully in two regions costs double and barely notices a disaster. Match the strategy to the RTO and RPO.

Backup and restore, pilot light, warm standby and active in two regions trade cost against recovery time.

Monitoring

You cannot fix what you cannot see: metrics, logs and traces

Metricslimit 80%processor in usenumbers measured every minutethey say that something is wrongLogs10:42:07 GET /cart 20010:42:08 POST /pay 500 timeout10:42:08 retry 1 of 310:42:11 POST /pay 500 timeouta line written for every eventthey say what went wrongTracesweb3.0 spayments2.9 sdatabase2.8 sone request, timed through each servicethey say whereYou cannot fix what you cannot see. Three kinds of signal tell you that, what, and where.Every cloud service reports metrics automatically, and your applications add logs and traces. Together they arecalled observability. The services that collect them are Amazon CloudWatch, Azure Monitor and Google CloudMonitoring and Logging. Here the three agree: load rose, payments began timing out, and the database is the slow part.

Metrics show that something is wrong, logs show what, and traces show where.

Monitoring · Going deeper · 1 of 2

Alarms: a limit, a duration and an action

0 min15 min30 min45 min60 min100%50%processor in usealarm at 80%above the limit for 5 minutes: alarmthe alarm acts:it messages the team and adds two servers;two minutes later the load is fallingAn alarm watches a metric and acts when it crosses a limit: tell a person, or fix it automatically.Nobody watches a dashboard all night. An alarm names a metric, a limit and a duration, here over 80% for fiveminutes, so that a brief spike is ignored. Its actions can notify people, trigger autoscaling or restart amachine. Good alarms are few and each one means something must be done.

An alarm fires when a metric stays past a limit, then notifies people or triggers an automatic fix such as scaling out.

Monitoring · Going deeper · 2 of 2

The operations services, by the question each answers

The questionAWSAzureGoogle CloudHow is my system behaving?CloudWatchAzure MonitorCloud Monitoring, Cloud LoggingWhere is a request slow?X-RayApplication InsightsCloud TraceWho changed what?CloudTrailActivity LogCloud Audit LogsIs the provider having trouble?AWS Health DashboardAzure Service HealthService HealthDoes my setup follow the rules?AWS ConfigAzure PolicySecurity Command CenterWhat should I improve?Trusted AdvisorAzure AdvisorRecommenderSix questions an operator asks, and the service on each provider that answers it.The pair most often confused on exams: CloudWatch watches performance (metrics, logs, alarms); CloudTrailrecords actions (who called which API). The health dashboards separate the provider’s problems from yours andshow planned maintenance that will affect your resources. Azure Advisor covers reliability, security,performance, cost and operations.

CloudWatch and Azure Monitor watch behaviour; CloudTrail and the Activity Log record actions; health dashboards report the provider’s own incidents.

Infrastructure as code

Describe the system in a file, and it can be rebuilt identically

shop.templatea text file, kept with the codenetwork: 10.0.0.0/16zones: 3servers: 4, behind a balancerdatabase: postgres, with standbyalarms: cpu over 80%The toolbuilds exactlywhat the file saysTestProductionRecovery regionInfrastructure as code: describe the whole system in a file, and build it the same way every time.Clicking in a console cannot be repeated exactly or reviewed. A template can: it is versioned like any code,checked by a colleague, and run to create identical environments, including a fresh copy in another regionafter a disaster. AWS CloudFormation, Azure Resource Manager templates and Bicep, and Terraform on any cloud.

Infrastructure as code defines networks, servers and databases in a template that tools turn into real resources.

Infrastructure as code · Going deeper

Four ways to operate a cloud

Everything in a cloud is done through its API. There are four ways to call it, suited to different work.

  • The web console (portal) point and click in a browser. Best for learning, exploring and one-off checks.
  • The command line typed commands that can be saved in scripts: the AWS CLI, Azure CLI and Azure PowerShell, the gcloud CLI. Each provider also offers a browser-based shell with these tools installed: CloudShell, Azure Cloud Shell, Cloud Shell.
  • Software development kits (SDKs) libraries for calling the cloud from your own programs.
  • Infrastructure as code templates that declare the end state: CloudFormation, ARM templates and Bicep, Terraform.
Scripts say how to build something, step by step. Templates say what should exist, and the tool works out the steps, including what to change when the template is edited. That is why templates are preferred for anything that lasts.

Managing beyond one cloud

Azure Arc extends Azure’s management tools to servers in your own data centre and in other clouds. AWS Systems Manager and Google’s fleet tools do similar work for mixed estates.

Support plans

Support is a paid plan: you buy how fast an engineer answers

AWS support planthe worst case it coverstime until an engineer respondsBasicincluded with every accountbilling and account help; no engineersno technical supportDeveloperfor testing and learninga system is impairedwithin 12 hoursBusinessfor production workloadsa production system is downwithin 1 hourEnterprise On-Rampfor business-critical workloadsa business-critical system is downwithin 30 minutesEnterpriseadds a named account managera business-critical system is downwithin 15 minutesSupport is a paid plan, and what you buy is how fast a human engineer answers when things are worst.Documentation, forums and the health dashboard are free to all. Talking to an engineer is not. Anything runningin production should have a plan that answers within an hour, day or night. Azure’s plans are Basic, Developer,Standard and Professional Direct; Google’s are Standard, Enhanced and Premium. Plan names change: check the current list.

A support plan sets who you can contact and how fast they respond, from 12 hours down to 15 minutes.

Well-architected design

Six questions judge any design, and you can now answer them

A well-architected systemOperationalexcellenceCan you run it andchange it safely?lesson 10SecurityWho can reachwhat?lessons 2, 6, 8ReliabilityDoes it survivea failure?lessons 3, 7, 10PerformanceefficiencyIs each part the rightkind and size?lessons 4, 5, 7CostoptimisationDo you pay only forwhat you need?lessons 1, 9SustainabilityDoes it use as littleenergy as it can?lessons 1, 4Six questions judge any cloud design. After ten lessons you can answer each of them.These are the six pillars of the AWS Well-Architected Framework; Azure and Google Cloud publish frameworkswith nearly the same list. They are a checklist for reviewing a system, and they pull against each other:more reliability costs more, more security can slow teams down. Architecture is choosing the balance on purpose.

The Well-Architected Framework reviews a system against six pillars: operations, security, reliability, performance, cost and sustainability.

Well-architected design · Going deeper

The frameworks on each provider, and what to do next

All three providers publish a free framework and a review tool. They are the best next reading after this course.

The frameworks

  • AWS Well-Architected Framework six pillars, with the Well-Architected Tool in the console to review a workload against them.
  • Azure Well-Architected Framework five pillars: reliability, security, cost optimisation, operational excellence and performance efficiency. The Cloud Adoption Framework covers the move to the cloud itself.
  • Google Cloud Architecture Framework the same themes: operational excellence, security, reliability, cost and performance optimisation, with sustainability.

Where this course leads

  • A fundamentals exam AWS Certified Cloud Practitioner, Microsoft Azure Fundamentals (AZ-900) or Google Cloud Digital Leader. Each has its own course here, built on these ten lessons.
  • An associate exam Solutions Architect Associate or Azure Administrator (AZ-104), once the fundamentals are solid.
  • Practice open a free-tier account, set a budget alert first, and build the two-zone application from this lesson.

Lesson complete

You finished “Availability, monitoring and support”

Nicely done.

Open in a new tab