← All posts

AWS NetworkingResilience Cristian Critelli 10 min read

The Checker Has an Address: What Route 53's Private Health Checks Actually Change

Route 53 can finally health-check endpoints that live only inside your VPC, and fail over a private hosted zone in seconds instead of minutes. The catch is in one line of the documentation: the checker now runs from a Region, and you choose which one.

The Route 53 documentation page on failover in a private hosted zone still opens with a sentence that reads like a shrug: “Route 53 health checkers are outside the VPC.”

Everything that follows it is a workaround. Give the instance a public IP address. Or publish a CloudWatch metric, put an alarm on it and build a health check on the alarm’s data stream. Most teams went further and built their own loop: a metric, an alarm, a Lambda function, a call to the Route 53 API to rewrite the record.

On 19 November AWS removed the need for all of it. Route 53 Private Endpoint Health Checks probe a private IP address or name from inside your VPC, and drive failover records in a private hosted zone directly.

That is a genuine improvement. It also moves the health checker. It used to be a fleet you never thought about. Now it has an address, in a VPC, in a Region you pick. Where you put it decides whether it can see the failure you built it for.

The problem: the most important endpoints had the slowest failover

The workloads that sit behind private hosted zones are rarely the trivial ones. AWS’s launch post lists them: internal APIs, databases, custody and key-management systems, market-data feeds, self-hosted nodes behind internal load balancers. They are private precisely because they matter.

And they had the weakest failover. AWS’s own description of the custom loop is candid about its three costs. Latency: “The chain of metric publication, alarm evaluation, function invocation, and DNS update commonly takes several minutes.” Operational burden: you own the metric plumbing, the thresholds, the function code and its permissions. And correctness: “Custom failover logic is prone to subtle errors, and it tends to fail at the worst moment, during an actual outage.”

The CloudWatch-alarm route had its own trap. A health check built on an alarm watches the alarm’s data stream, and when that stream does not hold enough information to decide, the status falls back to a setting you chose in advance (InsufficientDataHealthStatus): healthy, unhealthy or last known. The moment the metric stops arriving is exactly the moment you most need the answer, and the answer is whatever you guessed when you built it.

What actually changed

The new feature adds one resource: the health check source. You choose a Region, a VPC in that Region and three subnets in three different Availability Zones (two in US West (N. California), which has two). Each source has an IP address in each of those subnets, and every private endpoint health check that uses it sends its requests from there.

The check itself is familiar. Target a private IPv4 or IPv6 address, or a domain name, over HTTP, HTTPS or TCP. Choose standard checks every 30 seconds or fast checks every 10. For HTTP and HTTPS the endpoint is healthy when it answers with a 2xx or 3xx status within the time limit, optionally with a string you require in the body; for TCP, when a connection opens. After the failure threshold (default 3) of consecutive failures, the check turns unhealthy and the failover records move. No public address, no load balancer required, nothing for you to run.

With fast checks and the default threshold, that is about 30 seconds of failures before the record moves. AWS’s post recommends a one-minute TTL on the failover records, so the honest budget is detection plus the TTL plus whatever your clients cache beyond it: seconds to a minute or two, not the several minutes of the custom loop.

The challenge: the checker now shares fate with a Region

Compare how the public health checks have always worked. Route 53 runs health checkers in several Regions and aggregates their verdicts: an endpoint is healthy if more than 18% of them say so. AWS chose that figure “to make sure that health checkers in multiple regions consider the endpoint healthy.” The vote is spread across the planet. One bad Region cannot cast it alone.

The private checks read differently, and the documentation is precise about it:

  • “A private endpoint health check runs only from the AWS Region of its health check source.”
  • “A private endpoint health check uses a single health check source.”
  • “You can’t reference a private endpoint health check from a calculated health check.”
  • The check, its source and the records it is associated with must all be in the same AWS account.

And then the sentence that matters most: “A service event in that Region can affect your ability to health-check your endpoints from that Region.”

The documentation does not say what status a check reports while its own source’s Region is impaired, and I would not guess. The point is that the design question is new. With public checks you never had to ask where the checker stood. With private checks, the checker is a component of your architecture like any other, and it can be in the blast radius of the very failure it exists to detect.

The obvious fix is to follow the documented best practice, “create health check sources in more than one Region”, and combine them. You cannot. A check uses one source, a calculated check cannot reference a private one, and the launch scope excludes mixing private and public checks. You can change the source on an existing check (HealthCheckSourceId is editable), but that is an UpdateHealthCheck call, and Route 53’s control plane is in us-east-1. A failover plan whose first step is a control-plane call during a Regional event leans on exactly the dependency the earlier post on Route 53’s accelerated recovery was about.

The solution: judge each Region from the other one

The documentation offers a second option alongside multiple sources: “use a health check source whose Amazon VPC has connectivity to another Region (for example, through Amazon VPC peering or Transit Gateway).” Take that literally and the design falls out of it.

Use AWS’s own example from the launch post: a primary internal web application behind a Network Load Balancer in us-west-2, a disaster-recovery copy in us-east-2, the two connected by a pair of transit gateways.

Two Regions joined by Transit Gateway peering. In us-west-2, the primary Network Load Balancer and a health check source; in us-east-2, the standby Network Load Balancer and a second health check source. The source in us-east-2 health-checks the primary across the peering, the source in us-west-2 health-checks the standby, and each check is attached to the matching failover record in the private hosted zone

