Platform Engineering · Lesson 155

The Azure Well-Architected Framework: Five Pillars, Trade-offs, and Sustainability

The Azure Well-Architected Framework has five pillars: reliability, security, cost optimization, operational excellence, and performance efficiency. Each pillar gives design principles, a numbered checklist, recommendations, and, unusually, the trade-offs it makes with the other pillars, because a choice that helps one often costs another. Sustainability is not a sixth pillar on Azure; it is separate guidance for sustainable workloads, with its own emissions tools. This lesson reviews one patient portal pillar by pillar, and shows two pillars skipped: a connection string in plain app settings that leaked, and hand-made portal changes with no way back.

Difficulty: Advanced · Know this first: Lesson 154, Lesson 147

What you will learn

By the end of this lesson you can work at four levels:

This page teaches it with a plain-language analogy, an animated diagram with normal and failure scenarios, a simulator, a quiz, basic, intermediate, advanced, and master checks, the expert detail ("Go deeper"), a production incident, a hands-on lab with commands and their output, and a production design exercise.

Run it as:

When it breaks, I check

One thing to remember

Where the time goes

This bar adds up hours of review work for one workload. It is a worked example, not a measurement. The security and operations hops are where skipped checklists turn into a breach and an outage.

Try it: which pillars are at risk?

Pick how the portal reaches its database, how it is deployed, and how its data tier is built. The verdict lists the pillars at risk and the monthly cost.

securitypillars at risk
£6.1kmonthly cost

Check yourself

Three questions. No score is saved anywhere — this is just you against the material.

Basic to master

Using the Azure framework grows in four levels: knowing the pillars, running the checklist, recording trade-offs and automating checks, and running reviews across subscriptions.

Basic — Know the five pillars

At the basic level you can name the pillars and where sustainability lives.

  • Reliability, security, cost optimization, operational excellence, performance efficiency.
  • Per pillar: design principles, a numbered checklist (RE, SE, CO, OE, PE), recommendations, trade-offs.
  • Sustainability: separate guidance for sustainable workloads.

Where it breaks: assuming the three clouds' frameworks are the same list with different logos.

Try it: Basic

Which checklist prefix belongs to operational excellence?

Now do it: Read the OE checklist for one workload.

Intermediate — Run the checklist

At the intermediate level you review a workload against each pillar's checklist.

  • Answer each item with evidence; read the service guides for the services you use.
  • Run the Azure Well-Architected Review assessment to score and track it.
  • Compare with Azure Advisor's recommendations on what is deployed.

Try it: Intermediate

Advisor shows no recommendations. Is the workload well-architected?

Now do it: Run both on one workload and compare.

Advanced — Record trade-offs, automate checks

At the advanced level decisions are recorded and enforced.

  • An architecture decision record for each accepted trade-off.
  • Azure Policy to enforce what the review decided (no public SQL, required tags, allowed SKUs).
  • Defender for Cloud and Advisor findings routed to the owning team.

Try it: Advanced

The review decided "no public network access on databases". How do you keep it true?

Now do it: Assign the built-in policy for SQL public network access in a test subscription.

Master — Reviews across subscriptions

At the master level the framework shapes the landing zone and every workload.

  • Landing zones from the Cloud Adoption Framework with policies that encode the pillars.
  • Workload reviews before go-live and yearly; assessment scores tracked per workload.
  • Sustainability guidance applied deliberately, with emissions reported next to cost.

Trade-off: strict policies at the management group stop drift and occasionally block a legitimate exception, so have a reviewed exemption process.

Try it: Master

A team needs an exception to a deny policy for a legacy app. What is the safe way?

Now do it: Create an exemption with an expiry in a test subscription.

Go deeper

Read-only checks that map to the pillars. They change nothing.

# Advisor recommendations by pillar (Azure CLI category names)
for c in HighAvailability Security Cost Performance OperationalExcellence; do
  echo "== $c"; az advisor recommendation list --category $c --query "[].{impact:impact, problem:shortDescription.problem}" -o table
