patterns / 2 · after baseline
Dual-AZ
Two casters, different AZs, one shared NLB. Failover is L4 health — not a clustered caster.
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
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