Teaching Case — "Highly Available" in One Zone
Three application servers and a database, every one of them marked highly available, all of them inside a single availability zone. The count is the trap: `count 3` looks like redundancy and is not, because three instances in one zone is one zone. The engine says exactly that, in those words.
Make it your own.
title "Payments platform — availability review"
provider aws
note "Deliberately wrong. Everything claims redundancy from inside one zone."
internet {
user customers "Customers"
}
cloud prod "Production" {
region ap-southeast-2 {
network vpc "VPC" cidr 10.0.0.0/16 {
alb lb "Load balancer"
zone ap-southeast-2a {
subnet app "Application" private cidr 10.0.11.0/24 {
ec2 api "Payments API" count 3 ha tier api
}
subnet data "Data" isolated cidr 10.0.21.0/24 {
rds ledger "Ledger" multi-az
elasticache sessions "Session cache" ha
}
}
}
}
}
customers -> lb : https 443
lb -> api : http 8080
api -> ledger : postgres 5432
api -> sessions : redis 6379