views:

310

answers:

2

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?

+1  A: 

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-.

hacker
+2  A: 

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.

David