views:

41

answers:

3

We have Java Enterprise applications deployed on to multiple servers. There are replicated servers running same application to load-balance(let's call them J2EE servers).Note that this is not clustered.

There is a common server (let's call it props server) which hosts all properties files relevant to all applications. The folder containing properties files is NFS shared between all the other J2EE servers. The issue is that you can see props server is a single point of failure. If it did not come up or if the NFS share gets corrupted, other servers wont be able to load properties.

What are the options to avoid this hard dependency ? Given the constraint that we do not want to duplicate property files to all servers.

+1  A: 

One of approaches would be for every J2EE server to have a cloned set of configuration files. This implies a constraint that every time a config is changed for one server it should be rsync-ed among all others (after the change is known to be OK).

The positive aspect is clear, you really have N independently configurable servers and a config change kills (if kills) only one server.

The negative aspect is that sometimes someone will forget to do 'rsync' & 'bounce' after a config change on a single box.

bobah
+2  A: 

If you are having this problem, the more scalable solution would be to look into using this:

http://java.sun.com/j2se/1.4.2/docs/guide/lang/preferences.html

This abstracts away things like where they are located. You can then have these settings stored in an LDAP server, cloned properties, or whatever is best - you can even use different mechanisms for different environments.

James Kingsbery
A: 

Take a look at the PAXOS algorithm. It is designed to bring multiple servers to consensus.

http://en.wikipedia.org/wiki/Paxos_algorithm

glowcoder