patterns / 2 · after baseline

Dual-AZ

Two casters, different AZs, one shared NLB. Failover is L4 health — not a clustered caster.

Dual-AZ L4 steady state Dual-AZ / steady state VIP unchanged on failover Clients :2101 Route 53 alias VIP Shared NLB 1 TG / both AZs Blue / AZ-a Green / AZ-b IPort both pull

examples/relay_iport_ha — own state. Destroy baseline first.

Deploy

Need Detail
Two AZs blue_private_subnet_id + green_private_subnet_id
NLB Subnets in 2+ AZs
Zone route53_zone_id on the VPC
cd examples/relay_iport_ha
cp terraform.tfvars.example terraform.tfvars
terraform init && terraform apply
terraform output -raw ntrip_vip_fqdn   # dial :2101

Explain

Dual-AZ L4 failover Dual-AZ / drain green same VIP / reconnect Clients TCP drops / retry Same VIP DNS unchanged Shared NLB green unhealthy Blue / healthy Green / drained IPort blue still pulls

L4 target health on :2101 (~20s unhealthy). VIP stays put; drained TCP still drops — clients reconnect.

cd examples/relay_iport_ha
./scripts/failover.sh status
./scripts/failover.sh drain-green    # wait ~25s
./scripts/failover.sh restore-green

~20–40s gap (~34s measured). VIP does not change.

Teardown

cd examples/relay_iport_ha && terraform destroy