Dynamic routing to backend based on context path in HAProxy
问题 I have specific requirement that depending on my context path I have to redirect my traffic to different server/port though HAProxy. I have already achieved the same with "path_beg" in ACL. Below is the configuration. use_backend a1 if { path_beg /a1 } use_backend a2 if { path_beg /a2 } backend a1 balance roundrobin server 1-www 172.17.0.1:80 check cookie s2 backend a2 balance roundrobin server 1-www 172.17.0.3:80 check cookie s2 Now the concern is here every context path I also need to enter