[mongodb-user] Funadvice.com Re-launches on MongoDB

11 views
Skip to first unread message

Ericson Smith

unread,
May 19, 2010, 6:23:08 PM5/19/10
to mongodb-user
Hi all,

So we've relaunched http://www.funadvice.com using the excellent
MongoDB and MongoMapper. We get close to 6 million uniques monthly, so
its a fairly largish site.

I have to say, the newsgroup has been very helpful in more ways than
you all even know.

What is Funadvice?
We're one of the original Q&A sites, and were launched in summer 2003,
so we're dinosaurs at this. We've gone from PHP+Postgresql, to PHP
+Mysql to Rails+Mysql to Rails+Postgresql, and now to Rails+MongoDB
+Redis.

What are we using?

-- Software
* Rails 2.3.5
* MongoDB (1.4.2)
* MongoMapper
* Redis!

-- Hardware
* Centos server with 12 Gigs RAM and 16 cores
* 16 Cores
* 2 x webservers
* 1 x Solr Server
(from the awesome guys at serverbeach.com)

We're very happy with the outcome since launching yesterday, and
performance has been wonderful.

I'd say here are some things to watch out for:

1. Only load the attributes you need when doing a search, because they
have to be sent over the wire (same as SQL)

2. Don't overdo embedded data. Comments/answers works great for us,
because generally they're not so much, but we wanted to store some
"other" data with a certain kind of document, and we noticed the site
getting slower and slower... Break some stuff out if you have to, and
remember the 4Meg limit anyway.

3. Make sure you index stuff! We noticed the site slowing to a crawl
12 hours later... A stats table was growing like crazy and did not
have an index on a certain attribute. Elementary you say, but then,
when you're accustomed to the blazing speed that MongoDB offers, then
sometimes you overlook simple things. Sigh.

4. Get more RAM. Even though our DB is not that big, and is only
eating up 3 Gigs out of 12, we made sure to have the headroom
available. Servers with lots of RAM are cheap.

There are a bunch of things to watch out for, but once you do, the
upside is totally worth it. For instance, nightly backups which used
to render our old site inoperative for around 30 minutes, now last for
less than a minute... maybe 30 seconds most of the time. What does
this mean? We can do hourly backups without thinking about it.

We're big Postgresql guys, and we're migrating from that. We still
love you Postgresql, but MongoDB really made this project
interesting.

Ericson Smith
CTO
http://www.funadvice.com


--
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.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.

kevin

unread,
May 19, 2010, 10:11:47 PM5/19/10
to mongod...@googlegroups.com
wow! thanks for posting all the info

can you tell how you do backup? is just copying of the entire directory? or do you use mongodump?

thanks

Ericson Smith

unread,
May 19, 2010, 10:17:46 PM5/19/10
to mongod...@googlegroups.com
We just use mongodump. Then I ship that off to other servers, until we get replication started up.

- Ericson Smith

kevin

unread,
May 19, 2010, 10:30:40 PM5/19/10
to mongod...@googlegroups.com
how big is your database? do you have any kind of sharding set up?! any other info u can share!
thanks !

Ericson Smith

unread,
May 19, 2010, 10:32:48 PM5/19/10
to mongod...@googlegroups.com
Out DB is not that big... Under 10 million documents in total across tables.
Some things like keywords and stats are in the tens of millions.

We don't need sharding at the present time. One DB seems to get the job done.

- Ericson

Wouter

unread,
May 20, 2010, 11:23:36 AM5/20/10
to mongodb-user
If you only load data you need (#1), the number of embedded documents
(#2) won't matter anymore, will it?!

On May 20, 12:23 am, Ericson Smith <esconsu...@gmail.com> wrote:
> Hi all,
>
> So we've relaunchedhttp://www.funadvice.comusing the excellent
> CTOhttp://www.funadvice.com

Ericson Smith

unread,
May 20, 2010, 11:42:03 AM5/20/10
to mongod...@googlegroups.com
Very true, however in some cases we *have* to load them, and we're not up to 1.5.1 yet, which has the $slice operator :-)

- Ericson Smith
Reply all
Reply to author
Forward
0 new messages