I am trying to load balance two GIT servers (viz server1 and server2) using ldirectord on a CentOS 4.5 system.
A server named git-ld acts as the ldirectord master.
Both the servers are running git-daemons on port 9418 and have identical set of git projects. There is no Git-daemon running on git-ld.
Note: I am not interested on providing HA services to them yet, just the load balancing.
Here is my ldirectord.cf configuration.
checktimeout=3
checkinterval=5
autoreload=yes
logfile="/var/log/ldirectord.log"
quiescent=yes
##### Git load balancing configuration #####
virtual=git-ld:9418 #git-ld is a virtual IP 172.10.10.10
real=server1:9418 gate 10 # server1 is IP 10.20.20.01
real=server2:9418 gate 5 # server1 is IP 10.20.20.02
checkport=777
service=simpletcp
scheduler=wlc
receive="OPEN"
protocol=tcp
checktype=negotiate
##### Web server load balancing configuration #####
virtual=git-ld:80
real=server1:80 gate 10
real=server2:80 gate 5
service=http
request="test.html"
receive="Still alive"
scheduler=wlc
protocol=tcp
checktype=negotiate
I am checking the health of the servers using a custom tcp service which runs on both the git servers (server1 and 2) on port 777 and returns "OPEN" if the servers are healthy enough to serve requests.
As you can see, I am also load balancing a web server on using the came ldirectord.cf file.
Now, the web server is load balanced perfectly. Everytime I try to access http:// git-ld/ one of the servers serves the web page.
But, I am not able to make the servers respond when I request a git clone to git-ld using below command:
git clone git://git-ld/project.git
The command just times out after a couple of minutes.
The servers serve the git requests if I clone projects from them directly.
git clone git://server1/project.git
git clone git://server1/project.git
I am sure that the servers are responding healthy:
[git-ld]# ipvsadm -Ln
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 172.10.10.10:9418 wlc
-> 10.20.20.01:9418 Route 10 0 0
-> 10.20.20.02:9418 Route 5 0 0
[git-ld]# ipvsadm -Ln --stats
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Conns InPkts OutPkts InBytes OutBytes
-> RemoteAddress:Port
TCP 172.10.10.10:9418 6 23 0 1380 0
-> 10.20.20.01:9418 4 16 0 960 0
-> 10.20.20.02:9418 2 7 0 420 0
Has anyone else setup such a load balancing on their network successfully? Is there anything obvious which I am doing wrong?
Where can I look for log or other mesages which I can use to get deeper into the problem?