Depending on how your gaming server works, you'll probably need to work with your timeout client
and your timeout server
. These are currently set to 5 seconds in your configuration.
These settings relate to your tcp session. If you want to balance things a little better to your servers you may also want to look at persistence profiles to balance certain connection to the same servers. Again it really depends on your configuration.
Also look at the balance
option to look through docs.
Example algorithm in haproxy docs: (http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#balance)
leastconn The server with the lowest number of connections receives the
connection. Round-robin is performed within groups of servers
of the same load to ensure that all servers will be used. Use
of this algorithm is recommended where very long sessions are
expected, such as LDAP, SQL, TSE, etc... but is not very well
suited for protocols using short sessions such as HTTP. This
algorithm is dynamic, which means that server weights may be
adjusted on the fly for slow starts for instance.
May also need tcp keep alive setup: (http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#option%20tcpka)
You can also actively view your sessions with a great tool call haproxyctl which you can find on github or install with gem install haproxyctl
.
> haproxyctl show sess
0x1eb23c0: proto=tcpv4 src=172.12.0.149:57749 fe=https be=<NONE> srv=<none> ts=08 age=1m36s calls=40 rq[f=400000h,i=0,an=1ch,rx=1m23s,wx=,ax=] rp[f=008000h,i=0,an=00h,rx=,wx=,ax=] s0=[7,8h,fd=2,ex=] s1=[0,0h,fd=-1,ex=] exp=1m23s
0x1e3b170: proto=tcpv4 src=172.12.0.149:57750 fe=https be=<NONE> srv=<none> ts=08 age=1m36s calls=31 rq[f=400000h,i=0,an=1ch,rx=1m23s,wx=,ax=] rp[f=008000h,i=0,an=00h,rx=,wx=,ax=] s0=[7,8h,fd=3,ex=] s1=[0,0h,fd=-1,ex=] exp=1m23s
0x1e35da0: proto=tcpv4 src=172.12.0.149:57751 fe=https be=<NONE> srv=<none> ts=08 age=1m36s calls=35 rq[f=400000h,i=0,an=1ch,rx=1m23s,wx=,ax=] rp[f=008000h,i=0,an=00h,rx=,wx=,ax=] s0=[7,8h,fd=8,ex=] s1=[0,0h,fd=-1,ex=] exp=1m23s
0x1e4fa50: proto=tcpv4 src=172.12.0.149:57754 fe=https be=<NONE> srv=<none> ts=08 age=1m36s calls=15 rq[f=400000h,i=0,an=1ch,rx=1m23s,wx=,ax=] rp[f=008000h,i=0,an=00h,rx=,wx=,ax=] s0=[7,8h,fd=9,ex=] s1=[0,0h,fd=-1,ex=] exp=1m23s