C#中的集群服务共享资源
我注意到,在集群配置中设置通用服务(我的 C# 服务)时,它会分配共享资源 ($T
)。
在两个服务器节点之间共享配置,同时保持服务适用于非集群环境的最佳方式是什么?
目前,该服务使用服务本地目录中的 XML 设置文件。
一个有利的解决方案是服务了解集群环境,然后使用共享资源。我不确定这是否可以实现。
I noticed, when setting up a generic service (my C# service) in a cluster configuration, it assigns a shared resource ($T
).
What's the best way to share configurations between both server nodes, while keeping the service applicable for non-cluster enviroments?
Currently the service uses an XML settings file that is in the services local directory.
A favorable solution, would be that the service is aware of a cluster envoriment and then uses the shared resource. I'm not sure if this is achievable.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该将配置存储在由集群处理的资源中。您可以将配置文件存储在与您的服务属于同一资源组的磁盘分区上。我认为也可以将注册表项标记为群集,以便它们在群集节点之间自动复制。
You should store the configuration in a resource that is handled by the cluster. You can store the config file on a disk partition that belongs to the same resource group as your service. I think that it is also possible to mark registry keys as clustered so that they are automatically replicated between the cluster nodes.