Recent

Author Topic: Network Load balancing for socket application?  (Read 7763 times)

jl

  • Full Member
  • ***
  • Posts: 178
Network Load balancing for socket application?
« on: September 06, 2011, 06:43:11 am »
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

  • Full Member
  • ***
  • Posts: 178
Re: Network Load balancing for socket application?
« Reply #1 on: September 15, 2011, 08:41:46 am »
Any thoughts?  I was told it can be done using netsh on windows platform.  How about Linux?  Thanks.   :)

IPguy

  • Sr. Member
  • ****
  • Posts: 385
Re: Network Load balancing for socket application?
« Reply #2 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"?

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

  • Full Member
  • ***
  • Posts: 178
Re: Network Load balancing for socket application?
« Reply #3 on: September 20, 2011, 09:28:13 am »
Sorry, missed out your reply.

(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.

Are they looking for fail-over, true load balancing or just client incoming connection distribution?

Failover is sufficient.

Are they asking for the application itself to be load balanced?  (ie: is this a clustered application?)

This is generally not required.

There 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

  • Guest
Re: Network Load balancing for socket application?
« Reply #4 on: September 20, 2011, 12:26:33 pm »
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

  • Sr. Member
  • ****
  • Posts: 385
Re: Network Load balancing for socket application?
« Reply #5 on: September 26, 2011, 03:01:26 am »
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)

 

TinyPortal © 2005-2018