0

I have a windows service that is written in-house. This windows service services clients on TCP port X. I want to run it on more than one Windows server. I want the client apps to connect to a single (virtual I guess) IP address and for one and only one server at a time to service all clients. i.e. 1 active server and the rest are all passive servers.

How should I do this? Any hardware to recommend? I did look into Windows NLB however this seems to work at the server level only not at the application (i.e is anyone listening on a port on the server) level.

fred smith
  • 125
  • 2

1 Answers1

1

You're looking for a TCP proxy, you may be interested in looking at HAProxy for dispatching client requests to the appropriate servers. If the service is a critical one, you may for example build 2 proxies in a Active Passive scheme using CARP and a virtual IP.

Maxwell
  • 5,076
  • 1
  • 26
  • 31
  • +1 for HAProxy, it's the real deal. note, however that things will get complicated if the service isn't written with a shared nothing (http://en.wikipedia.org/wiki/Shared_nothing_architecture) design in mind, at least for the layer immediately behind HAProxy. – Javier Nov 29 '10 at 09:37
  • HA proxy looks like it, also this page: http://www.thekua.com/atwork/2009/04/active-passive-load-balancer-configuration-for-haproxy/ seems to have a setup for a web site. Does HAProxy work for any app that listens on a TCP socket, not just port 80 apps? – fred smith Nov 29 '10 at 09:57
  • and how do you cluster the HA Proxy itself? Is there a hardware device that behaves similarly or that can be paired up to give the HA of the device itself? – fred smith Nov 29 '10 at 09:58
  • You can have for example 2 OpenBSD boxes sharing a virtual IP with CARP and having HA Proxy configured on them. There's a quick CARP setup howto in the OpenBSD FAQ if i remember. And Yes HAProxy can relay on any port unencrypted TCP connections. – Maxwell Nov 29 '10 at 11:58