Hari Pachuveetil
Hari Pachuveetil

Reputation: 10374

How to dynamically detect the web-server nodes in a load-balanced cluster?

I am implementing some real-time, collaborative features in an ASP.NET Web API based application using WebSockets and things are working fine when the app is deployed on a single web server.

When it is deployed on a farm behind a software (or hardware) load-balancer, I would like implement the pub-sub pattern to make any changes happening on one of the web servers invoke the same logic to check and push those changes via websocket to the clients connected to any of the other web servers.

I understand that this can be done if there an additional layer using RabbitMQ, Redis or some such pub/sub or messaging component.

But is there a way to use DNS or TCP broadcast or something that is already available on the Windows Server/IIS to publish the message to all the other sibling web-servers in the cluster?

Upvotes: 1

Views: 495

Answers (1)

matt_lethargic
matt_lethargic

Reputation: 2796

No.

But you can use MSMQ instead of RabbitMQ, but still that's not really going to help as it's a queue and not pub/sub so ignore that.

If it's SignalR you're using there are plenty of docs on how to scale out like Introduction to Scaleout in SignalR

Even if it's not SignalR then you can probably get some ideas from there.

Upvotes: 1

Related Questions