done
# Secrets in plain app settings (look for passwords and connection strings)
az webapp config appsettings list -g rg-portal -n app-portal --query "[?contains(name, 'CONNECTION') || contains(name, 'PASSWORD')].name"
# Policy compliance summary for the subscription
az policy state summarize --query "results.{nonCompliantResources:nonCompliantResources, nonCompliantPolicies:nonCompliantPolicies}"
# Resources with no owner tag (cost optimization: financial responsibility)
az resource list --query "[?tags.owner == null].{name:name, type:type}" -o table

Each pillar's design principles, briefly:

Microsoft revises the wording; read the current pillar pages before a review. How the three clouds' frameworks line up:

AWSAzureGoogle Cloud
FrameworkAWS Well-Architected FrameworkAzure Well-Architected FrameworkGoogle Cloud Well-Architected Framework (called the Architecture Framework until 2024)
PillarsSix: operational excellence, security, reliability, performance efficiency, cost optimization, sustainabilityFive: reliability, security, cost optimization, operational excellence, performance efficiency; sustainability is separate guidanceSix: operational excellence; security, privacy, and compliance; reliability; cost optimization; performance optimization; sustainability
Inside each pillarDesign principles, best practices, and review questionsDesign principles, a checklist, recommendations, and trade-offs with the other pillarsPrinciples and recommendations
Specialised guidanceLenses (for example serverless, SaaS, machine learning, generative AI)Workload guidance (for example AI, mission-critical, SaaS) and service guides per Azure servicePerspectives (for example AI and ML, financial services)
Review toolAWS Well-Architected Tool: questions per pillar, high- and medium-risk issues, milestones, an APIAzure Well-Architected Review, an assessment in Microsoft Assessments, with a score and recommendations per pillarNo separate review tool; the framework's recommendations, Architecture Center, and Active Assist
Automated recommendationsTrusted Advisor (the number of checks depends on the support plan), Compute OptimizerAzure Advisor, grouped by reliability, security, performance, cost, and operational excellence, with an Advisor scoreActive Assist: Recommender (rightsizing, idle resources, IAM) and insights
Carbon dataCustomer Carbon Footprint ToolEmissions Impact Dashboard; carbon optimization in the portalCarbon Footprint, with export to BigQuery; low-carbon indicators per region
Policy and guardrailsOrganizations service control policies, AWS Config rules and conformance packsAzure Policy, initiatives, management groupsOrganization Policy, constraints, folders
Landing zone guidanceAWS Control Tower, the Landing Zone AcceleratorCloud Adoption Framework Azure landing zonesGoogle Cloud setup checklist and enterprise foundations blueprint

Where they differ, not just in names: Azure keeps sustainability out of its five pillars and in separate guidance; Google Cloud folds privacy and compliance into its security pillar; AWS has the most formal review process (questions, risk levels, milestones) in its own tool. The ideas line up closely; the services and the detail do not, so review a workload against the framework of the cloud it runs on, and use the others for ideas.

One time it broke

This is a composite of a failure pattern that keeps repeating; the details are illustrative. The settings file that left the building.

Timeline

  • Go-live − 1 weekThe review covers four pillars; security is left for the central security team's review "next month". The app uses a SQL login stored in app settings; the server allows public access from Azure services.
  • Go-live + 9 daysA developer exports the app settings to debug locally and commits the file to a personal public repository.
  • + 12 daysDefender for SQL alerts on logins from an unfamiliar Azure subscription. The team disables the login and blocks public access.
  • + 13 daysForensics, data-access analysis, notification to the privacy officer, and rotation of every secret in the subscription: about 30 hours of work.

What changed after

The app uses managed identity and a private endpoint, Azure Policy denies public network access on SQL servers in the landing zone, secret scanning runs on every repository, and no pillar is skipped in a go-live review.

Try it yourself, from scratch

Everything here runs on any Linux machine: your own laptop, WSL on Windows (run wsl --install in PowerShell once), or a small cloud VM. The Python needs only Python 3 and its standard library; check that you have it with python3 --version.

Before you start: The Azure CLI logged in with Reader on a subscription (az account show should answer).

1. Linux commands

Type each one, read what it prints, and compare it with the note above it.

  1. List Azure Advisor recommendations for each pillar; the CLI calls reliability "HighAvailability".

    for c in HighAvailability Security Cost Performance OperationalExcellence; do
      echo "== $c"
      az advisor recommendation list --category $c --query "[].{impact:impact, problem:shortDescription.problem}" -o table
    done

    Options: --category filters by pillar; --query keeps the impact and the problem text.

    Expect: A short table per category, or nothing where Advisor has no findings. Read-only: it lists or describes, and changes nothing.

  2. Find secrets kept in plain app settings (they belong in Key Vault, or nowhere, with managed identity).

    az webapp list --query "[].{name:name, rg:resourceGroup}" -o tsv | while read n g; do
      az webapp config appsettings list -n "$n" -g "$g" --query "[?contains(name, 'PASSWORD') || contains(name, 'CONNECTION')].name" -o tsv | sed "s/^/$n: /"
    done

    Expect: App names with setting names that look like secrets; values are not printed. Read-only: it lists or describes, and changes nothing.

  3. Summarise policy compliance for the subscription.

    az policy state summarize --query "results.{nonCompliantResources:nonCompliantResources, nonCompliantPolicies:nonCompliantPolicies}" -o table

    Expect: Counts of non-compliant resources and policies: the guardrails a review relies on. Read-only: it lists or describes, and changes nothing.

  4. Find resources with no owner tag, the first cost-optimization check.

    az resource list --query "[?tags.owner == null].{name:name, type:type, group:resourceGroup}" -o table

    Expect: Every resource nobody owns on paper. Read-only: it lists or describes, and changes nothing.

2. Python: tradeoffs.py

This program scores three designs for the patient portal against Azure's five pillars and lists the trade-offs each one accepts: what it buys for one pillar and what it costs another. It shows why the framework asks you to write trade-offs down, and that sustainability has to be added deliberately because it is not one of the five. Save it as tradeoffs.py, then run it.

# tradeoffs.py
PILLARS = ["reliability", "security", "cost optimization", "operational excellence", "performance efficiency"]
DESIGNS = {
    "single zone, SQL login, portal changes": {
        "scores": [1, 1, 3, 1, 2],
        "accepts": ["cheapest to run, and fails on any zone loss, any leaked file, and any bad manual change"],
    },
    "zone-redundant, managed identity, Bicep pipeline": {
        "scores": [2, 3, 2, 3, 3],
        "accepts": ["zone redundancy: reliability bought with about 17% more cost",
                    "private endpoint: security bought with DNS work for operations"],
    },
    "plus a geo-replica in a second Region": {
        "scores": [3, 3, 1, 2, 3],
        "accepts": ["Region-level recovery bought with about 40% more cost and a failover runbook to maintain"],
    },
}
SUSTAINABILITY = {"single zone, SQL login, portal changes": "not reviewed",
                  "zone-redundant, managed identity, Bicep pipeline": "test environments off at night; 60% utilisation target",
                  "plus a geo-replica in a second Region": "the replica idles most of the time: size it small, scale on failover"}

for name, d in DESIGNS.items():
    weakest = min(range(5), key=lambda i: d["scores"][i])
    print(name)
    print("  " + "  ".join(f"{p.split()[0][:5]}:{s}" for p, s in zip(PILLARS, d["scores"])),
          f"  weakest: {PILLARS[weakest]}")
    for t in d["accepts"]:
        print("  trade-off:", t)
    print("  sustainability guidance (separate on Azure):", SUSTAINABILITY[name])
    print()
target = {"reliability": 2, "security": 3, "cost optimization": 2, "operational excellence": 3, "performance efficiency": 2}
fits = [n for n, d in DESIGNS.items() if all(s >= target[p] for p, s in zip(PILLARS, d["scores"]))]
print("designs that meet the portal's targets on every pillar:", fits)

Run it, and you should see this output:

$ python3 tradeoffs.py
single zone, SQL login, portal changes
  relia:1  secur:1  cost:3  opera:1  perfo:2   weakest: reliability
  trade-off: cheapest to run, and fails on any zone loss, any leaked file, and any bad manual change
  sustainability guidance (separate on Azure): not reviewed

zone-redundant, managed identity, Bicep pipeline
  relia:2  secur:3  cost:2  opera:3  perfo:3   weakest: reliability
  trade-off: zone redundancy: reliability bought with about 17% more cost
  trade-off: private endpoint: security bought with DNS work for operations
  sustainability guidance (separate on Azure): test environments off at night; 60% utilisation target

