Load balancer setup in GitLab

Hi GitLab,

We have recently configured load balancing setup in our GitLab environment. We have 3 servers behind load balancer and we use load balancer common url to access all gitlab servers behind it.

Question: Each time when we try to access gitlab then load balancer picks up any one of the three servers and do the operation through ssh and git bash client and hostkey of that particular server was stored in local ssh directory. After sometime when I tried to connect to gitlab again, this time load balancer made connection to other server and this time connection has denied because of change in hostkey of the server. How to overcome this problem without ignoring security checks. I think GitLab.com load balancing environment has multiple servers behind it [obviously, there has to morethan one server to support those many public repo’s] . How this access process works for Gitlab.com? how to make ssh connections to gitlab servers with different hostkey’s? Please let me know if anyone knows solution for this

Your response will be highly appreciated


You need to use the same key on all of the servers.

1 Like

Thanks for your response. I was aware of this solution but our linux team expressed concerns about this solution not sure why. If you come to know of any other way to do this. Please let me know. Is Gitlab.com also doing the same like copying keys?


That is the only practical solution. Everyone I know who uses multiple SSH servers set up to do load balancing or failover is doing it exactly this way.

Thanks a lot. I do like the approach

Our GitLab environment is on 8.12.0 version and we would like to to do upgrade to 9.1.1. Is it possible to upgrade directly from 8.12.0 to 9.1.1? I just posted the same issue. I was curious to ask If you know any info on this can you please let me know the steps to upgrade?

One question per thread.