Skip to content

Lesson 273·M24 Cloud & AWS for AI

Route 53

Open

Learning Objectives

By the end of this lesson you should be able to:

  • Explain the records: the name to the address (L273)
  • Explain the health checks: the origin's pulse (L273)
  • Explain the routing policies: the latency, the weighted, the failover (L273)
  • Explain the multi-region routing: the traffic to the right region (L286)
  • Explain the AI shape: the traffic's front door (L273)

One-Line Definition

Route 53 is the DNS and the routing — the traffic's front door (L273) — the records (the name to the address: the A, the AAAA, the CNAME, L273), the health checks (the origin's pulse: the endpoint, the CloudWatch alarm, L273), and the routing policies (the latency-based to the nearest region, the weighted for the canaries L303, the failover for the DR L286, L273) — the domain resolves to the edge (L272) or the region (L261), and the traffic routes to the healthy (L273).

The one-sentence interview answer: "Route 53 is AWS's DNS and traffic routing (L273). The records: the name to the address — the A record for the IPv4, the AAAA for the IPv6, the CNAME for the alias to another name (L273); the alias records point the domain at the AWS resources — the CloudFront distribution (L272), the load balancer (L271), the API Gateway (L267) (L273). The health checks: the origin's pulse — the endpoint check or the CloudWatch alarm (L273) — the record routes only to the healthy (L273). The routing policies: the latency-based — the users go to the nearest region (L261); the weighted — the percentage to each target, for the canaries (L303); the failover — the primary to the standby, for the DR (L286) (L273). The AI shape: app.example.com resolves to the CloudFront edge (L272) for the frontend; api.example.com resolves to the API Gateway (L267) with the health check (L273); and the failover policy (L273) routes the traffic to the standby region (L286) when the primary fails (L273). The traffic's front door (L273)."

Mental Model

Think of Route 53 as the city's directory and the traffic lights. The directory (the DNS, L273) maps the names to the addresses: "the bakery" (the domain, L273) → "12 Main Street" (the address, L273). The traffic lights (the routing policies, L273) send the cars (the requests, L273) the smart way: the nearest route (the latency-based, L261), the split routes (the weighted, L303), and the detour route (the failover, L286) when the main road is closed (the health check fails, L273). The pulse (the health check, L273) tells the lights which roads are open (L273). The city works because the directory is correct, the lights are smart, and the pulse is honest (L273).

   the directory + the lights (Route 53, L273)
   ┌────────────────────────────────────────────────────────┐
   │ the directory (the DNS, L273) — the name → the address │
   │ the pulse (the health checks, L273) — the open roads   │
   │ the lights (the policies, L273) — the latency, the     │
   │ weighted, the failover (L286)                          │
   └────────────────────────────────────────────────────────┘

The mental model is the directory and the lights: the names, the pulse, and the routing (L273).

Visual Flow — One Request to the Right Region

   the user (L273)
        │  "api.example.com" (L273)
        ▼
   ┌────────────────────── THE DIRECTORY (L273) ───────────────────────┐
   │  the DNS resolves the name (L273)                                │
   │  the record: the alias to the API Gateway (L267) or the edge     │
   │  (L272) or the load balancer (L271) (L273)                       │
   └──────────────────────────┬───────────────────────────────────────┘
                              ▼
   ┌────────────────────── THE POLICY (L273) ──────────────────────────┐
   │  the latency-based (L273) — the nearest region (L261)            │
   │  the weighted (L273) — the canary's percentage (L303)            │
   │  the failover (L273) — the primary → the standby (L286)          │
   └──────────────────────────┬───────────────────────────────────────┘
                              ▼
   ┌────────────────────── THE HEALTH CHECK (L273) ────────────────────┐
   │  the origin's pulse (L273) · the unhealthy → the next target     │
   └──────────────────────────────────────────────────────────────────┘

The flow is the routing: resolve → policy → health → target (L273).

