Interview Prep/Networking/Load Balancing, Proxies & CDN

How do you route multiple microservices behind one domain with an ALB?

IntermediateScenarioLoad Balancing, Proxies & CDN
Answer

Situation read → Path and host based listener rules.

What I'd do →

  1. Create one ALB listener on 443 with a default fixed-response or main target group
  2. Add rules: /api/* to the api target group, /auth/* to the auth target group, Host: admin.example.com to the admin group
  3. Use aws elbv2 create-rule --listener-arn <arn> --priority 10 --conditions Field=path-pattern,Values='/api/*' --actions Type=forward,TargetGroupArn=<tg>
  4. Set health checks per target group
  5. Use IP target type for Kubernetes pods

Why → One public entry point reduces certificates, DNS records and cost.

Interview tip → Mention the 100 rules per listener default quota when the service count grows.

All Networking questions Roadmap: Networking for DevOps

More on Load Balancing, Proxies & CDN