Note that there are some explanatory texts on larger screens.

plurals
  1. POHow is re-population of replicated caches handled after system restarts
    text
    copied!<p>We have an application which is clustered and has a cache at its core. The cache is based on calculated data, build up from the underlying database (which is replicated too). It is used for fast look-up on streaming data, to make routing decisions on the fly.</p> <p>Since the data on which the cache is calculated, can be changed from any of the nodes in the cluster, we are thinking of making the cache replicated too so that we do not have to listen to replicated changes coming in from other nodes in the system, in a database specific manner. </p> <p>We have identified ehcache ( infinispan / hazelcast with nearcache being the other contendors ) as the possible cache implementation. So far so good. </p> <p>What I need to know is how this cache will be repopulated when the individual nodes or the entire application restarts. All the data that a node requires is present in the underlying database. So can each node simply load the data from its database and populate the cache after restarts? How will the cache then bring the cluster nodes to a single state? </p> <p>I understand that there are disk persisted caches - is that the way to go with ehcache? I did not want to use that as a first option since the single point of all the data is the database and that is the central authority for deciding which is the right data. </p> <p>Is there a way an app can reload the cache with all the data at restart and have all the caches do the same and sync up the deltas? I kind of think this is a hard thing to do and might not be viable since all the nodes will not have send all their keys back and forth. But wanted to be sure and wanted to know if there are any other strategies to handle this scenario.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload