0

I was installing ehcache on my application deployed on a Tomcat 6. I succesfuly saved on diskstore, re-used the saved data and catched an unclean shutdown of server.

Now i moved to the second step, which was the reason why im storing on disk. it's because we deploy the application on 2 clustered servers in case one goes down, the second takes over.

I thought about making both applications point to the same diskstore path.

  1. i dont know if it's possible or not
  2. do you think replicating the diskstore is better (i don't know how though)
  3. any other suggestions for how let both servers use the same version of the cache ?
  4. How to test this? is it correct if i deploy my application on two different tomcat 6 instances ? (because there is no clustering in this case)

Thank you

  • something that (i think) can be a solution but i know nothing about what it does or how to integrate : Terracotta Server Array.
Rami
  • 328
  • 1
  • 13

1 Answers1

1

You cannot share EhCache diskstore between 2 server. You have to go with one of the ways to distrubute EhCache.

You can try with RMI that does not require you to deploy another piece of software. It's documented here: http://ehcache.org/documentation/user-guide/rmi-replicated-caching.

A more scalable way is to use Terracotta Server Array but it's not anymore supported by Terracotta. They are now pushing for BigMemory (that is free for up to 4 nodes). It's not hard to set up, it connects your EhCache so they will always be synchronized across all your servers. It's a great piece of software but support and documentation is scarce. Start from here:

http://terracotta.org/documentation/4.0/bigmemorymax/configuration/configuration

robsf
  • 1,713
  • 3
  • 14
  • 26