-
1. Re: Infinispan cluster with shared file cache store.
nadirx Feb 25, 2016 8:50 AM (in response to c0ff75)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.
-
2. Re: Infinispan cluster with shared file cache store.
c0ff75 Mar 24, 2016 5:48 PM (in response to nadirx)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.
Best regards,
Eugeny
-
3. Re: Infinispan cluster with shared file cache store.
wdfink Mar 25, 2016 11:22 AM (in response to c0ff75)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
-
4. Re: Infinispan cluster with shared file cache store.
c0ff75 Mar 25, 2016 6:52 PM (in response to wdfink)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:
<global-state>
<persistent-location path="/mnt/shared/cache_global" />
<temporary-location path="/mnt/shared/cache_global/tmp"/>
</global-state>
Is it correct? In documentation I can't find exact explanation about it. I think that global state must be shared between all nodes.
Best regards,
Eugeny
-
5. Re: Infinispan cluster with shared file cache store.
wdfink Mar 28, 2016 4:08 PM (in response to c0ff75)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
-
6. Re: Infinispan cluster with shared file cache store.
nadirx Mar 29, 2016 8:47 AM (in response to wdfink)Graceful shutdown is not merged yet, but will be soon.