asp.net mvc 4 - SignalR and multiple server instances -
today web application (asp.net mvc4) running once (1 instance).
if action needs push clients, in way:
public actionresult someaction(...) { // stuff happenning here... // ... // push notify var hubcontext = globalhost.connectionmanager.gethubcontext<myhub>(); hubcontext.clients.group("somegroup").pushsomething(); }
now web application needs run in multiple instances, load balancer redirects users different instances of same application.
a client using http://someipaddress
or http://otheripaddress
, should feel , same client.
the question is, how use signalr in case? multiple hubs
i suppose following:
public actionresult someaction(...) { // stuff happenning here... // ... // push notify foreach (var hub ....) // <-- this! hubcontext.clients.group("somegroup").pushsomething(); }
but i'm not sure.
other information: app running in windows azure, , "instances" defined "azure web site number of instances"
Comments
Post a Comment