Hoping someone can help confirm if this suppose to work? I'm trying to route 3 subdomain traffic to the same haproxy host;
Here is my setup
haproxy with one interface ip 10.10.10.100 and dns name haproxy01.mydomain.com
3 CNAME records associated with it; sub1.mydomain.com, sub2.mydomain.com and sub3.mydomain.com
all the incoming traffic is for port 443.
There are two back end application servers that accepts traffic on three ports 8081, 8082, 8083, let say;
sub1.mydomain.com for 8081 sub2.mydomain.com for 8082 and sub3.mydomain.com for 8083
The application requires SSL pass through for only port 8081 traffic so I believe I've to use tcp mode for it the other traffic for 8082 and 8083 is also SSL but it can be terminated at the Haproxy but for the testing I went with all TCP mode.
My config section to achieve this is below;
#Application Setup frontend mytraffic bind *:443 mode tcp acl host_sub1 hdr(host) -i sub1.mydomain.com acl host_sub2 hdr(host) -i sub2.mydomain.com acl host_sub3 hdr(host) -i sub3.mydomain.com use_backend sub1_nodes if host_sub1 use_backend sub2_nodes if host_sub2 use_backend sub3_nodes if host_sub3 option tcplog backend sub1_nodes mode tcp balance roundrobin stick-table type ip size 200k expire 30m stick on src server node1 10.10.10.101:8081 check server node2 10.10.10.102:8081 check backend sub2_nodes mode tcp balance roundrobin stick-table type ip size 200k expire 30m stick on src server node1 10.10.10.101:8082 check server node2 10.10.10.102:8082 check backend sub3_nodes mode tcp balance roundrobin stick-table type ip size 200k expire 30m stick on src server node1 10.10.10.101:8083 check server node2 10.10.10.102:8083 check # APPLICATION SETUP END
When I try to access the appication servers via HAproxy for example for 8082 traffic it throws this is the logs;
localhost haproxy: x.x.x.x:51241 [20/Mar/2015:12:19:38.720] mytraffic mytraffic/ -1/-1/0 0 SC 0/0/0/0/0 0/0
appreciate some direction regarding this setup.
P.S. I can't embed any image for clarity here since it's my first post :-(