Hi,
On Fri, 23 Oct 2009 14:26:39 +0530, "R, Viswanath"
<viswanat...@misys.com> wrote:
> Hi,
> 
>  
> 
> Greetings, This Is Viswanath. I recently started using the HAProxy for
> balancing the load among my set of available servers. I have described
> my query in the following scenario.
> 
>  
> 
> I have configured HAProxy to balance the load for TCP among my
> available Nodes and the configuration content is as follows
> 
>  
> 
> global
> 
>                 ulimit-n  10000
> 
>                 debug
> 
>  
> 
> defaults
> 
>                 balance roundrobin
> 
>                 retries 1
> 
>                 
> 
> listen haserver_tcp 127.0.0.1:9000
> 
>                 mode tcp
> 
>                 option tcpka
> 
>                 clitimeout  150s
> 
>                 contimeout           30s
> 
>                 srvtimeout            30s
> 
>                 server node1 server1:9198 check inter 10s backup
> 
>                 server node2 server2:9198 check inter 10s
> 
>                 server node3 server3:9198 check inter 10s
> 
>  
> 
> With the above mentioned configuration I am able to achieve the basic
> load balancing. But when my TCP Client created a single connection and
> sends a long message, say greater than 8k bytes, in a small chunks of
> 512 bytes at a time (assuming 512 bytes makes a business oriented
> logical interpretable message), and finally after sending 16 * 512
> bytes of message, my client closes the connection. For every message
> (512 bytes), my server performs an operation based on the message.
> 
>  
> 
> And now, when my TCP Client is sending the nth message (say 10th of
> 16), the server comes down after performing 9 messages successfully,
> and the TCP Client still sends the 10th message till 16th. And these
> are not reaching the server.
> 
>  
> 
> As all the 16 messages are sent on the same connection (Connection is
> made only once in the TCP Client), the HAProxy is not re routing the
> remaining message to another node.
> 
> Is this scenario achievable through HAProxy?
> 
> And my next query is that, as I mentioned that my Client creates only
> one Connection and sends Business oriented logical messages, for the
> rest of the life time of the client, and can that traffic be load
> balanced?
> 
>  
> 
> Eagerly waiting for your reply with comments and solutions if
> applicable.
AFAIK collectd knows nothing about whats goin on inside non-HTTP TCP
connections (it doesn't know if next packet is another "request"), for
that to work you would have to use one-transation-per-connection or
do heavy rewrite of haproxy to support your application protocol.

Regards
Mariusz
-- 
Mariusz Gronczewski (XANi) <xani...@gmail.com>
GnuPG: 0xEA8ACE64
http://devrandom.pl

Attachment: signature.asc
Description: PGP signature

Reply via email to