0

Our application interacts with a content management system (SAAS solution on the internet) for fetching video and image data.We are planning to have a DB in our server env to cache the content and use it as fallback option. We are evaluating the database that can be used for caching video & image content. Is a document oriented DB such as couchbase capable of supporting it and is it an appropriate choice for this use case or should I evaluate using RDBMS such as mysql? If there is a more appropriate database technology that can be used for this use case , please suggest.

Punter Vicky
  • 15,954
  • 56
  • 188
  • 315

1 Answers1

1

You won't want to use Couchbase for a case where you cache very large files due to the 20MB size limit for Couchbase documents.

In fact, you probably don't want to store videos in the database at all. See the discussion about this question. Even though you it's about images, the same issues apply to video. Check Kirk's blog for some better approaches, such as using a file storage service like Swift or Amazon S3.

Edit: Clarified the size limit applies to documents and added the link to Kirk's blog post on the topic from the comments.

Community
  • 1
  • 1
  • Thanks Will. Does it mean that CMS wouldn't internally use a database but rather rely on file stores ? – Punter Vicky Jan 13 '16 at 04:04
  • Also is there a 20 MB limit for couchbase documents ? – Punter Vicky Jan 13 '16 at 04:04
  • CMS do store binaries on file system. Some advanced CMS allow you to store it somewhere else like amazon S3. Some CMS allow you to publish binaries to a CDN. There is many choices. Most of them store binaries metadata in a database. And yes there is a 20Mb document size limit in Couchbase. – Laurent Doguin Jan 13 '16 at 08:00
  • Thanks Laurent. Is there a way to increase this limit - I saw there is some config file which could be used to increase this limit but I'm not sure if this is a bad idea. I also saw a list of db oriented cms , but I assume the point is that it isn't a good practice. – Punter Vicky Jan 13 '16 at 13:39
  • 1
    In my opinion it is a terrible idea to store any larger binary content in a database long term, Couchbase or otherwise. I have been the DBA on an Oracle database where this was done and it was horrible from many perspectives. http://blog.couchbase.com/2016/january/large-objects-in-a-database – NoSQLKnowHow Jan 13 '16 at 16:01
  • I would look into solutions like Nuxeo, or lower level like S3+Database, Joyent Manta, etc.. – Laurent Doguin Jan 13 '16 at 17:28
  • AFAIK you cannot change the max size, and it is a good idea that it is limited. You can store the metadata of your medias in Couchbase, but for the media themself store them on a Disk, or Storage (S3 or other) and use CDN to deliver it/cache data for your users ( https://en.wikipedia.org/wiki/Content_delivery_network ) – Tug Grall Jan 14 '16 at 11:42