Skip to content

Comment on Reddit: Lessons Learned From Scaling To 1 Billion Pageviews A Month

Comments

Stay as schemaless as possible. It makes it easy to add features. All you need to do is add new properties without having to alter tables.

And at the same time they use and praise Postgres a lot, so it cannot be about NoSQL.

I am wondering what they mean exactly. From my own tendency, it should mean use a few very big and narrow tables in the form of "who - do - what - when - where", eg "userA - vote up - comment1 - timestamp - foosubreddit", and also "userB - posted - link1 - timestamp - barsubreddit"

Then in the same table you get kinda all events happening in the site, and you are somewhat schemaless, in the sense that adding a new functionality do not require schema change.

If someone with inner insight can confirm this is not too far from what reddit team meant, I'd appreciate.

And at the same time they use and praise Postgres a lot, so it cannot be about NoSQL.

We had a basic schema that basically made postgres into a K/V store. So we had both.

Postgres is a great database. It makes a wonderful, really fast key-value store

^^ They probably have a basic schema, the rest is in KV store (guess)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.