Network Load balancing for socket application? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- jl · 2011-09-06 04:43 Hi, some of my clients are asking if I can provide server redundancy for my tcp daemon which uses Indy.  The only way I can think of is to use a network load balancer.  Any thoughts on how this can be done using Lazarus?  I would like it to be cross platform if possible. Note: I've tried googling but to no avail. ---------------------------------------------------------------------- jl · 2011-09-15 06:41 Any thoughts?  I was told it can be done using netsh on windows platform.  How about Linux?  Thanks. ---------------------------------------------------------------------- IPguy · 2011-09-16 01:24 (Disclaimer - in my day job, I'm a network architect / engineer) What is the function of your application? What exactly are your customer's requirements? What do they mean and expect when they ask for "server redundancy"? Are they looking for fail-over, true load balancing or just client incoming connection distribution? Are they asking for the application itself to be load balanced?  (ie: is this a clustered application?) There is plenty of information available if you google "unix load balancing". ---------------------------------------------------------------------- jl · 2011-09-20 07:28 Sorry, missed out your reply. Quote from: IPguy on September 16, 2011, 03:24:41 am(Disclaimer - in my day job, I'm a network architect / engineer) What is the function of your application? What exactly are your customer's requirements? What do they mean and expect when they ask for "server redundancy"? It is a messaging server (email + sms) with tcp interface.  The customer requires some sort of failover. Quote from: IPguy on September 16, 2011, 03:24:41 amAre they looking for fail-over, true load balancing or just client incoming connection distribution? Failover is sufficient. Quote from: IPguy on September 16, 2011, 03:24:41 amAre they asking for the application itself to be load balanced?  (ie: is this a clustered application?) This is generally not required. Quote from: IPguy on September 16, 2011, 03:24:41 amThere is plenty of information available if you google "unix load balancing". I prefer to build in the redundancy at the application level. I've posted on codegear forum, and someone suggested by adding/removing a virtual IP address.  https://forums.embarcadero.com//thread.jspa?threadID=60119 (see postings by Nguyen Diep).  The client will connect to the primary and failover server using the virtual ip address. I know this can be done on windows easily using netsh, on debian, it would appear that i must edit /etc/network/interfaces.  Not sure if there's a command line method. ---------------------------------------------------------------------- Rails · 2011-09-20 10:26 Quote from: touchring line=topic=14536.msg78146#msg78146 date=1316503693 I know this can be done on windows easily using netsh, on debian, it would appear that i must edit /etc/network/interfaces.  Not sure if there's a command line method. Check out the Debian crossroads package. It's a daemon with load balancing and fail over capabilities. ---------------------------------------------------------------------- IPguy · 2011-09-26 01:01 touchring, if the requirement is simple failover on a *nix device, you could implement a check to see if the "master" is alive and functional.  If it is, the secondary goes back to sleep. If the master is down, then the secondary promotes itself to "master" and takes over the functioning. if you go this route, I suggest you read rfc 3768 (http://www.faqs.org/rfcs/rfc3768.html) for a good overview what you have to check for.  (specifically, see section 6.3)