UKCloud / openshift-deployment-ansible

3 stars 1 forks source link

Commit to add changes made to haproxy.j2 template #52

Closed k8soneill closed 6 years ago

k8soneill commented 6 years ago

This adds some configuration to the haproxy backend atomic-openshift-api to improve the failover time when a master server goes down. Changes made are 2 small additions to the /etc/haproxy/haproxy.cfg file under the backend block for atomic-openshift-api. timeout check 2s and timeout connect 2s have been added, this means that a health check will time out if no response is received from the server after 2 seconds of being connected and also connections to the backend will timeout if no connection is established in 2 seconds. As these are on a local network 2 seconds should be more than enough time for connections to be established/health checks to respond and this brings the failover time down to around 8 seconds.

This is to rectify issue #51

stevemul commented 6 years ago

Looks good to me, have you tested the deployment to ensure it successfully deploys this config and works as you'd expect? It looks like it will, but we need to be certain. Also looks like this addresses #29 as well - didn't realise we already had an issue for this problem.

We also need some tests written that test master failover.

k8soneill commented 6 years ago

Tested in pipeline configuration deploys successfully and test script(also integrated into jenkins pipeline) shows failover times reduced to 9-11 seconds