I am using HAProxy to achieve high availability. I have server1 and server2 where server1 is active and server 2 is dormant. If server1 goes down, server2 will become active. When server1 is coming up, it will start as dormant, and server2 will remain as active server. Server1 will take the active role when server2 goes down, and so on. Both server1 and server2 are configured with ssl. On HAProxy I am using mode as tcp, so have not configured ssl. I have a web service running on both the servers to determine which server is active currently(I ensure at most one server is active at any time). Expectation is HAProxy would redirect each user request to the active server only. I have the following configuration:
frontend server_connect
bind *:8043
option tcplog
mode tcp
default_backend backend_servers
backend backend_servers
mode tcp
option httpchk GET /appws/10.2/api/hastatus HTTP/1.1
http-check expect string ACTIVE
server master server1.mydomain.com:8043 check
server standby server2.mydomain.com:8043 check
With this configuration it does not seem working; neither HAProxy is redirecting any request, nor I am receiving any health check call on the web service on the server end. Can anyone suggest the right way to achieve this?
serverlines probably needcheck-ssl. - Michael - sqlbot