Best Practice for setting up RabbitMQ cluster in production with NServiceBus -


currently have 2 load balanced web servers. starting expose functionality on nsb. if create 2 "app" servers create cluster between 4 servers? or should create 2 clusters?

i.e.

cluster1: web server a, app server a

cluster2: web server b, app server b

seems if 1 cluster, how keep published message being handled same logical subscriber more once if subscriber deployed both app server , b?

is reason put rabbitmq on web servers message durability (assuming didn't have of app services running on web server well)? in case assumption using cluster mirroring message app server. correct?

endpoints vs servers

nservicebus uses concept of endpoints. endpoint related queue on receives messages. if endpoint scaled out either high availability or performance still have 1 queue (with rabbitmq). if have instance running on server , b both (with rabbitmq) messages same queue.

i wouldn't think in app servers think in endpoints , non functional requirements in regards deployment, availability , performance.

availability vs performance vs deployment

it not required host endpoints on server , b. can run service x , y on server , services u , v on server b. scale out performance not availability availability less of issue because of async nature of messaging. can make deployment easier.

pubsub vs request response

if same logical endpoint has multiple instances deployed should not matter instance processes event. if isn't pub sub async request / response. handled nservicebus creating queue each instance (with rabbitmq) on response can received if response requires affinity requesting instance.

topology

you have:

  • load balanced web farm cluster
  • load balanced rabbitmq cluster
  • nservicebus endpoints
    • high available multiple instances on different machines
    • spreading endpoints on various machines ( machine per endpoint)
    • a combination of both

infrastructure

you choose run rabbitmq cluster on same infrastructure web farm or separate. depends on requirements , available resources. if web farm , rabbit cluster separate can more scale out independently.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -