evaluate stickiness settings on haproxy backends
Currently the haproxy backend configuration is such that every pool of servers is round-robin with the exception of websockets, ssh and pages.
websockets
balance roundrobin
cookie _gitlab_session prefix nocache
ssh
balance source
hash-type consistent
-
pages_httpandpages_https
balance source
hash-type consistent
The other backends:
-
api: all of theapi-xxnodes -
https_git: all of thegit-xxnodes -
web: all of theweb-xxnodes -
canary_web: all of theweb-cny-xxnodes -
registry: all of theregistry-xxnodes
Use roundrobin load balancing. As now we are starting to put some production traffic on canary we should probably consider making requests sticky so that clients do not potentially see multiple versions of the applications on a single page load.
For web and canary_web this would mean modifying our load balancing algorithm to use the session cookie:
balance roundrobin
cookie _gitlab_session prefix nocache
For the api this would mean modifying our load balancing algorithm to use the source ip:
balance source
hash-type consistent
but I wonder how smart this will be since most of our traffic is coming from the CICD. Until we are able to separate that traffic we should probably leave it roundrobin.
For the registry I'm not sure whether it matters much but we could also use source ip here as well:
balance source
hash-type consistent