Hello Guys,
I am working on Haproxy to handle cases related to backend server up and down. I have handled some cases by reading documentation and some are still remaining. Please have a look below under heading “Remaining cases”. Please also review “Cases handled successfully” and Github gist and suggest if something is missing.
Cases handled successfully
1- Backend should be down in case of health check error and notify us via email
2- Backend should be up in case of health check pass and notify us via email
3- Serve maintenance page 503 in case when all servers are down.
Configuration of Haproxy for handling about cases are listed here(https://gist.github.com/junaid-malik-confiz/541a3afdc9b395501daf828e299c2daf)
Remaining cases
1- Backend should be mark down if it gives lot of 500s either consecutive or not. – This is not working.
2- Add authorization on the requests going for http checks, i tried solution mentioned here(https://stackoverflow.com/questions/13325882/haproxy-solr-healthcheck-with-authentication) and here(HAproxy health checks with authentication) but these didn’t work.
Thanks & Regards,
Junaid