[英]direct javascript/css requests to same server as page in load balanced environment
I have a .net web application in a load balanced environment over 3 servers. 我在3台服务器上的负载平衡环境中有一个.net Web应用程序。 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.
我的网站是http://www.website.com几个JavaScript文件,如http://www.website.com/script1.js , http://www.website.com/script2.js等。
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? 是否可以设置为,当请求发送到http://www.website.com的 server1时,所有的javascript,css请求也都发送到server1,server2或server3? Is there any web.config configuration that can be put in place to handle this?
是否可以放置任何web.config配置来处理此问题?
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. 这个问题可能更适合serverfault.com。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.