Blog Post

Apps on Azure Blog
7 MIN READ

Determinism over magic: the engineering design behind Azure Container Registry Regional Endpoints

zoeyli's avatar
zoeyli
Icon for Microsoft rankMicrosoft
Jun 01, 2026

An architecture deep dive into the DNS, authentication, and certificate design that lets customers pin traffic to a single registry replica — and the trade-offs we made to get there.

By Zoey Li, Huangli Wu, Johnson Shi, Wei Meng

Introduction

Azure Container Registry (ACR) supports geo-replication: one registry resource with active-active replicas across multiple Azure regions. You push or pull through any replica, and ACR asynchronously replicates content to all others.

For geo-replicated registries, ACR exposes a global endpoint — myregistry.azurecr.io — backed by Azure Traffic Manager (TM), which routes requests based on network performance. This works well for most workloads. But "automatic" is also "opaque": customers can't see or influence which region TM picks, and for teams with data-residency requirements or their own failover logic, not knowing which replica served a request wasn't enough. 

This post is an engineering deep dive into the design of Regional Endpoints: per-replica DNS names that let customers explicitly target a single registry replica while preserving the global endpoint as the automatic-failover entry point. We'll walk through the DNS topology, how authentication stays portable across endpoints, the certificate strategy, private endpoint integration, and the trade-offs we made to keep routing deterministic.

The Problem: Opaque Routing, No Customer Control

Traffic Manager's performance-based routing is a black box from the customer's perspective. The system picks the "best" region for each DNS resolution, but customers cannot influence or predict that choice. This created several pain points:

  • Unpredictable routing: A client in a specific region cannot guarantee it hits the local replica. Network topology changes, TM probe timing, and DNS caching all introduce non-determinism. Troubleshooting latency spikes requires first figuring out which region served the request.
  • Network isolation gaps: Enterprises with strict data residency requirements need deterministic in-region request handling. The global endpoint can route cross-region, which may not satisfy these requirements. A large financial services firm reported building duplicate single-region registries per geography as a workaround — abandoning geo-replication entirely.
  • No client-side failover: Customers who wanted failover control (e.g., "try local, fall back to DR region") had no addressable per-region targets to configure in containerd mirrors or client retry logic.
  • Reduced confidence in geo-replication: Some customers disabled geo-replication because they couldn't verify it was working as expected. Without per-region addressability, they couldn't confirm data locality or measure per-replica performance.

What Regional Endpoints Are

Regional Endpoints provide a dedicated DNS name for each replica region:

myregistry.<region>.geo.azurecr.io

For example, a registry contoso with replicas in East US and West Europe gets:

  • contoso.eastus.geo.azurecr.io → resolves to the East US replica
  • contoso.westeurope.geo.azurecr.io → resolves to the West Europe replica
  • contoso.azurecr.io → unchanged global endpoint with TM routing and auto-failover

Key properties:

  • Coexistence: Regional endpoints exist alongside the global endpoint. Enabling them changes nothing about existing global endpoint behavior.
  • No auto-failover on regional (by design): A request to contoso.eastus.geo.azurecr.io goes to East US. If East US is down, the request fails. This is the explicit trade-off — determinism means no silent rerouting.
  • Global remains the failover entry point: Customers who want automatic failover continue using the global endpoint, now enhanced with 

    health-aware routing. Regional endpoints complement, not replace, the global endpoint.

  • DNL registries: Registries using Deterministic Name Labels include the hash in the hostname (e.g., contoso-ffb4cphwfsc2gbgg.eastus.geo.azurecr.io).

Architecture Deep Dive

DNS Infrastructure

Each replica gets a stable hostname — contoso.eastus.geo.azurecr.io. For public access, this resolves via CNAME to the regional ACR registry server. For private endpoint access, it resolves through the privatelink zone (<region>.geo.privatelink.azurecr.io) to a private IP in the customer's VNet — the same two-hop CNAME pattern that the global login server and data endpoints already use when accessed via private link.

How Authentication Works

When a client calls a regional endpoint, the auth challenge uses the regional hostname for the token endpoint. However, the token itself is scoped to the global registry name (service=contoso.azurecr.io), making tokens interoperable across all endpoints for the same registry and requested scope.

The key design choice: the realm uses the regional host (so the token endpoint matches the hostname the client is talking to), but the service stays global (so tokens are portable). A token obtained from contoso.eastus.geo.azurecr.io works equally against contoso.azurecr.io or contoso.westeurope.geo.azurecr.io.

This means customers don't need separate credential stores per region — but Docker does require a docker login per hostname because it keys credential storage on the registry URL.

Private Endpoint Integration

Regional endpoints reuse the existing registry private endpoint group. When regional endpoints are enabled, new group members of the form registry_<region> are added alongside existing members. Regional endpoints are independent of data endpoints — enabling regional endpoints does not require or modify data endpoint configuration.

IP consumption: Enabling regional endpoints adds N private IPs (one per replica region) to the existing baseline of 1 + N (1 global + N data). Total with regional endpoints: 1 + 2×N private IPs. Plan subnet capacity accordingly.

