Here is my setup:
- we do have one external load balancer (AWS) attached to root domain mydomain.com
- external load balancer forward traffic to HAProxy instance, and haproxy have to forward it further to on of two internal load balancers
- we have 2 internal load balancers, first point to latest version of our app, second to minus one version
- each of our client can have 1 to many subdomains like sub1.mydomain.com, sub2. sub3
- some subdomains should be redirected to old version, some to new, so same client can have old and new in subdomains
Basically:
sub1.mydomain.com -> latest-load-balancer
sub2.mydomain.com -> older-load-balancer
The problem is how to setup this routing, we can't stop/start haproxy for each new subdomain. And it could be more them 10k of that subdomains in future.