简体   繁体   English

跨负载平衡服务器的应用程序变量(ASP.Net)

[英]Application variable across load balanced servers (ASP.Net)

We have a website that runs on two load balanced servers. 我们有一个在两个负载平衡服务器上运行的网站。 We used the ASP.Net Application variable to make application state "online/ offline", or for some important messages across the application, So when i try update a application variable its available on one server but not on other. 我们使用ASP.Net Application变量将应用程序状态设置为“联机/脱机”,或者使应用程序中的某些重要消息处于“在线/离线”状态,因此,当我尝试更新一个应用程序变量时,它在一台服务器上可用,而在另一台服务器上不可用。 How i can manage a application variable across load balanced servers. 我如何跨负载平衡服务器管理应用程序变量。 What may I use? 我可以使用什么? Of course keeping it as simple as possible. 当然要使其尽可能简单。

将该信息存储在所有服务器均可访问和访问信息的数据库中。

Are you using sticky sessions? 您是否在使用粘性会话? How often does the data change? 数据多久更改一次? Is application cache even necessary? 是否需要应用程序缓存?

One option: You can have each webserver store (and manage, refresh, invalidate) its own application cache. 一个选择:您可以让每个Web服务器存储(并管理,刷新,失效)其自己的应用程序缓存。 But then you run the chance of storing different copies. 但是随后您就有机会存储不同的副本。

Another option: distributed cache such as memcached or ncache or something else. 另一个选择:分布式缓存,例如memcached或ncache或其他东西。

Another option: read/write the data out to a shared disk. 另一个选择:将数据读/写到共享磁盘。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 跨负载平衡服务器的选择性缓存清除(ASP.Net) - Selective Cache clearing across load balanced servers (ASP.Net) 负载平衡服务器上的ASP.NET窗体身份验证 - ASP.NET Forms Authentication on Load Balanced Servers 将Asp.net应用程序移动到负载平衡的环境中 - Moving an Asp.net application to a load-balanced environment .Net Session 用于负载平衡服务器 - .Net Session for load balanced Servers 在负载平衡的服务器上使用应用程序范围的变量 - Use application-wide variable on load balanced servers 在负载平衡的服务器上,ASP.NET网站有时在加载时冻结和/或在页面顶部显示奇数文本 - ASP.NET site sometimes freezing up and/or showing odd text at top of the page while loading, on load balanced servers 负载平衡的ASP.NET Web应用程序中的跨服务器通信 - Cross-server communication in load-balanced ASP.NET web application 如何在负载平衡的Web场中处理ASP.NET应用程序变量 - How to handle ASP.NET Application variables in a load-balanced web farm ASP.Net - 在负载平衡环境中处理会话数据? - ASP.Net - Handling session data in a load balanced environment? 负载平衡环境中的ASP.net状态服务器丢失会话 - ASP.net State Server losing session in load balanced environment
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM