Type of server to choose to deploy MongoDB

51 views
Skip to first unread message

Projapati

unread,
Apr 16, 2012, 7:04:47 PM4/16/12
to mongod...@googlegroups.com
Hi,
I spent few days to get answers from various hosting companies on what type of server I need to use for our MongoDB database.
The web + db is ruuning in the dev environment on single server.

We need to deploy to production quickly.

Application puts all user uploaded photos and videos in GridFS (original repository). We have large number of files to store.
These will be served via CDN eventually but not during first few months.

Given this:
  • The database will get very very large in size in terms of data volume (videos are 20MB in avg size)
  • Shards should scale horizontally
  • Multiple web front end might query the database simultaneously
  • Data can easily be backed up
  • Faster lookup/query
Different hosts have recommended different options & I am confused:
  • Some suggests to use a dedicated server with large disks (TBs in size) for DB
  • Some suggests to use a cloud server with big disks (GBs in size) as it will scale
  • Some suggests to use a VPS with big disks (GBs in size)

The web servers will be one/more cloud servers.

What type of server setup should we choose so that the database grows by automatic sharding?

Thanks for helping



A. Jesse Jiryu Davis

unread,
Apr 17, 2012, 11:42:09 AM4/17/12
to mongod...@googlegroups.com
All those options are valid depending on the specifics of your use case. A heavy write volume will indicate going for many servers rather than few, in order to avoid queueing on the write lock. You can use replica sets for redundancy in any of these configurations.

What ratio of reads / writes do you expect? Will recent uploads be more frequently accessed, or will read access be fairly random? Will you need to scale out predictably or may there be situations where you must add capacity on short notice?

Projapati

unread,
Apr 17, 2012, 12:50:20 PM4/17/12
to mongod...@googlegroups.com
Our site is a public site like youtube+flickr combo.

There will be more reads definitely. Don't know that exact ratio.

Recent uploads may be accessed more frequently for some time as friends, people will be browsing them. Then mostly random when people browse related videos/photos or search.

Scaling will be little predictable as we may need additional hardware on short notice on specific event that causes lots of people uploading contents.

A. Jesse Jiryu Davis

unread,
Apr 17, 2012, 1:34:07 PM4/17/12
to mongod...@googlegroups.com
Having a high ratio of reads to writes will mean you can get away with fewer servers, since many readers can share the read lock but only one writer can use the write lock. Unpredictable scaling needs indicate you should go with cloud servers rather than dedicated hardware, or at least that you should be prepared to add cloud servers to a mostly-dedicated deployment. 

If reads are heavily biased towards recent data that'll require less RAM because your working set will be a smaller proportion of your total data.
Reply all
Reply to author
Forward
0 new messages