5 Replies Latest reply on Jan 27, 2010 5:38 AM by Manik Surtani

    File based storage in a cluster

    John Ament Master

      Hey there, so I've been playing with infinispan a little bit here and there and I'm trying to use it in an up coming project.  The basic requirement is to read some data from a remote system and cache it.  I can't read it in real time as the team that maintains this system is very concerned about performance.  What I"m hoping that I can do is cache the data, and use a disk based store to keep it.  What I really need to know though is:

       

      1. Can I store it on disk, and have it survive a restart?  Will infinispan load the data automatically from this location at start up?

      2. There's going to be two nodes, and we're big on shared file systems (OCFS).  Should the disk be shared?

        • 1. Re: File based storage in a cluster
          Mircea Markus Master

          1. Can I store it on disk, and have it survive a restart?

          Generally yes, at least the ones that ship with ISPN by default.

          Will infinispan load the data automatically from this location at start up?

           

          Yes, just set the preload attribute to true:

          <loaders passivation="false" shared="true" preload="true">

           

           

          2. There's going to be two nodes, and we're big on shared file systems (OCFS).  Should the disk be shared?

          so that you store all the data only once? Yep, that is possible. Just use a SingletonStore:

          <singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000"/>
          • 2. Re: File based storage in a cluster
            John Ament Master
            well, not just possible but is it advisable? Personally, I dont' like the idea of shared file systems, but an SA I work with seems to like them a lot.  I'd prefer to have a separate file system on each server, but if there's strong recommendation to put it shared, I can get it on a shared file system.
            • 3. Re: File based storage in a cluster
              Mircea Markus Master
              Just to make sure I understood your setup correctly: you want all your servers to store data in the same, network-shared directory. That should work perfectly fine, just make sure you use the singletonStore, as mentioned. I.e. is advisable, and will even increase performance  as at all times only one node will write write to the persistent storage.
              • 4. Re: File based storage in a cluster
                John Ament Master
                Right, that pretty much describes the situation we have.  I don't believe our cache will be all that large, so i'm trying to figure out what exactly is going to be the performance difference in both cases.
                • 5. Re: File based storage in a cluster
                  Manik Surtani Master
                  You could try both approaches and see which performs better for your use case.  The change would only be in the config file so switching would be trivial.