Stopping and Starting Windows Service on load balanced servers RRS feed

  • Question

  • I have two load balanced VM's each with a windows service. I needs to stop and start this service depending on if this service is the "loaded" server. How would I be able to accomplish this? Or more simply perhaps I can keep the service running and have a stateful method for detecting that the current server is the "loaded" server.
    Wednesday, April 10, 2013 11:46 PM


  • Starting and stopping the service is probably not the route I'd take.  The stateful approach of having the server do nothing if it is not the "loaded" server is probably the better approach. It also allows you to build in things like failover and chaining servers.  Of course determining the "loaded" server is a problem unto itself but you might have already solved that issue.

    Michael Taylor

    • Proposed as answer by Mike Feng Friday, April 12, 2013 11:35 AM
    • Marked as answer by Mike Feng Tuesday, April 23, 2013 3:03 PM
    Thursday, April 11, 2013 5:05 PM