While you can only use MySQL for the main Magento database, you can use Redis and Memcached for fast cache and session storage. This is particularly useful for cluster systems.

So what about for media_storage? According to this post the xml has two interesting nodes: model and type. Where are the possibilities for those nodes defined, and do they imply that I can use another database for media storage?

2 Answers 2


That's correct, you can use a second database connection for media storage. As far as I know Magento CE only supports MySQL at the moment, at least for it's default connection.

  • +1 but not accepted, yet: I'm hoping for a more detailed explanation of what databases are supported. As I said, Redis and Memcache are supported for some times of shared storage, but are they supported for media storage?
    – kojiro
    Apr 3, 2013 at 16:03
  • As far as I was able to find out only MySQL Database or file system is supported. In the directory app/code/core/Mage/Core/Model/File/Storage you can find 2 classes; database.php and file.php. If any other methods were supported they should show up here. This might however be a nice place to start from if you want to create a new method. Memcached based image handling might not be a smart idea. If you restart the server all images will be lost Apr 3, 2013 at 18:39

No. Only MySQL is supported.

But why bother?

A simple NFS share is sufficient - even more so when you cache static content at the network edge.

Memcache and Redis (whilst they can store binary data) - are grossly inappropriate, how much RAM are you willing to waste for data that should be stored on disk and very infrequently accessed?

Even MySQL is a poor choice, you're congesting your DB with binary data that need not be in there.

  • 1
    Well, 1. I'd use a separate database. 2. Magento only queries the file from the database if it is not found on the FS. 3. I could set up an NFS share, but then I'd have an single point of failure on a server filesystem. Better to use a SAN, I suppose, but database clustering is already in place, more widely supported and cheaper.
    – kojiro
    Apr 3, 2013 at 17:50
  • 1
    A dedicated pair of SAN appliances is unnecessary, expensive and completely unsuitable for Magento as it still presents a block device to each machine. So you either have to use a multi mount aware file system (eg. OCFS2) or still use NFS. NFS was designed exactly for this purpose, to share a file system amongst many machines with little-to-no overhead. It can very easily be made highly available - in fact its A LOT easier to configure and manage than MySQL master-master. MySQL is a grossly inappropriate, more expensive choice. Apr 4, 2013 at 7:53
  • @sonassi Any recommendations on mitigating the single point of failure of the NFS server?
    – ianjs
    Jun 24, 2014 at 8:44
  • Heartbeat + DRBD + NFS. Its what we use on MageStack. Jun 24, 2014 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.