load balancing - signalR negotiate request returns origianl url in reponse instead of overriden url -


i trying change hub connection url in signalr requests go through custom load balancer.

the load balancer redirects original signalr web application , gives response.

for trying create new hub connection changing url this

var signalr = $.signalr; signalr.hub = $.hubconnection("http://localhost:64071/loadbalancer.web/notificationweb/signalr", { usedefaultpath: false }); 

the signalr tries connect url , in negotiate request returns response

{ "url":"/we.abcd.web/signalr", "connectiontoken":"raydztwhwmp50fyixa4mxrtr8xzamuhhdlxreyvlb3meo+2vezsk4wmedbkcbveazo/+gfynofqv ...... 

then can see in response, url contains original url (i.e. we.abc.web) communications happens directly we.abcd.web instead of passing through load balancer. web after overriding urls.

how can force negotiate request return me loadbalancer.web url instead of original url?

i think long signalr generating negotiate response url using request.localpath solution load balancer modify negotiate response (rewrite url) before returning client. that's how reverse proxies work.

it should possible without changing load balancer code using iis url rewrite functionality

sidenote: don't know nothing requirements\production environment if load balanced sites (hosting signalr) accessible clients (not hidden behind firewall\proxy), described behavior totally fine. long load balancer balancin negotiate requests between servers, does't matter subsequent connection request bypass load balancer - clients still balanced. + less trouble don't need balance web sockets connections...


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -