Re: HA Proxy FTP Load Balancing Timeout
Alok, Sorry have been out of the office for a while. You could try increasing the clitimeout and srctimeout values in your defaults section. These values are ninety and one hundred and twenty seconds respectively. My guess is that tcpka has no effect on activity from haproxy's point of view as this tcp traffic would be generated by haproxy itself. Also, after seeing your config, I realize why I was confused. I load balance FTP as well, but I ONLY load balance the command channel via haproxy. The data channels are handled directly by NAT rules. I wrote up my method here: http://ben.timby.com/?page_id=210 The nice thing about this method is that haproxy is still able to distribute load pretty evenly by user session not by individual connection. Also, the heavy lifting of transferring large files is then handled in the kernel by netfilter rather than by haproxy. Additionally this means that time outs enforced by haproxy only apply to the command channel, and do not affect the data channels.
Re: HA Proxy FTP Load Balancing Timeout
Thanks Ben! I would certianly explore more on these lines and let you know. Thanks again. Regards, Alok From: Ben Timby bti...@gmail.com To: Alok Kumar a_sa...@yahoo.com Cc: haproxy@formilux.org haproxy@formilux.org Sent: Wednesday, May 1, 2013 11:08 AM Subject: Re: HA Proxy FTP Load Balancing Timeout Alok, Sorry have been out of the office for a while. You could try increasing the clitimeout and srctimeout values in your defaults section. These values are ninety and one hundred and twenty seconds respectively. My guess is that tcpka has no effect on activity from haproxy's point of view as this tcp traffic would be generated by haproxy itself. Also, after seeing your config, I realize why I was confused. I load balance FTP as well, but I ONLY load balance the command channel via haproxy. The data channels are handled directly by NAT rules. I wrote up my method here: http://ben.timby.com/?page_id=210 The nice thing about this method is that haproxy is still able to distribute load pretty evenly by user session not by individual connection. Also, the heavy lifting of transferring large files is then handled in the kernel by netfilter rather than by haproxy. Additionally this means that time outs enforced by haproxy only apply to the command channel, and do not affect the data channels.
Re: HA Proxy FTP Load Balancing Timeout
Hi Ben, Is there any suggestion, that I can try in our HA Proxy config. Regards, Alok From: Ben Timby bti...@gmail.com To: Alok Kumar a_sa...@yahoo.com Cc: haproxy@formilux.org haproxy@formilux.org Sent: Thursday, April 18, 2013 3:46 PM Subject: Re: HA Proxy FTP Load Balancing Timeout On Thu, Apr 18, 2013 at 3:38 PM, Alok Kumar a_sa...@yahoo.com wrote: Hi Ben, In my case we are load balancing across FTP servers. FTP uses two data channel and command channel port for data transfer. I use haproxy for the same purpose. Closing the command channel will not affect a transfer in any way, unless you have something else set up wrong. In other words, the command channel is needed only to START the upload, once started the data channel will complete the upload. If the command channel closes in the meantime, what does it matter? I am trying to understand WHY this is a problem, as in my experience closing the idle command channel is a GOOD thing with no negative side-effects.
Re: HA Proxy FTP Load Balancing Timeout
Ben Timby btimby@... writes: Alok, On Tue, Apr 16, 2013 at 8:26 PM, Alok Kumar a_sahay- /e1597as9lqavxtiumw...@public.gmane.org wrote:I have a HA Proxy server(1.4), thzt is load balacing FTP traffic to Six FTP servers. I noticed that Load Balancer is dropping traffic after 50 sec, where as there was a valid ftp control port and Large file transfer was in progress over data port. I have the same behavior on my cluster (by design) by setting timeout client (or old clitimeout) setting in haproxy. For me it is desirable, as most (all?) FTP clients will re-open the command channel if needed. The command channel is not needed for ongoing transfers.http://code.google.com/p/haproxy-docs/wiki/timeout_client You might also look for timeout server in your configuration.It may be that this is unintentionally enabled in your configuration. I tried using tcpka in defaults section, but it didn't make any difference. In my particular case, using tcpka option on the backend side could have solved the issue of control channel timing out dut to inactivity. Am I missing something like setting tcp keeyalive time, interval and probe frequency setup on Ha Proxy Linux server. If the answer is not so simple, I suggest you provide your configuration to the list (obscure anything sensitive) to receive more in-depth help. Hi Ben, In my case we are load balancing across FTP servers. FTP uses two data channel and command channel port for data transfer. Since HaProxy is not FTP aware, if command channel is idle during large file transfer, it does not recognize that data channel is still continuing and closes command channel. I am looking for keepalive options that can make command channel activeeven though no data is flowing thru it. I am not sure if this is doable in HAProxy. If you have any question, then please let me know.
Re: HA Proxy FTP Load Balancing Timeout
On Thu, Apr 18, 2013 at 3:38 PM, Alok Kumar a_sa...@yahoo.com wrote: Hi Ben, In my case we are load balancing across FTP servers. FTP uses two data channel and command channel port for data transfer. I use haproxy for the same purpose. Closing the command channel will not affect a transfer in any way, unless you have something else set up wrong. In other words, the command channel is needed only to START the upload, once started the data channel will complete the upload. If the command channel closes in the meantime, what does it matter? I am trying to understand WHY this is a problem, as in my experience closing the idle command channel is a GOOD thing with no negative side-effects.
Re: HA Proxy FTP Load Balancing Timeout
Ben Timby btimby@... writes: On Thu, Apr 18, 2013 at 3:38 PM, Alok Kumar a_sahay- /e1597as9lqavxtiumw...@public.gmane.org wrote:Hi Ben, In my case we are load balancing across FTP servers. FTP uses two data channel and command channel port for data transfer. I use haproxy for the same purpose. Closing the command channel will not affect a transfer in any way, unless you have something else set up wrong. In other words, the command channel is needed only to START the upload, once started the data channel will complete the upload. If the command channel closes in the meantime, what does it matter? I am trying to understand WHY this is a problem, as in my experience closing the idle command channel is a GOOD thing with no negative side- effects. Hi Ben, Attaching the HAProxy config file. Please let me know, if you find some issue in configuration. global log 127.0.0.1 local5 debug log 127.0.0.1 local1 notice maxconn 4096 defaults log global modetcp option tcplog option dontlognull retries 3 option redispatch option tcpka maxconn 2000 contimeout 5000 clitimeout 9 srvtimeout 12 listen abc-ha-ftp 10.108.157.230:21 mode tcp option tcplog option tcpka balance roundrobin server xyz-uat1 10.108.157.193:11099 weight 10 minconn 30 maxconn 1000 check server xyz-uat2 10.108.157.228:11099 weight 10 minconn 30 maxconn 1000 check server xyz-uat3 10.108.157.193:21099 weight 10 minconn 30 maxconn 1000 check server xyz-uat4 10.108.157.228:21099 weight 10 minconn 30 maxconn 1000 check server xyz-uat5 10.108.157.193:31099 weight 10 minconn 30 maxconn 1000 check server xyz-uat6 10.108.157.228:31099 weight 10 minconn 30 maxconn 1000 check listen abc-ha-ftp-1 10.108.157.230:12001-14000 mode tcp option tcplog option tcpka server xyz-uat1 10.108.157.193 check port 11099 listen abc-ha-ftp-2 10.108.157.230:14001-16000 mode tcp option tcplog option tcpka server xyz-uat2 10.108.157.228 check port 11099 listen abc-ha-ftp-3 10.108.157.230:16001-18000 mode tcp option tcplog option tcpka server xyz-uat3 10.108.157.193 check port 21099 listen abc-ha-ftp-4 10.108.157.230:18001-2 mode tcp option tcplog option tcpka server xyz-uat4 10.108.157.228 check port 21099 listen abc-ha-ftp-5 10.108.157.230:22001-24000 mode tcp option tcplog option tcpka server xyz-uat5 10.108.157.193 check port 31099 listen abc-ha-ftp-6 10.108.157.230:24001-26000 mode tcp option tcplog option tcpka server xyz-uat6 10.108.157.228 check port 31099
Re: HA Proxy FTP Load Balancing Timeout
Alok, On Tue, Apr 16, 2013 at 8:26 PM, Alok Kumar a_sa...@yahoo.com wrote: I have a HA Proxy server(1.4), thzt is load balacing FTP traffic to Six FTP servers. I noticed that Load Balancer is dropping traffic after 50 sec, where as there was a valid ftp control port and Large file transfer was in progress over data port. I have the same behavior on my cluster (by design) by setting timeout client (or old clitimeout) setting in haproxy. For me it is desirable, as most (all?) FTP clients will re-open the command channel if needed. The command channel is not needed for ongoing transfers. http://code.google.com/p/haproxy-docs/wiki/timeout_client You might also look for timeout server in your configuration. It may be that this is unintentionally enabled in your configuration. I tried using tcpka in defaults section, but it didn't make any difference. In my particular case, using tcpka option on the backend side could have solved the issue of control channel timing out dut to inactivity. Am I missing something like setting tcp keeyalive time, interval and probe frequency setup on Ha Proxy Linux server. If the answer is not so simple, I suggest you provide your configuration to the list (obscure anything sensitive) to receive more in-depth help.