Main Content

Magnolia Community Forums: Development: Clustering : Shared file system

  • gzalys
    Full name: Gediminas Zalys
    Posts: 27
    Last post: Nov 23, 2016 7:04:41 AM
    Registered on: Aug 13, 2015
    Clustering : Shared file system
    #1 by gzalys on May 13, 2016 12:36:02 PM

    Hi All,

    I am creating an application that allows public users to add content, it could be anything from images to videos to text.
    So once the content is added by the user to public instance it needs to be pushed back to author, so author can edit, or moderate etc...
    I seen some examples where this can be done using clustering with shared repositories, however i dont want to use DB to store media, not that performant .... :/

    I was thinking of keeping the images on each instance and synch them across (ftp?), but this also seems a bit iffy..., also it could result in inconstancies, plus you have huge duplication of the data.
    Ideally i would want media to sit somewhere, where it can be accessible by all of the nodes.

    Any suggestions?

    Many thanks!

  • runger
    Full name: Richard Unger
    Posts: 571
    Last post: Feb 1, 2017 9:54:59 AM
    Re: Clustering : Shared file system
    #2 by runger on May 17, 2016 3:32:00 PM

    Hi Ged,

    In JCR, large data items (over a configurable limit, typically 1KB) are stored in the "Datastore".

    The Datastore can be configured to live either in the DB (DBDatastore) or on the Filesystem (FSDataStore). Personally I have very bad experiences storing large media items (lets say >20MB in size) in the Database. Blob-Handling is terrible for most relational databases, and the most popular open source implementations are especially bad.

    So personally, I would not recommend storing large blobs to the Database in a production setup. I would go the Filesystem route. For all the other JCR data I would use the DB, but not for the Datastore.

    When using the filesystem, it helps to know that the JCR Datastore is "write once". The data blobs are written, but are never modified or overwritten. This means that File System locking and synchronization are not such a big issue as you might think. In order to get the JCR clustering with Datastore in FS to work, all you need is a simple (but reliable!) shared file system.

    So basically I would recommend the JCR cluster solution using a simple shared file system for the datastore, and the database of your choice for everything else.

    Regards from Vienna,


You don't have the permission to post on this thread

Sign in

To login on this forum, you can use your Magnolia Forge, Support or Partner account, or, below, your Google, Yahoo! or OpenID account. If you have trouble logging in, or any other sort of issue, please let us know in the Meta forum, on the user-list, or simply by email at forum-admin at magnolia-cms dot com.

* Required

... or sign in with:

  • icon http://{your-openid-url}
  • icon
  • icon