Hi Eugeny, none of the file-based stores can be configured as shared, so you really need to rely on one of: JDBC, Cassandra, Redis.
Hi, Tristan Tarrant
If I will use any JDBC cache store then I will create single point of failure in my configuration. Plus I should spend additional hardware for running some database (processors and RAM). It isn't good.
My current Infinispan cluster configuration may be isn't beatyful, but it works:
- each node have own file store (LevelDB) in separate disk folder
- all nodes synchronized via JGroups
Good sides of this solution:
- I spend only disk space, but today this isn't expensive
- Each node of my configuration is exactly same as others. I can copy it, start or stops in any time.
Bad side of the solution:
- node crashed >= numOwner for DIST caches and you loose data
- complete cluster shutdown must be done carefully to not loose data or have stale data / inconsistent cluster nodes
This has been solved by "graceful shutdown" in later Infinispan versions
Hi, Wolf-Dieter Fink !
Thanks for answer. It has very useful information for me!
> - node crashed >= numOwner for DIST caches and you loose data
I have no distributed caches in my configuration, I use only replicated caches.
> - complete cluster shutdown must be done carefully to not loose data or have stale data / inconsistent cluster nodes
Thanks. I have configured persistency of global state now. All my cluster nodes uses same directory for it:
<persistent-location path="/mnt/shared/cache_global" />
Is it correct? In documentation I can't find exact explanation about it. I think that global state must be shared between all nodes.
FileStores are not designed to be shared. You can't sync the access to the file (only lock the complete file).
So use the same file does not mean you have a correct working shared persistence. As Tristan said you need to have a persistence which can handle this correctly
Graceful shutdown is not merged yet, but will be soon.