When regional endpoints are enabled on a registry that already has private endpoints, the PE connections are updated asynchronously to include the new regional group members.

Certificate Strategy

TLS certificates are extended with wildcard SAN entries per region (e.g., *.<region>.geo.azurecr.io), supporting TLS validation for regional hostnames without issuing a certificate per registry.

Lifecycle and Reversibility

Regional endpoints are a registry-level feature. Once enabled, every replica automatically gets a regional hostname. The feature follows standard registry and replica operations:

  • Enable (az acr update --regional-endpoints enabled): Public DNS records are created for all existing replicas. If private endpoints exist, they are updated asynchronously to include new regional members.
  • Add replica: The new region automatically gets its regional DNS record. If private endpoints exist, they are updated to include the new region.
  • Remove replica: That region's regional DNS record is removed. If private endpoints exist, the corresponding member is removed.
  • Disable (az acr update --regional-endpoints disabled): All regional DNS records are removed. If private endpoints exist, the regional members are removed. The global endpoint continues working throughout. The feature can be re-enabled later.

This is separate from the per-replication --global-endpoint-routing property (previously --region-endpoint-enabled, renamed in Azure CLI 2.87.0), which controls whether a replica participates in Traffic Manager routing on the global endpoint. That property has no effect on regional endpoint access.

Design Trade-offs

Regional Endpoints make the region explicit, so they intentionally do not auto-fail over. If East US is down, contoso.eastus.geo.azurecr.io fails — it does not silently mean West US. This is the point: determinism means no silent rerouting.  In practice, ACR replicas are zone-redundant by default, spreading across multiple availability zones within a region — so a full regional outage is significantly less likely than a single-zone failure. Customers who want automatic failover across regions continue using the global endpoint.

Other trade-offs we made:

  • Docker login is per hostname. Tokens are interoperable across endpoints, but credential stores are hostname-scoped. az acr login --endpoint <region> provides a convenience shortcut.
  • All-or-nothing enablement. Regional endpoints are enabled for all replicas simultaneously — you cannot enable for one region and not another. This simplifies the control plane and avoids partial-state confusion.
  • More private IPs. Each regional endpoint adds one private IP per PE. Plan for 1 + 2×N IPs for N replicas.
  • Replication lag is not masked. A pull to contoso.eastus.geo.azurecr.io will fail if the image hasn't replicated to East US yet. Regional endpoints guarantee region affinity, not data availability. For push-then-immediate-pull workflows, use retries or check replication status before pulling from a different region.

What Customers Should Know

Enabling Regional Endpoints

Requires Azure CLI 2.86.0 or later.

# Enable on existing registry
az acr update -n myregistry --regional-endpoints enabled

# Verify endpoints
az acr show-endpoints -n myregistry

Authentication

# Login to a regional endpoint
az acr login -n myregistry --endpoint eastus

# Or manually with Docker (tokens are interoperable)
TOKEN=$(az acr login -n myregistry --expose-token --query accessToken -o tsv)
echo $TOKEN | docker login myregistry.eastus.geo.azurecr.io -u 00000000-0000-0000-0000-000000000000 --password-stdin

Tokens are interoperable — a token obtained from any endpoint (regional or global) works across all endpoints. Docker requires a separate docker login per hostname since it keys credentials on the registry URL.

TM Routing Disable

The existing az acr replication update --global-endpoint-routing disabled removes a region from Traffic Manager routing on the global endpoint. This does not affect direct regional endpoint access — contoso.eastus.geo.azurecr.io remains reachable regardless of TM endpoint status.

Rollout and Safety

The feature is designed for safe, incremental adoption:

  • Additive: Enabling creates new DNS hostnames. Existing global endpoint records and behavior are untouched.
  • Reversible: Disabling removes the regional DNS records. The global endpoint continues working throughout.
  • Isolated failure domain: A regional endpoint issue affects only traffic explicitly sent to that hostname. Global endpoint traffic is completely unaffected.
  • No customer-side infrastructure required: No agents, sidecars, or additional services to deploy.

The feature has been validated through integration testing.

Outcome and What's Next

Regional Endpoints complete the addressability story for geo-replicated registries. Customers now have two complementary access patterns:

  • Global endpoint (contoso.azurecr.io): Automatic routing with health-aware failover. Best for workloads that want resilience without operational overhead.
  • Regional endpoints (contoso.<region>.geo.azurecr.io): Deterministic, pinned-to-region access. Best for compliance, troubleshooting, and client-controlled failover strategies.

Together, these give customers both explicit control and automatic failover — the combination that was previously impossible without abandoning geo-replication.

Looking ahead, we are exploring ways to improve pull behavior when content has not yet replicated locally — addressing the replication lag limitation without sacrificing region affinity.

 

To learn more about ACR geo-replication, see Geo-replication in Azure Container Registry. To enable regional endpoints, see the CLI reference or the Azure portal.

Updated Jun 01, 2026
Version 2.0
No CommentsBe the first to comment