How It Works — The Traffic, Part by Part

  • The records (L273). The name to the address (L273): the A (the IPv4), the AAAA (the IPv6), the CNAME (the name to another name), and the alias (the name to the AWS resource) (L273). The alias is the senior tool: the domain → the CloudFront (L272), the load balancer (L271), the API Gateway (L267) (L273).
  • The health checks (L273). The origin's pulse (L273): the endpoint check — the HTTP or the TCP probe (L273); or the CloudWatch alarm (L274) (L273). The unhealthy target is dropped from the routing (L273).
  • The routing policies (L273). The latency-based — the users go to the nearest region (L261); the weighted — the percentage to each target, for the canaries (L303) and the blue/green (L303); the failover — the primary to the standby, for the DR (L286) (L273).
  • The multi-region routing (L286). The primary region serves (L261); the health check (L273) watches it; the failover (L273) sends the traffic to the standby (L286) — the RTO (L374) is the DNS's (L273).

Note

The record answers "where"; the policy answers "which" (L273). The record (L273) is the static mapping — the name to the address (L273). The policy (L273) is the dynamic choice — which target gets the traffic, by the latency (L261), the weight (L303), or the health (L273). The senior answer separates them (L273): "the alias points at the load balancer, and the failover policy routes around it when the health check fails" (L273).

Real Project Usage

  • A global frontend (L272). The domain (L273) aliases to the CloudFront distribution (L272) — the edge (L261) serves the static (L272).
  • A multi-region AI SaaS (L286). The primary region's load balancer (L271) as the failover's primary (L273), the standby region (L286) as the secondary — the health check (L273) and the failover (L273) route around the outage (L286).
  • A canary deployment (L303). The weighted routing (L273) — 5% to the new build (L303), 95% to the old (L273).
  • An API (L267). The API Gateway (L267) behind the alias (L273) — the custom domain (L273) with the TLS (L272).
  • Anything with a domain (L273). The DNS is the traffic's start (L273) — the name to the address, the policy to the target (L273).

The through-line: the DNS is the traffic's front door — the name resolved, the policy chosen, the health checked (L273).

Interview Explanation

Say it in four moves:

  1. The records. "The name to the address — the alias to the AWS resources (L273)."
  2. The health checks. "The origin's pulse — the unhealthy dropped (L273)."
  3. The policies. "The latency-based (L261), the weighted (L303), the failover (L286)."
  4. The AI shape. "The domain to the edge (L272), the API (L267), and the standby region (L286)."

Senior-Level Insights

  • The alias is the managed-resource tool (L273). The domain → the CloudFront (L272), the load balancer (L271), the API Gateway (L267) (L273) — the alias tracks the resource's changes (L273).
  • The health check is the routing's truth (L273). The unhealthy target (L273) is dropped (L273) — the traffic (L273) and the DR (L286) follow the pulse (L273).
  • The weighted policy is the deployment tool (L303). The 5% canary (L303) and the blue/green (L303) — the weighted routing (L273) is the deployment's traffic control (L273).
  • The failover is the DR's switch (L286). The primary to the standby (L286) — the RTO (L374) is the DNS's (L273): the health check's interval (L273) and the propagation (L273).
  • The latency policy is the global UX (L151). The users to the nearest region (L261) — the perceived latency (L162) is the policy's (L273).

Common Mistakes

  • The IP in the config (L273). The hardcoded address (L273) — the alias to the managed resource (L273) is the tool (L273).
  • The health check missing (L273). The failover routing to the dead target (L273) — the DR (L286) doesn't work (L273).
  • The weighted without the canary (L303). The random splits (L273) — the weighted policy (L273) is the deployment's control (L303).
  • The DNS TTL too long (L273). The stale records (L273) — the failover (L273) and the propagation (L273) delayed.
  • The single region (L273). No standby (L286) — the failover policy (L273) has nowhere to send the traffic (L286).

Best Practices

  • Alias the managed resources (L273) — the CloudFront (L272), the load balancer (L271), the API Gateway (L267).
  • Wire the health checks (L273) — the endpoint or the CloudWatch alarm (L274).
  • Use the weighted for the canaries (L303) — 5%, watch, roll forward (L303).
  • Build the failover for the DR (L286) — the primary to the standby (L273).
  • Keep the TTLs short (L273) — the failover (L273) and the propagation (L273) fast.

Interview Questions

Q: Walk me through Route 53.

A: The DNS and the routing (L273). The records — the name to the address, the alias to the AWS resources (L273). The health checks — the origin's pulse (L273). The routing policies — the latency-based (L261), the weighted (L303), the failover (L286) (L273).

Q: How do you route traffic to the right region?

A: Two ways (L273). The latency-based policy — the users resolve to the nearest region (L261). The failover policy — the primary region serves, the health check (L273) watches it, and the failover (L273) sends the traffic to the standby region (L286) when the primary fails (L273).

Q: What's a health check?

A: The origin's pulse (L273): the HTTP or the TCP probe to the endpoint, or the CloudWatch alarm (L274) (L273). The unhealthy target is dropped from the routing (L273) — the traffic (L273) and the DR (L286) follow the pulse (L273).

Q: How do you do a canary with Route 53?

A: The weighted policy (L273): 5% of the traffic to the new build, 95% to the old (L303) — the health check (L273) watches the new build, and the weight (L273) rolls forward as it proves itself (L303).

Follow-Up Questions

  • What are the records (L273)?
  • What's the alias (L273)?
  • What's a health check (L273)?
  • What are the routing policies (L273)?
  • How does the failover work (L286)?

Comparison Table — The Routing Policies

Policy (L273)What it does (L273)The AI use (L273)
Latency-based (L273)the nearest region (L261)the global UX (L151)
Weighted (L273)the percentage per targetthe canaries (L303), the blue/green (L303)
Failover (L273)the primary → the standbythe DR (L286)
Simple (L273)one targetthe single endpoint (L273)

The senior read: the policy is the traffic's decision — by the distance, the weight, or the health (L273).

Code Example — The Traffic, Declared

// The traffic front door (L273) — the records and the policies (L273).
// THE RECORDS (L273) — the name to the address (L273).
const records = {
  'app.example.com': { type: 'A', alias: cloudfrontDistribution }, // the edge (L272)
  'api.example.com':  { type: 'A', alias: apiGateway },            // the API (L267)
};

// THE HEALTH CHECK (L273) — the origin's pulse (L273).
const primaryHealth = {
  type: 'HTTP', path: '/health', interval: 30,   // the probe (L273)
};

// THE FAILOVER (L273) — the primary to the standby (L286).
const failover = {
  primary:  { record: 'api.example.com', region: 'us-east-1' },
  secondary: { record: 'api.example.com', region: 'us-west-2' },   // the standby (L286)
  healthCheck: primaryHealth,                 // the pulse (L273)
};

// THE WEIGHTED (L303) — the canary's percentage (L273).
const canary = {
  'v1': { weight: 95 },                       // the old build (L303)
  'v2': { weight: 5 },                        // the new build (L303)
};
What the reader must SEE — the traffic, declared:

  alias → CloudFront     → the edge for the frontend (L272, L273)
  alias → API Gateway    → the API (L267, L273)
  /health probe          → the pulse (L273)
  primary + secondary    → the failover to the standby (L286, L273)
  95/5 weighted          → the canary (L303)

  Resolved, pulsed, and routed — the traffic's front door (L273).

Tip

The pair that defines Route 53: the alias record (the name to the AWS resource, L273) and the health-checked policy (the traffic to the healthy target, L273). Alias the resources, check the pulse, route the traffic (L273).

Performance Notes

  • The DNS is the first latency (L151). The resolution (L273) is the request's first hop (L273) — the TTL (L273) and the edge (L261) keep it fast (L151).
  • The latency policy is the global UX (L273). The nearest region (L261) — the round-trip (L151) minimized (L273).
  • The health check is the DR's speed (L286). The interval (L273) — the failover (L286) is the pulse's (L273): the RTO (L374) includes it (L273).
  • The TTL is the propagation (L273). The short TTLs (L273) — the changes (L273) and the failover (L286) propagate fast (L273).

Debugging Scenarios

SymptomFirst check (L273)The lever
The domain doesn't resolveThe record (L273)The alias (L273)
The traffic hits the dead regionThe health check (L273)The probe + the failover (L273)
The canary gets no trafficThe weight (L303)The weighted policy (L273)
The failover is slowThe TTL (L273)The short TTL (L273)
The DR doesn't triggerThe health check (L273)The CloudWatch alarm (L274)

Quick Revision Notes

  • Route 53 = the DNS and the routing (L273): the records, the health checks, the policies.
  • The records: the name to the address — the alias to the AWS resources (L273).
  • The health checks: the origin's pulse (L273) — the unhealthy dropped.
  • The policies: the latency (L261), the weighted (L303), the failover (L286).
  • The AI shape: the domain to the edge (L272), the API (L267), and the standby (L286).

Cheat Sheet

ROUTE 53 = the DNS and the routing — the traffic's front door

THE RECORDS (L273)
  the name → the address: A, AAAA, CNAME, ALIAS (L273)
  the alias → the CloudFront (L272), the load balancer (L271),
  the API Gateway (L267)

THE HEALTH CHECKS (L273)
  the endpoint probe — HTTP / TCP (L273)
  the CloudWatch alarm (L274) — the origin's pulse (L273)

THE POLICIES (L273)
  the latency-based — the nearest region (L261)
  the weighted — the canary's percentage (L303)
  the failover — the primary → the standby (L286)

THE AI SHAPE (L273)
  app.example.com → the edge (L272)
  api.example.com → the API Gateway (L267) + the health check (L273)
  the failover (L273) → the standby region (L286)

INTERVIEW, 4 MOVES
  1 records "the name to the address — the alias (L273)"
  2 health  "the origin's pulse (L273)"
  3 policies "latency, weighted, failover (L273)"
  4 AI      "the edge, the API, the standby (L273)"

Key Takeaways

Recap

  • Route 53 is the DNS and the routing — the traffic's front door (L273): the records (L273), the health checks (L273), and the routing policies (L273)
  • The records (L273) map the name to the address — the alias records point the domain at the AWS resources: the CloudFront (L272), the load balancer (L271), the API Gateway (L267)
  • The health checks (L273) are the origin's pulse — the endpoint probe or the CloudWatch alarm (L274); the unhealthy target is dropped (L273)
  • The routing policies (L273): the latency-based (L261) for the nearest region, the weighted (L303) for the canaries, and the failover (L286) for the DR
  • The AI shape (L273): the domain to the edge (L272) for the frontend, the API Gateway (L267) with the health check, and the failover (L273) to the standby region (L286)
  • The multi-region story (L286) runs on Route 53 (L273): the health check (L273) watches the primary, and the failover (L273) routes around the outage (L286)

Check your understanding

Answer each one out loud. Then rate yourself honestly.

0/8
1

What are the records (L273)?

2

What's the alias (L273)?

3

What's a health check (L273)?

4

What are the routing policies (L273)?

5

How does the failover work (L286)?

6

How do you do a canary (L303)?

7

What's the latency-based policy (L261)?

8

What is the traffic's front door (L273)?

A Closing Note — The Lights, Green

You now hold the traffic: the records, the health checks, and the policies — with the alias to the edge and the failover to the standby. The users have their way in — and the traffic routes to the healthy (L273).

Next: the AWS observability floor — CloudWatch (L274).