SignalR and Load Balancing With Active/Active Sticky Sessions

We have an application that uses SignalR to update clients UI, currently the app is hosted on IIS which we maintain and our clients are connceted directly to us.

We are however in the process of integrating this into an enterprise-wide framework which will house our app within itself, we will continue hosting the app however anyone landing on our pages will go through what we've been told is a load balancing strategie of "2 gateway servers per region setup as active/active with sticky sessions"

My question is that will we have any issues in the case when SignalR decides to choose long polling as the transport protocol and somehow the connection is dropped?

Sorry but I don't really have any knowledge on the subject of Load Balancing.

Any help is much apprecieated.


Well, assuming you're really using "sticky" sessions then the connection getting dropped shouldn't matter because the next request should go back to the same underlying server due to the stickyness. After all, sticky sessions are all about keeping the standard request/response model of HTTP going back to the same server over the course of several requests. So, since long polling is nothing more than a standard request with a prolonged/streaming response, it should integrate just fine with a standard sticky sessions implementation.

What you do need to consider is: what happens if you lose server A either because of failure or maintainance? If you're not using a scaled out message bus solution (Redis, Azure SB) you could potentially lose/miss messages as you transition from server A to server B.

链接地址: http://www.djcxy.com/p/62224.html

上一篇: SignalR v2与负载平衡器

下一篇: SignalR和负载平衡与主动/主动粘滞会话