plus a geo-replica in a second Region
  relia:3  secur:3  cost:1  opera:2  perfo:3   weakest: cost optimization
  trade-off: Region-level recovery bought with about 40% more cost and a failover runbook to maintain
  sustainability guidance (separate on Azure): the replica idles most of the time: size it small, scale on failover

designs that meet the portal's targets on every pillar: ['zone-redundant, managed identity, Bicep pipeline']

3. What to notice

4. Advanced: every step as one Bash script

The same Linux steps, made into a real script you can keep and run again. It uses the Bash features a production script needs: functions (one per step), an array of step names, arguments to choose steps, a case for options, exit codes recorded for each step, and a trap that prints a summary even when you stop it with Ctrl+C. Make a folder for this lesson (mkdir -p ~/labs/azure-well-architected-framework && cd ~/labs/azure-well-architected-framework) and save this as lab.sh.

#!/usr/bin/env bash
# The Linux steps of "The Azure Well-Architected Framework: Five Pillars, Trade-offs, and Sustainability", as one script (save it as lab.sh).
#
#   ./lab.sh          run every step, in order
#   ./lab.sh 2 4      run only steps 2 and 4
#   ./lab.sh --list   list the steps
#
# The steps share one shell, so a later step can use what an earlier one set up (a folder,
# a variable, a container): run them all in order the first time. Your own scripts should
# start with "set -euo pipefail"; this one runs teaching commands, and some of them fail on
# purpose, so it records each step's exit code instead of stopping at the first failure.

STEPS=(
  'List Azure Advisor recommendations for each pillar; the CLI calls reliability "HighAvailability".'
  'Find secrets kept in plain app settings (they belong in Key Vault, or nowhere, with managed identity).'
  'Summarise policy compliance for the subscription.'
  'Find resources with no owner tag, the first cost-optimization check.'
)

step_1() {
for c in HighAvailability Security Cost Performance OperationalExcellence; do
  echo "== $c"
  az advisor recommendation list --category $c --query "[].{impact:impact, problem:shortDescription.problem}" -o table
done
}

step_2() {
az webapp list --query "[].{name:name, rg:resourceGroup}" -o tsv | while read n g; do
  az webapp config appsettings list -n "$n" -g "$g" --query "[?contains(name, 'PASSWORD') || contains(name, 'CONNECTION')].name" -o tsv | sed "s/^/$n: /"
done
}

step_3() {
az policy state summarize --query "results.{nonCompliantResources:nonCompliantResources, nonCompliantPolicies:nonCompliantPolicies}" -o table
}

step_4() {
az resource list --query "[?tags.owner == null].{name:name, type:type, group:resourceGroup}" -o table
}

# print a step that has to be run by hand, instead of running it
by_hand() {
  echo "  (run this one yourself: $1)"
  sed 's/^/    /'
}

RESULTS=()
run_step() {
  local n=$1 start=$SECONDS code
  printf '\n== step %d of %d: %s\n' "$n" "${#STEPS[@]}" "${STEPS[n-1]}"
  "step_$n"
  code=$?
  RESULTS+=("step $n: exit code $code, $((SECONDS - start)) s")
}

summary() {
  echo
  echo "== summary"
  local r
  for r in "${RESULTS[@]}"; do echo "  $r"; done
}

case "${1:-}" in
  -h|--help) sed -n '2,6p' "$0"; exit 0 ;;
  --list) for i in "${!STEPS[@]}"; do echo "$((i + 1)). ${STEPS[i]}"; done; exit 0 ;;
esac

