1

I have a problem in HA Proxy wherein i have two urls for prod and non-prod:

https://app.domain.com
https://non-prod.app.domain.com

My problem is that all succeeding requests to either domain is being passed to the backend of the first request. Like if at the first time I access https://app.domain.com, works fine good. But if i make a request to https://non-prod.app.domain.com, the responding server is from the prod servers. And I close the browser and open non prod first then if i go to prod, the responding serves is from the non-prod servers. I check haproxy logs during the first request, I can see the request in the logs, but the succeeding requests, I cannot see it in the logs. This is my haproxy configuration:

frontend app_443
  bind *:443
  option tcplog
  mode tcp

  acl tls req.ssl_hello_type 1
  tcp-request inspect-delay 5s
  tcp-request content accept if tls

  acl is_app_prod req.ssl_sni -i app.domain.com
  acl is_app_nprod req.ssl_sni -i non-prod.app.domain.com

  use_backend backend_app_prod_443 if is_app_prod
  use_backend backend_app_nprod_443 if is_app_nprod
  
  default_backend backend_default

backend app_prod_443
  mode tcp
  option ssl-hello-chk
  server server1_443 192.168.1.21:443 check
  server server2_443 192.168.1.22:443 check
  server server3_443 192.168.1.23:443 check

backend backend_app_nprod_443
  mode tcp
  option ssl-hello-chk
  server b_server1_443 192.168.2.21:443 check
  server b_server2_443 192.168.2.22:443 check
  server b_server3_443 192.168.2.23:443 check
Nameless
  • 11
  • 2

0 Answers0