1

I have a following situation:

I need to deploy a windows service that listens for incoming request on tcp port (basically WCF service). I have a High Availability requirement - the service must be deployed on two servers and if the service stops (only the service, not the whole server) on one server, all the requests must be redirected to the second one. For me it looks like a basic failover scenario.

How can I achieve this on Windows Server 2003? Should I use Microsoft Cluster Service or Network Load Balancing? The important part is that the process of swapping the servers should not concern the clients (the client must see only single address / single host or domain name).

Thanks in advance for help.

empi
  • 163
  • 1
  • 3
  • 8

3 Answers3

3

Use MSCS. Here's why:

Back end clustering (MSCS) is the only way to cluster a service (high availability requirement) but both NLB and MSCS allow you to cluster an IP address (listen on a TCP port).

This configuration would allow you to accomplish both. My only caveat is that it isn't typically best practices to have an MSCS cluster on the front end (i.e. dishing out websites or something like that); it's typically used for backend file server clustering, sql/exchange clustering, etc.

I.T. Support
  • 601
  • 2
  • 11
  • 27
  • This does not address the problem of hanged service. If you want high availability you must monitor the functionality of the service. – Igal Serban Jul 20 '10 at 20:44
  • http://technet.microsoft.com/en-us/library/cc738051(WS.10).aspx Resource Monitor detects the failure, either through Looks Alive or Is Alive polling or through an event signaled by the resource. Resource Monitor calls the IsAlive entry point of the resource DLL to confirm that the resource has failed. If IsAlive fails, the state of the resource changes to Failed. If you configured the resource to be restarted on failure, Failover Manager attempts to restart the resource by trying to bring it online. – I.T. Support Jul 20 '10 at 21:32
  • "You must monitor the functionality of the service" - That's what "Resource Monitor" is doing yes? – I.T. Support Jul 20 '10 at 21:33
  • I don't think so. The resource DLL in this case is for "generic service". All he cares about is that the service UP. Services don't response to IsAlive. The resource DLL does. So the service may stop functioning, and stay up. The Resource Monitor won't detect this situation. – Igal Serban Jul 21 '10 at 12:01
  • 1
    If that's the case, then there isn't an empirical way to determine that a service is hung if it's polling as "running" even though it's hung. You can only infer that it's down by using fuzzy logic (i.e. script imitates a request, and deduces that the service is down if it doesn't get a response) Poster did state: "if the service stops", which to me means the service literally polls as "stopped" MSCS will initiate a failover if a clustered service polls as "stopped"... If this isn't what the poster meant, look into Microsoft System Center maybe... – I.T. Support Jul 22 '10 at 16:32
0

NLB - load balances and takes th edead service out of the common address. Exactly what it is made for.

TomTom
  • 51,649
  • 7
  • 54
  • 136
  • I cannot find information how NLB checks if the service went down. It checks ip address and port if it is open? – empi May 27 '10 at 10:25
  • No, the servers talk with each other all the time. – TomTom May 27 '10 at 10:44
  • Is it possible for NLB to check if only one service on server went down? I not only need to check if the server went down but also if the service stopped listening on certain port. – empi May 27 '10 at 11:06
  • 1
    NLB has no way to detect that a service isn't functioning. You could only go this route if you paired NLB with a custom script that periodically checks the state of a service. We built a script that uses CMD commands to execute drainstops/failovers on webservers whose services don't poll as "running" I would use an MSCS cluster instead to accomplish this. See my posted answer for an explanation... – I.T. Support Jul 20 '10 at 19:45
0

Use Network Load Balancing. Preferably in hardware. Some (or all or most) devices can monitor the health of the server by sending http requests. Or even post xml and check for proper response.

Igal Serban
  • 1,575
  • 10
  • 6