0Pricing
Cloud & IT Cert Prep · Lesson

Multi-Region Active-Active Architecture

Distribute a web application across two Azure regions in an active-active configuration, using Azure Traffic Manager to route users to the nearest healthy endpoint.

Multi-Region Active-Active Architecture is a free Cloud & IT Cert Prep lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cloud & IT Cert Prep learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Beyond a Single Region

Even with availability zones, a workload deployed in a single Azure region can be affected by a regional outage — a rare but possible event caused by a major disaster, severe storm, or large-scale infrastructure failure. For the highest levels of availability, enterprises deploy workloads across two or more Azure regions, allowing the application to continue serving users even if an entire region goes offline.

Active-Active vs. Active-Passive

There are two main multi-region patterns:

  • Active-Active — resources in both regions serve live traffic simultaneously. This maximises availability and can also reduce latency by routing users to the nearest region.
  • Active-Passive — resources in the secondary region are on standby and only receive traffic after a failover event. This costs less but has a longer recovery time.

For the highest availability, active-active is the preferred approach.

Azure Traffic Manager Overview

Azure Traffic Manager is a DNS-based global load balancer that distributes traffic across endpoints in different Azure regions (or on-premises). It uses health probes to monitor each endpoint and routing methods (performance, weighted, priority, geographic, multi-value) to decide where to send traffic. For an active-active setup, use the performance routing method to send users to the nearest healthy region.

# Create a Traffic Manager profile:
az network traffic-manager profile create \
  --resource-group myRG \
  --name myTMProfile \
  --routing-method Performance \
  --unique-dns-name myapp-global

# Add endpoints for each region:
az network traffic-manager endpoint create \
  --resource-group myRG \
  --profile-name myTMProfile \
  --name eastus-endpoint \
  --type azureEndpoints \
  --target-resource-id /subscriptions/.../publicIPAddresses/eastus-pip

Traffic Manager Routing Methods

Traffic Manager supports several routing methods tailored to different scenarios:

  • Performance — routes to the lowest-latency endpoint (best for active-active)
  • Weighted — distributes traffic by percentage weight (useful for gradual rollouts)
  • Priority — sends all traffic to the primary endpoint, with fallback to secondary (active-passive)
  • Geographic — routes users based on their geographic location (data sovereignty)

Data Replication Across Regions

In an active-active architecture, data must be replicated between regions so that users in either region read consistent data. Options include:

  • Azure SQL Database with geo-replication — readable secondary in another region
  • Azure Cosmos DB with multi-region writes — all regions accept writes simultaneously
  • Azure Storage with GRS — async replication to a secondary region

The choice depends on your consistency and write-availability requirements.

Cosmos DB for Multi-Region Writes

Azure Cosmos DB is uniquely suited for active-active architectures because it supports multi-region writes — all configured regions can accept write operations simultaneously. Cosmos DB uses configurable consistency levels (from strong to eventual) to manage how replicas are synchronised. For active-active scenarios, session consistency or bounded staleness are common choices that balance performance with correctness.

# Enable multi-region writes on a Cosmos DB account:
az cosmosdb update \
  --resource-group myRG \
  --name myCosmosAccount \
  --enable-multiple-write-locations true

Front Door vs. Traffic Manager

Both Traffic Manager and Azure Front Door provide global load balancing, but at different levels:

  • Traffic Manager is DNS-based — it redirects the client to the correct regional endpoint, but the connection goes directly to that endpoint. It operates at the DNS layer.
  • Azure Front Door is an anycast proxy — it terminates the client connection at a global PoP and forwards the request to the origin. It provides WAF, SSL offload, and caching in addition to routing.

Regional Pair Awareness

Microsoft designates region pairs for each Azure region — a secondary region within the same geography that is geographically distant enough to survive regional disasters. When designing multi-region architectures, use the paired region as your secondary where possible. During planned platform maintenance, only one region in a pair is updated at a time, reducing simultaneous disruption.

# View Azure region pairs:
az account list-locations --query '[].{Name:name,Pair:metadata.pairedRegion[0].name}' --output table

Session State in Active-Active

In active-active deployments, a user's request may be served by different regions on different requests. If your application stores session state in memory on the web server, this causes problems when a user switches regions. The solution is to use a distributed session store — such as Azure Cache for Redis with geo-replication — so session data is accessible from any region.

Cost Considerations of Active-Active

An active-active architecture is more expensive than a single-region deployment because you are running a full copy of your infrastructure in at least two regions. Additional costs include inter-region data transfer, geo-replication for databases, and Traffic Manager or Front Door charges. Conduct a cost-benefit analysis: for mission-critical workloads, the cost of downtime typically far exceeds the cost of the second region.

Testing Multi-Region Failover

An active-active architecture must be tested regularly to ensure it works when needed. Chaos engineering tools like Azure Chaos Studio allow you to inject failures — such as stopping all VMs in one region — and observe how the system responds. Regular testing confirms that Traffic Manager health probes detect failures, failover happens within your RTO, and data remains consistent across regions.

Quick Check

Test your understanding of Microsoft Azure Fundamentals (AZ-900) concepts from this lesson.

Lesson Recap

In this lesson you learned: active-active architecture deploys live resources in multiple regions simultaneously for maximum availability; Azure Traffic Manager routes traffic using performance, priority, weighted, or geographic methods; and data replication (Cosmos DB multi-write, SQL geo-replication) is essential for consistency across regions. Next up we explore health probes and graceful degradation patterns.

Frequently asked questions

Is the “Multi-Region Active-Active Architecture” lesson free?

Yes — the full text of “Multi-Region Active-Active Architecture” is free to read here on the web, and the Cloud & IT Cert Prep course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cloud & IT Cert Prep course, upgrade to CoddyKit PRO.

What will I learn in “Multi-Region Active-Active Architecture”?

Distribute a web application across two Azure regions in an active-active configuration, using Azure Traffic Manager to route users to the nearest healthy endpoint. You practise Cloud & IT Cert Prep with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Cloud & IT Cert Prep?

No prior experience is required. Cloud & IT Cert Prep on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Multi-Region Active-Active Architecture” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Cloud & IT Cert Prep lesson?

Yes. Every Cloud & IT Cert Prep lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Azure SLAs and Composite SLAs
  2. Availability Sets and Availability Zones
  3. Multi-Region Active-Active Architecture
  4. Health Probes and Graceful Degradation
← Back to Cloud & IT Cert Prep