Jürgen Jakobitsch wrote:
...

image you have a simple text file in the WEB-INF directory of a webapp named ClusterApp. this ClusterApp is deployed on three tomcats in a cluster. now comes a POST request, that updates the text file (adds one line to it).
now of course i need to synchronize the text file on all tomcats in the cluster.

Ok, let's imagine there are initially 3 identical simple text files, on each of 
the 3 tomcats.
And there are 2 clients accessing the load balancer.
In order to determine if they need to update the text file, the clients first request the text file to examine it. Their requests go to 2 different tomcats via the load-balancer. But it does not matter, since they both get the same response text file, since it is identical.
Now client A decides to update the file by adding a line XXX to it.
And client B decides to update the file by adding a line YYY to it.
They both POST their request at about the same time to the front-end, and the front-end (or whatever replication mechanism) sends each request to all 3 back-end tomcats.
When the 2 POST requests have been processed, what is the state of the 3 text 
files ?




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to