如何验证多个主机缓存集群设置
我有一些关于 AppFabric 缓存的问题。
问 1.
我已经设置了一个具有两台主机(例如 Host1 和 Host2)的 AppFabric Cache 集群。我已向 SQL Server 提供程序注册了 Host1 计算机上的两台主机。
我的客户端配置如下所示:
<hosts>
<host name="Host1" cachePort="22233" />
</hosts>
现在,当我运行客户端时,每次值都存储在 Host1 中,而不是存储在 Host2 中。这只是巧合还是我的设置有问题?如何验证集群中的两台主机是否可用?
上述问题的更新:
如果我修改我的客户端配置以包含其他主机,即
<hosts>
<host name="Host1" cachePort="22233" />
<host name="Host2" cachePort="22233" />
</hosts>
,它确实有时会选择 Host2 来存储数据。但据我了解,我不需要在客户端配置中指定集群中的所有主机。这是正确的吗?
问题 2.
有没有办法更改主机的 CachePort。我可以使用 Set-CacheHostConfig 更新其他端口,但不能更新 CachePort。
问 3. 设置具有多个主机的缓存集群时还有其他指导原则吗?
感谢任何见解。
I have a few questions regarding AppFabric Caching.
Q 1.
I have set up an AppFabric Cache cluster with two hosts, say Host1 and Host2. I have registered both the hosts on Host1 machine with SQL Server provider.
My client config looks like this:
<hosts>
<host name="Host1" cachePort="22233" />
</hosts>
Now, when I run my client, every time the values are being stored in Host1 and never on Host2. Is this just by co-incidence or is there anything wrong with my setup? How do I verify if both the hosts are available in the cluster?
Update on the above question:
If I modify my client configuration to include the other host, i.e.
<hosts>
<host name="Host1" cachePort="22233" />
<host name="Host2" cachePort="22233" />
</hosts>
then, it does pick up Host2 some times to store the data. But as far as I understand, I do not need to specify all the hosts from a cluster in the client config. Is that correct?
Q 2.
Is there a way to change the CachePort of a host. I could update the other ports using Set-CacheHostConfig, but not the CachePort.
Q 3. Any other guidelines while setting up a cache cluster with multiple hosts?
Appreciate any insights.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法使用
Set-CacheHostConfig
设置cachePort,您在此处设置的cachePort 参数用于告诉commandlet 在哪个端口上与主机进行通信。您可以在安装过程中设置端口(或通过再次运行配置向导):不过,在执行此操作之前我会仔细考虑,您需要记住设置端口在您的所有 web.config 中正确编号,并且您安装的任何假定默认端口也会失败(这让我觉得在调试时很难记住这一点)。
You can't set the cachePort using
Set-CacheHostConfig
, the cachePort parameter you set here is used to tell the commandlet which port to communicate with the host on. You can set the port during installation (or by running the configuration wizard again):I'd think carefully before doing this though, you'll need to remmeber to set the port number correctly in all your web.configs, and anything you install that assumes the default port will also fail (and this strikes me as something that'll be really hard to remember when you're debugging).