Is storing videos in mongodb gridFS a good idea?

1,779 views
Skip to first unread message

Projapati

unread,
May 28, 2013, 9:49:24 PM5/28/13
to mongod...@googlegroups.com
I really need some advice from experts in MongoDB.

Will it be a good idea to store user uploaded videos in mongoDB gridFS?

Here is the use case:

Writing (less frequent):
User uploaded videos will be processed and 2 versions .MP4 and .webm will be saved.
Video file can go 50MB in length for now and will increase in future.

Reading (most frequent):
Users will be streaming these videos from the site just like youtube or other video sharing sites.

My question:
Will mongoDB will be a good fit or should I go with regukar file system?

Scalability is also a top priority!! I am ready to give up some performance for scalability and flexibility as long as it is acceptable.

I am not seeing any good use case for storing videos in MongoDB.
Please help!!!!

Thanks

James Green

unread,
May 29, 2013, 4:52:20 AM5/29/13
to mongodb-user
By storing them in MongoDB you will obviously inherit the properties of the database - that is any sharding and replication provided. You can also store searchable metadata with your object.

Storing the videos on a filesystem may involve less overhead and greater simplicity but the onus is on you to ensure replication of files and the indexing of metadata somewhere.

You may wish to consider how many technologies you want to manage in making any final decisions.

James



--
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb
 
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Sam Millman

unread,
May 29, 2013, 5:59:46 AM5/29/13
to mongod...@googlegroups.com

Projapati

unread,
May 29, 2013, 11:43:03 AM5/29/13
to mongod...@googlegroups.com
Thanks James.

* Video thumbnails will be stored directly in the collection with other meta-data)

Metadata Indexing:
Video indexing will happen through Lucene which maintains a separate storage. At least that seems a great solution.

Sharding and Replication:
This will help scaling the application as it grows. How about performance/speed, maintenance, backup, recovery and cost associated?

File system:
If I use a file system, I know performance (streaming speed) will be best. I assume it will be cheaper as well.
How about scaling, maintenance, backup, recovery?

If you have any articles, white paper or case study, I would love to see it.

Thanks

Benjamin Petrin

unread,
May 29, 2013, 1:16:36 PM5/29/13
to mongod...@googlegroups.com
Another thing to consider: the videos are large static assets and could be well cached in a CDN...That would probably be the easiest way to scale the reads if scale becomes that much of a concern.

Projapati

unread,
May 29, 2013, 1:22:52 PM5/29/13
to mongod...@googlegroups.com
Using CDN is not immediate plan due to cost. Youtube only puts popular videos in CDN.

My my main concerns were the scalability of using a file system vs starting with gridFS.

I am not getting definitive answers or direction.

May be I will go with file system initially and then move to gridFS. 
I am somewhat confused & want to avoid spending time on solution that will give headaches.

Thanks
Reply all
Reply to author
Forward
0 new messages