Load Balancing Socket Connections
Hi,
I don't know if this is even possible but here is the scenario I have:
I have a server/client application connected via TCP.
Lets say I have 5 clients applications. I have 2 server applications running behind a load balancer. Since it's TCP, lets say 2 of the clients make a socket connection to server 1 and 3 of the clients make a socket connection to server 2. Can I have server 1 send a message over the socket connection to each of the clients? The clients make the connection to the server...so I can't just open another socket connection from the server to the clients...
Make sense? Is that possible?
Hello,
I know of two basic ways that this could possibly be done:
1. The server that wants to send the message to all clients sends the message to the clients that are connected to it, and to all of the other servers which then relay the message to their connected clients.
2. It might be possible to configure your load balancer to forward a message to all clients that are connected to it. This solution will depend on what kind of load balancer you are using.
Daniel Roth
System.Net
Hi,
I hope you are aware that the .NET Framework keeps a connection open until there are 10 seconds of inactivity in case of TCP Socket connections - which implies that there is a socket affnity and software load balancing schemes such as NLB do not work.
This limitation also exists with TCP-IP based .NET Remoting as well:
http://support.microsoft.com/default.aspx?scid=kb;en-us;830217
Regards,
Vikram