0
votes

I have a Tomcat cluster (Apache httpd front-end, proxying a Tomcat cluster), with 2 nodes in the backend, everything on Windows server 2008. The Tomcat nodes serve a webapp, which has some configuration files in their respective instance directories. The configuration files can get written run-time by an administrator. Upon the next restart, the changes are picked up by the webapp.

I wish to synchronize the configuration files in real-time, without delays and should handle a possible split-brain - like the drbd tool does in Linux.

  • The above described setup is relatively small with only 3 physical servers (Apache load balancer and backend nodes), and using anything like a separate database, hadoop etc. is not very economical. Also the configuration files are relatively small.
  • From some search, came across many standalone utilities - FreeFileSync, SyncToy, Synkron etc. None of them really fits my criteria.
  • Programmatic syncing is not very ideal, a split brain scenario can make things messy.

Unfortunately there are no drbd alternatives for Windows, and so here is my question :

  • What is the easiest/safest and open-sourced way to sync files in real-time in a Windows environment.
  • Are there any built-in solutions for file syncing for a Tomcat cluster (I couldn't find much from the documentation).
  • Any other possibilities I can sync the configurations across in a Tomcat cluster ?
1

1 Answers

0
votes

If you're not going to access them too often, I would use a shared network folder or a common storage area. Basically, you've to configure each webapp to look up its configuration files from that network path instead of their instance directory.

You could also use Dropbox/Drive/ APIs and read/store the conf there. (You'll have also versioning features as a bonus, too)

Both options are slower than local access, but usually performance isn't an issue when updating conf files.