How to use nServiceBus in a failover cluster

342 views Asked by At

We're using nServiceBus in our development environment, where we have a frontend publishing messages to a service (subscriber). Life is good.

FrontendWebServer -> MiddlewareServer

In our production environment, we'll be running two frontends and two middleware servers for failover.

FrontendWebServer -> LoadBalancer(F5) -> MiddlewareServer

FrontendWebServer -> LoadBalancer(F5) -> MiddlewareServer

This works well for URLs, but because we need to use machine names for MSMQ we're stuck.

We don't want to specify a physical middleware machine name in each frontend config (because it makes managing configs harder, and if one middleware server goes down, it will also stop messages its particular frontend).

We tried to use the nServiceBus distributor (installed on each frontend), but it seems that a subscriber can only listen to one distributor.

Any ideas how we can get around this problem without using separate configs?

1

There are 1 answers

0
Adam Fyles On BEST ANSWER

I would push the F5 up in front of the web servers to balance that load. For the cluster, just reference the Clustered Server name and services not the individual machines. For example if you have Node1 and Node2 you may call the Cluster NSBNode or something like that.

If you make that cluster the Distributor, you can then add multiple Worker nodes behind it to load balance further. Again in this case also make reference to the Cluster queue names(queue@ClusterName).