Phase 3 — Failover
Phase 3 adds health-checked failover on top of the zone from Phase 1: an F5 XC DNS load balancer returns different answers for a name based on pool health, so traffic moves to a healthy pool automatically.
Planned design
Section titled “Planned design”The DNS load-balancer stack is three F5 XC resources plus a record in the zone:
| Resource | Role |
|---|---|
xcsh_dns_lb_health_check | Probes each member (HTTP, HTTPS, TCP, ICMP, or UDP) to decide pool health |
xcsh_dns_lb_pool | A set of members with a load-balancing mode (ROUND_ROBIN, PRIORITY, …) and a reference to the health check |
xcsh_dns_load_balancer | Rules that select a pool per request, with a fallback pool |
lb_record (in xcsh_dns_zone) | Binds a name in the zone to the DNS load balancer |
The dns-lb module will express these, and the zone module will grow an lb_record entry pointing
at the load balancer — so a single terraform apply builds the whole failover path.
Planned demonstration
Section titled “Planned demonstration”Once the module ships, the failover demo will:
- Deploy two pools (primary and secondary) behind the DNS load balancer, with a health check.
- Resolve the load-balanced name and confirm it returns the primary pool’s answer.
- Make the primary unhealthy and confirm resolution fails over to the secondary — the readiness gate
polls
diguntil the answer changes. - Restore the primary and confirm failback.
Until then, continue to Phase 4 — Teardown to remove the Phase 1 zone.