简体   繁体   English

在负载平衡的环境中将javascript / css请求直接发送到与页面相同的服务器

[英]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.jshttp://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.

相关问题 SQLCacheDependency在SQL Server 2008的负载平衡环境中不起作用 - SQLCacheDependency not working in Load balanced environment with sql server 2008 在负载平衡环境中删除服务器 - dropping servers in a load balanced environment 负载均衡服务器上的缓存类 - Caching Class on Load Balanced Server 在负载平衡的环境中工作时无法检索FormsAuthentication cookie - Cannot retrieve FormsAuthentication cookie when working in load balanced environment 将非对称密钥容器存储在负载平衡的云环境中 - Store Asymmetric Key Container In Load Balanced Cloud Environment Owin Oauth仅在负载平衡的环境中偶尔会有太多重定向 - Owin Oauth occasional too many redirects only on load balanced environment 在负载平衡环境中专用Sitecore CM发布实例 - Dedicated Sitecore CM publishing instance in a load balanced environment 如何使用Javascript支持加载页面服务器页面 - How to load a page Server page with Javascript support 负载均衡环境中的HTTPContext - HTTPContext in a Load Balanced Env 在页面加载到asp.net之前将javascript值发送到服务器 - Send javascript values to server before page load in asp.net
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM