We expose some webservices on a server, written in C#. Now we have to distribute the services to multiple servers, so the solution is distributed. And each request is dispatched to one the servers to eliminate single-point-of-failure (SPOF) situation.

At first we looked at the Service-broker from Microsoft SQL-server, but have dropped it because it is too integrated with the SQL-server, what is out of our business. I have thought about a solution like Reactor-pattern or maybe using a MessageQueue in the solution.

The goal (and requirement from customer) is to avoid a SPOF. So implementing a dispatcher/scheduler/eventhandler will need a duplicate of this.

What is common use pattern/solution in critical systems, implemented in .NET?

The server is connected to one database - which is out of our hands.

  • 2
    The answer will depend on how your current services were written. What technology stack did you use? For example, you can achieve redundancy in WCF by load balancing using a server farm. Azure can provide the kind of "High Availability" that you require, possibly at a lower cost than you can achieve yourself using your own hardware. Commented Feb 22, 2016 at 16:09
  • 2
    Why are you trying so hard to eliminate SPOF in your part of the system, when the external part is one big SPOF?
    – svick
    Commented Feb 22, 2016 at 17:11
  • Is your design already using SQL server? If so there is not realy reason to not use Service Broker. Commented Feb 22, 2016 at 19:16
  • @MatthewWhited: I think magaging SQL Service Brokker, needs Admin-access, and that belongs to the dba. We are "just" developers and manage the services.
    – JorgenV
    Commented Feb 24, 2016 at 9:22
  • Why do you think service broker needs admin access? Yes the DBA would need to turn it on for your database but the permissions are self contained. It is a little more complex if you are going to use routing between databases but if everything is self contained it's pretty easy to work with. Commented Feb 24, 2016 at 14:14

2 Answers 2


I am going to lead my answer by addressing a few of the suggestions you have considered and when it is appropriate to pull these out of your tool belt.

SQL Server Service Broker and Enterprise Service Integration (broker)

This is not a solution for ensuring High Availability nor is it a solution for SPOF.

Likewise Enterprise Service Integration as a system design tool doesn't itself make any guarantees or benefits in favor of Quality Attributes that address Redundancy, Availability, Scalability, Performance, and Reliability. In Enterprise Service Integration there are two primary patterns, source quoted from Wikipedia article on Enterprise Application Integration:

Mediation (intra-communication) Here, the EAI system acts as the go-between or broker between multiple applications. Whenever an interesting event occurs in an application (for instance, new information is created or a new transaction completed) an integration module in the EAI system is notified. The module then propagates the changes to other relevant applications.

Federation (inter-communication) In this case, the EAI system acts as the overarching facade across multiple applications. All event calls from the 'outside world' to any of the applications are front-ended by the EAI system. The EAI system is configured to expose only the relevant information and interfaces of the underlying applications to the outside world, and performs all interactions with the underlying applications on behalf of the requester.

A broker process is used in the Mediation pattern to receive messages from various applications, and then optionally perform transformation of that message for one or more targets. The Federation pattern is similar but instead acts like a Service Facade for an application so that applications have a common and encapsulated interface that shelters from changes in the target application. Both of these patterns address quality attributes like Interoperability and Reusability, but again, this as well does not address quality attributes commonly associated with High Availability and SPOF.

Message Queue

As far as Message Queue, this is less of a pattern in System Design and more of a technology that one would use to ensure 100% message delivery between applications over an aysnchronous channel (as opposed to HTTP web services which are synchronous, Request-Response model).

Load Balancing

What you are looking for is a solution that utilizes Load Balancing. Essentially it is a highly available endpoint for a network resource, that will take requests, utilize some algorithm to determine which endpoint or server to send to, and then proxies a number of endpoints on behalf of the client by shuttling the request to an appropriate endpoint. This has a number of benefits. First is that a single network URI can be used by multiple clients to where they do not need to be aware of which server will ultimately serve their request. Second is that this gives a level of security to where the actual servers can be removed from visibility. Third this allows for seamless scalability to where additional servers can be added to meet load, and likewise servers can drop without the application being unavailable.

There are many patterns and forms that this can take in terms of technology. If you are developing an application for internal hosting in the enterprise, then often there would be a data center appliance (Eg. F5) that can be configured to help you achieve this. If you are hosting an application on the cloud, Microsoft Azure has Load Balancing built in as a feature that you can utilize for distributing load to multiple VM's.

  • 1
    SQL Service Broker is not built around ETL. It is a message queue/broker. Commented Feb 22, 2016 at 18:49
  • @MatthewWhited Thanks for pointing that out. I have never actually used this particular tool but the documentation I read on it seemed unclear and why it would be focused around the database layer is strange to me. I removed the incorrect assumptions from my answer.
    – maple_shaft
    Commented Feb 22, 2016 at 18:52
  • @maple_shaft : Thx for your exposition of some of the terms i mentioned in my question. I have used MQs in some older projects. I just mensioned some terms I knew or have read about - without further experience.
    – JorgenV
    Commented Feb 25, 2016 at 21:40

Since you are using IIS I assume you can use Web Farms, this gives you more control.


If you need an easier solution and want to just avoid SPOF use Network Load Balancing.

Suppose you have 3 servers, lets call them SERVER01 ,SERVER02 ,SERVER03 you create a NLB cluster and add the 5 servers to this cluster. The cluster will have its own IP address or CNAME, say SERVERNLB.

So when hand out the SERVERNLB to your users.

so if one want to consume this service end point

he will be directed to either:

and you can configure this too to do it in a roundrobin fashion or based on resources.

If SERVER03 is down, it will be disabled from the cluster and NLB won't forward any request to that .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.