[ $# -eq 0 ] && set -- $(seq 1 "${#STEPS[@]}")
for n in "$@"; do
  if ! [[ $n =~ ^[0-9]+$ ]] || (( n < 1 || n > ${#STEPS[@]} )); then
    echo "there is no step '$n'; try --list" >&2
    exit 2
  fi
done
trap summary EXIT
trap 'echo; echo "stopped with Ctrl+C"; exit 130' INT
for n in "$@"; do run_step "$n"; done

Then make it executable and run it:

chmod +x lab.sh
./lab.sh --list     # the steps
./lab.sh            # every step, then a summary of exit codes and times
./lab.sh 2 3        # only steps 2 and 3

5. Learn the basics behind it

New to a feature used above? These W3Schools pages explain each one from zero, with examples you can run in the browser.

If you remember nothing else

Design exercise

A hospital group moves 12 patient-facing applications to Azure over a year. Design how the Well-Architected Framework is applied, from landing zone to go-live.

Clarifying questions to ask

Which decisions go into the landing zone as policy, and which are per workload? Who runs reviews and when? How are trade-offs recorded? How do Advisor and Defender findings reach owners? How is sustainability included, given it is not a pillar?

Rough sizing

Say 12 applications, 3 of them critical, highly confidential health data, a 99.95% target in clinic hours, and one platform team of six.

Shape of the answer

Cloud Adoption Framework landing zones with management-group policies (no public data endpoints, required tags, allowed Regions, diagnostic settings); per workload, a review against the five checklists before go-live and yearly, with the assessment score tracked; decision records for trade-offs; Advisor and Defender findings routed by tag to owners with response times; managed identity and private endpoints as the default pattern; sustainability guidance applied in the review template with emissions reviewed next to cost.

Trade-offs to name

Strict landing-zone policy slows the first migrations and stops repeated mistakes; reviewing all 12 deeply takes the platform team months, so critical apps get deep reviews and others a template; zone redundancy everywhere is costly, so it follows each app's target.

Failure modes and how to troubleshoot them

Each row is one way this system went wrong in the diagram's scenarios. The hop number is where to look first.

ScenarioWhereEffectWhat goes wrong
Security skippedHop 3: SecurityBreaksSecurity is deferred. The app reaches Azure SQL with a SQL login whose connection string sits in plain app settings, and the server allows public access from "Azure services and resources". A developer's exported settings file ends up in a public repository.
Operations skippedHop 5: Operational excellenceBreaksOperations is skipped: there is no pipeline, and changes are made in the portal. A night-shift engineer edits an app setting to fix a reporting job and replaces the database connection value. Bookings fail from 22:40.

How to troubleshoot

  1. Write down the symptom and when it started: what users see, which number moved, and what changed just before (a deploy, a config change, traffic).
  2. Walk the path in order, from the first hop to the last: Workload → Reliability → Security → Cost optimization → Operational excellence → Performance efficiency → Trade-offs → Advisor and assessment → Sustainability. The first hop whose evidence is wrong is where to dig.
  3. At that hop, run the read-only check from the diagram or the lab first; change nothing until the evidence points at a cause.
  4. Fix the smallest thing that restores service, or roll back the last change, and confirm the symptom is gone with the same check.
  5. Write down what you found and the check that would have caught it sooner, so the next person starts there.

Architecture review checklist

Review the design in this lesson, or your own, against these ten areas. Tick an area when you can answer its question with evidence: a number, a test, a document, or an owner. Your ticks stay in this browser.

  1. Business outcomeWhich result for users or the business does this design serve, and which number shows it is working?
  2. SecurityWho and what can reach each part, how is identity proven, and how is data protected in transit and at rest?
  3. ReliabilityWhat is the target (SLO), which single failures does the design survive, and how was that tested?
  4. PerformanceWhat latency and throughput are required at peak, and where is the first bottleneck?
  5. OperationsHow is it deployed, observed, and changed safely, and who is paged when it breaks?
  6. CostWhat does it cost per month and per unit of work (request, tenant, model call), and what grows the bill?
  7. SustainabilityWhich resources sit idle, which region and hardware does it run on, and what can scale to zero?
  8. GovernanceWhich policies, guardrails, and compliance rules apply, and how are they enforced in code?
  9. OwnershipWhich team owns each component, its budget, and its on-call, and where is that written down?
  10. Failure and recovery planWhat is the RTO and RPO, what is the runbook for a region or dependency loss, and when was it last rehearsed?

References and review

The official documentation and standards behind this lesson. Versions and defaults change; when a command or field here differs from them, trust the official page.

Last updated . Next review due by November 2027. Found something out of date? Tell me.

Saved on this device, in this browser.
Next in this series · Lesson 156
The Google Cloud Well-Architected Framework: Six Pillars and the AI Perspective

The Google Cloud Well-Architected Framework (called the Architecture Framework until 2024) has six pillars: operational excellence; security, privacy, and compliance; reliability; cost optimization; performance optimization; and…

Go to Lesson 156 →

Or browse the full course from the Lessons index.