Each Region’s endpoint is judged from the other Region: the primary’s health check runs from the standby’s side, the standby’s from the primary’s.

Put the primary’s checker in the standby Region. The health check on the primary failover record uses a source in us-east-2, reaching the primary NLB across the transit gateway peering. If us-west-2 is impaired, the checker is standing in the Region that is not, sees the failures, and moves the record. The thing that watches the primary no longer shares its fate.

Put the standby’s checker in the primary Region. A failover record can carry a health check whether it is primary or secondary. Give the secondary one too, from a source in us-west-2. Now neither Region grades its own homework, and a broken standby is visible before you need it.

Know what the partition does. The weakness of cross-Region checking is that every check now also tests the path between the Regions. If the peering breaks while both applications are fine, both checks fail. Route 53 has a rule for exactly that: each routing algorithm has “a mode of last resort”, and “when all records are considered unhealthy, the Route 53 algorithm reverts to considering all records healthy.” For a failover pair that means the primary keeps answering, which is the right outcome when the only thing broken is the line between your Regions. Rehearse it anyway: a rule you have read is not a rule you have watched work.

Mind what one-sided failure looks like. If only the primary’s check fails, the record moves, whether the primary is down or merely unreachable from us-east-2. That is a deliberate trade: you accept a failover on a path fault in return for a checker that survives the Region it watches. If that trade is wrong for a stateful primary, keep the primary’s check in its own Region and accept the shared fate instead. Either way, choose it on paper, not during the event.

Then the plumbing that makes the checks mean what you think:

  • Let the checker in, and keep it in. Security groups and network ACLs on every target must allow traffic from the source. A tightened NACL now fails over a healthy primary, so put the source’s subnets in the same change review as the workload’s.
  • Check by address when DNS is yours. For a domain-name target, Route 53 resolves only through the VPC’s Route 53 Resolver, “not custom DNS servers in your DHCP options set.” If only your own DNS servers know the name, associate the private hosted zone with the source’s VPC, add a Resolver forwarding rule, or check by IP address.
  • Count Availability Zones. A source covers exactly three. A VPC that spans more needs another source for the targets in the others.
  • Check what clients feel. HTTP or HTTPS with string matching against an endpoint that exercises the path clients use tells you more than a TCP connect to a port that answers while the application behind it does not.

The small print worth reading twice

Quotas. Five health check sources per account, 200 checks per source, and checks that use a source count toward the account’s quota of 200 health checks. A multi-Region design with a source per Region and a check per record spends that faster than you expect.

One account. The check, its source and its records live in one account; cross-account association is not supported. AWS’s reference design puts them all in a shared networking account with a central VPC that reaches every workload VPC over Transit Gateway or Cloud WAN, and that is the shape to copy.

Fixed network. Once created, a source’s VPC, subnets and security groups cannot change. Moving it means a new source, re-pointing the checks, and deleting the old one: plan it like any other migration.

Not at launch. No latency measurement for private endpoints, no public checks through a source, no calculated checks over private ones.

Cost. A source is billed per Availability Zone association, minimum three, at $0.125 per hour per Availability Zone: $0.375 an hour, roughly $274 a month for 730 hours. Each check is $0.50 a month for HTTP or TCP, plus $1.00 a month for each optional feature (HTTPS, string matching, fast interval). Two sources for the cross-Region design is about $548 a month before the first check, which is cheap next to an outage and expensive next to a Lambda function you already wrote. Make the comparison honestly: the Lambda function was minutes slower and yours to debug at 3 a.m.

The footprint

The custom loop is ready to retire. Seconds instead of minutes, no code on the failover path, nothing exposed: for private hosted zones that is a real change, not a convenience.

But the old design hid a question the new one makes you answer. A health checker is a dependency of your failover, exactly like the control plane is a dependency of your recovery. Public checks answered it for you by voting from everywhere. Private checks answer it with an address in one Region.

So before you delete the CloudWatch alarm, draw one line on the architecture diagram that most diagrams leave out: from each checker to the endpoint it judges. If that line starts and ends in the same Region, ask what happens when the Region is the thing that is impaired. If it crosses Regions, ask what happens when the crossing is.

Either answer can be right. Not having one is the only wrong one.

See them move

The anatomiesArchitectures you can take apart, step by step: 7 of them, from backup and restore to Direct Connect maximum resiliency.
Cover of Cloud Networking and Resilience

From the same author

Cloud Networking and Resilience Designing Scalable, Fault-Tolerant, and Highly-Available Cloud Network Architectures

Dedicated to Ade (2017–2022). All personal proceeds donated to charities supporting cats in distress.

Order Now Learn more

Get new articles by email

One essay every two weeks, plus a short note when a new article is published here.

Previous postSix Security Groups, No Context: What Transit Gateway's Gateway Load Balancer Attachment Actually Changes
Cover of Cloud Networking and Resilience
Apress Media, LLC

Order the book

Cloud Networking and Resilience

Designing Scalable, Fault-Tolerant, and Highly-Available Cloud Network Architectures

ISBN · Print
979-8-8688-2435-7
ISBN · eBook
979-8-8688-2436-4

Dedicated to Ade (2017–2022). All personal proceeds donated to charities supporting cats in distress.

Affiliate links — proceeds go to charities supporting cats in distress.