开发者

direct javascript/css requests to same server as page in load balanced environment

开发者 https://www.devze.com 2023-02-07 13:04 出处:网络
开发者_如何学JAVAI have a .net web application in a load balanced environment over 3 servers. The load balancing is done with a load balancer. My site is http://www.website.com with several JavaScript

开发者_如何学JAVAI have a .net web application in a load balanced environment over 3 servers. The load balancing is done with a load balancer. My site is http://www.website.com with several JavaScript files such as http://www.website.com/script1.js, http://www.website.com/script2.js etc.

Is it possible to set it up that when request goes to server1 for http://www.website.com, then all javascript, css requests also go to server1, server2 or server3? Is there any web.config configuration that can be put in place to handle this?


The load balancer should handle this itself. Generally, it will keep a user with the server they were initially balanced to. I'm not aware of any setting that controls this, though.

And this question might be better suited for serverfault.com.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号