有许多服务器的路由模式

编程入门 行业动态 更新时间:2024-10-20 07:50:17
本文介绍了有许多服务器的路由模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我们正在使用路由模式与CacheCluster机器进行通信。我们在CacheCluster中有2台机器,我可以假设,在生产中,我们的整体系统将更加强大(如果一台CacheCluster机器关闭),如果我们将两台服务器分配给AppFabric配置?见下文:

Hi, we are using Routing mode to communicate with CacheCluster machines. We have 2 machines in the CacheCluster, am I right to assume that, in production,ouroverall system will be more robust (in case one CacheCluster machine is down)if we assign both servers to the AppFabric configuration? See below:

var configuration = new DataCacheFactoryConfiguration ();

var configuration = new DataCacheFactoryConfiguration();

var servers = 新 DataCacheServerEndpoint [2];

var servers = new DataCacheServerEndpoint[2];

servers [0] = new DataCacheServerEndpoint (cacheHostName0,cachePort0);

servers[0] = new DataCacheServerEndpoint(cacheHostName0, cachePort0);

servers [1] = new DataCacheServerEndpoint (cacheHostName1,cachePort1);

servers[1] = new DataCacheServerEndpoint(cacheHostName1, cachePort1);

configuration.Servers = servers;

configuration.Servers = servers;

configuration.LocalCacheProperties = new DataCacheLocalCacheProperties ( int 。MaxValue,expirationTime, DataCacheLocalCacheInvalidationPolicy .TimeoutBased);

configuration.LocalCacheProperties = new DataCacheLocalCacheProperties(int.MaxValue, expirationTime, DataCacheLocalCacheInvalidationPolicy.TimeoutBased);

var factory = new DataCacheFactory (配置);

var factory = new DataCacheFactory(configuration);

realCache = factory.GetCache(cacheName);

推荐答案

您好。在这种情况下,您的系统应该更加强大,因为如果一个缓存主机关闭,应用程序仍然可以连接到缓存集群使用来自第二个缓存主机的信息。这假设您使用SQL Server作为提供程序。如果您使用的是XML,那么您必须运行大多数主机主机。机器群集,这意味着两台机器必须始终启动。如果您使用SQL Server作为缓存群集配置存储提供程序,那么一台机器可能会关闭,群集将继续运行。

Hello. Your system should be more robust in this case, because if one cache host is down, the application will still be able to connect to the cache cluster using the information from the second cache host. This assumes that you are using SQL Server as the provider. If you are using XML, then you have to have a majority of lead hosts running. In a 2-machine cluster, this means that both machines must always be up. If you are using SQL Server for the cache cluster configuration store provider, then one machine could go down and the cluster would remain running.

Jason Roth

Jason Roth

更多推荐

有许多服务器的路由模式

本文发布于:2023-10-12 17:05:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1485334.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:有许多   路由   模式   服务器

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!