在网络场中的 IIS 服务器之间同步外部配置

发布于 2024-07-12 10:58:34 字数 577 浏览 6 评论 0原文

我一直在努力寻找最佳方法来确保某些 XML 配置文件在 Web Farm 中的多个服务器之间保持同步。 我不一定关心 Web.Config,但我关心应用程序中存在的一些其他配置文件。

例如,我们将缓存策略存储在外部 XML 文件中,该文件具有自己的架构,并且很快将拥有自己的工具来维护值。 应用更改后,它们应该在整个服务器场中迁移。

到目前为止我考虑过的一些场景:

  • RoboCopy、复制或等效方案。 这要求工作只能在场的特定节点上完成。 (推送到应用程序。)
  • 配置服务器。 所有外部配置及其工具都存储在 IIS 的物理实例上。 应用程序将在应用程序启动时检索这些配置文件并定期轮询更改。 (申请投票。)
  • 团队建设。 我们可以在内部托管这些工具,并设置构建后流程来部署文件。 (应用程序民意调查。)
  • 数据库存储。 应用程序可以读取并轮询数据库以进行配置。 (应用程序民意调查。)

所有这些场景都有其优点和缺点。 我不确定最好的解决方案是什么,尽管我认为应用程序轮询更改可能是最干净的方法。 不过,问题是您认为哪种方式最能实现这一目标?

I have been struggling with the best way to make sure that the certain XML configuration files stay synchronized between multiple servers in a Web Farm. I am not necessarily concerned about the Web.Config, as much as I am concerned about some of the other configuration files that are present in the application.

For example, we store caching policies in an external XML file, where it has its own schema, and will soon have its own tool to maintain the values. Once the changes are applied, they should be migrated across the farm.

Some scenarios that I have considered so far:

  • RoboCopy, replication, or equivalent. This requires that work only ever be done on a particular node of the farm. (Push to application.)
  • Configuration Server. All external configurations and their tools are stored on a physical instance of IIS. The application will retrieve these configuration files on application start and periodically poll for changes. (Application polls.)
  • Team Build. We could host the tools in-house and set up a post-build process to deploy the files. (Application polls.)
  • Database Storage. Applications could read and poll database for configuration. (Application polls.)

All of these scenarios have their pros and cons. I am not sure what the best solution is, although I think having the application poll for changes might be the cleanest approach. Still, the question is which way would you best consider this to be accomplished?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

寄居者 2024-07-19 10:58:34

我有运行 Windows Server 2008 的 Web 集群。为了保持所有内容同步,我使用每个成员上的 DFS 共享。 对任何成员所做的任何更改都会复制到其他成员。 我还使用 IIS“共享配置”功能将我的配置数据库存储在此 DFS 共享中。 这样,所有 IIS 设置也会被复制。

I have web cluster running Windows Server 2008. To keep everything synchronized I'm using a DFS share that is on each of the members. Any changes made to any of the members are replicated to the others. I'm also using the IIS "Shared Configuration" feature to store my metabase within this DFS share. That way all of the IIS settings are replicated as well.

一身骄傲 2024-07-19 10:58:34

在我从事的一个项目中,我们使用名为 ServerSync 的产品来复制服务器场上的文件。 它工作得很好而且速度很快。

On a project that I worked on, we used a product called ServerSync to replicate files on the farm. It works pretty good and it is -fast-.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文