News for hackers. Stuff that matters.
Re:Steve Huffman on Lessons Learned at Reddit by shazow on Saturday February 26, 2011 @12:03PM (#2265907)
I'm always reluctant about going completely schemaless. Reminds me of the blog post by FriendFeed about how they use MySQL, highly recommended: http://bret.appspot.com/entry/how-friendfeed-uses-mysql

I feel like like there needs to be a better middleground for having some schema but being able to augment it easily with metadata that you're not querying against (yet). Then later extracting the metadata into queryable columns.

I wrote a post outlining some ideas of how to do this: https://github.com/shazow/everything/blob/master/idea/arbitr...

I've only implemented bits and pieces of this in practice, huge convenience so far.

Re:Steve Huffman on Lessons Learned at Reddit by joshu on Saturday February 26, 2011 @06:53PM (#2266878)
I think this is exactly right. Have a document store and a (separate?) index store.
Re:Steve Huffman on Lessons Learned at Reddit by iamclovin on Sunday February 27, 2011 @03:47AM (#2267539)
James Golick implemented this idea in Ruby last year: https://github.com/jamesgolick/friendly

We used Friendly at my previous company wego.com and t worked quite well although I don't know shehar they at still using it. (Friendly doesnt look like it's in activ development)

Re:Steve Huffman on Lessons Learned at Reddit by runningdogx on Saturday February 26, 2011 @09:41PM (#2267152)
I don't understand the fetish with caching every variation for every user.

Here's a thought: dynamic apps should render a page exactly one way in html, and rely on javascript and cookies to post-process the site so it APPEARS to be customized for that particular user. That includes admin widgets.

That particularly applies for displaying how many minutes ago something was generated. Serve it with a date-time format, use javascript to post-process into "x seconds ago" or "x minutes ago".

If someone isn't logged in, or isn't an admin, and they hack their javascript to display user or admin stuff, who cares? The user/admin requests sent to the webserver won't succeed anyway, because they rely on having an admin session cookie.

If there's meaningful rather than just UI stuff that users or admins get to see, then you have to cache that separately, but you can even do stuff like loading it dynamically with js so the publicly visible (cached) content can still be used, and you cut down the amount of stuff your server has to auto-generate. It can cache the separate pages (xml, json, whatever) that serve the logged-in user content, as well.

Re:Steve Huffman on Lessons Learned at Reddit by apu on Saturday February 26, 2011 @03:16PM (#2266407)
Note: the talk is from May 2010.

I wonder if Steve (or rather, jedberg or someone else at reddit) were to give the talk today, if 'memcache' and 'memcachedb' would both be replaced by Redis?

Re:Steve Huffman on Lessons Learned at Reddit by jedberg on Saturday February 26, 2011 @09:31PM (#2267136)
We replaced memcachedb with Cassandra a while ago, because memcachedb pretty much hit a wall at some point.

As for replacing memcached, I'm certainly open to it, but from what I've read, the performance of memcache for what we use it for is better than redis.

Re:Steve Huffman on Lessons Learned at Reddit by spez on Saturday February 26, 2011 @07:41PM (#2266967)
Maybe? There's something to be said for memcache's simplicity, however.
Re:Steve Huffman on Lessons Learned at Reddit by p90x on Saturday February 26, 2011 @04:59PM (#2266633)
another lesson could be: "don't make a site that appeals to people who use ad-block. revenue won't keep up with demand."
Re:Steve Huffman on Lessons Learned at Reddit by patrickod on Sunday February 27, 2011 @08:44AM (#2267810)
many users (myself included) add an exception to adblock for reddit. I don't mind helping their ad revenue when the ads aren't that intrusive.
Re:Steve Huffman on Lessons Learned at Reddit by code_duck on Saturday February 26, 2011 @07:12PM (#2266917)
That's a good basic overview on what it takes to keep a site the size of Reddit (a year ago) afloat. I need to think more about caching, personally.

Reddit has done a great job of serving a massive amount of traffic, given the size of their staff especially.

Re:Steve Huffman on Lessons Learned at Reddit by dwc on Saturday February 26, 2011 @01:22PM (#2266114)
Watching the video made me feel a little uncomfortable. I come away with the impression that they almost, but not quite, really understood the important lessons.

Still, it was well worth watching and I'm glad Huffman decided to go there.

Re:Steve Huffman on Lessons Learned at Reddit by natsel on Saturday February 26, 2011 @11:06AM (#2265793)
Why did they use Python in the first place? Reddit is still kind of unstable.
Re:Steve Huffman on Lessons Learned at Reddit by simonw on Saturday February 26, 2011 @01:20PM (#2266105)
Are you trolling? Site stability issues very rarely have anything to do with the underlying programming language, unless you're using some experimental language that no one else is using for web development (and even then, Arc seems to be working pretty well for HN).
Re:Steve Huffman on Lessons Learned at Reddit by Pewpewarrows on Saturday February 26, 2011 @11:39AM (#2265868)
It's half a dozen employees constantly trying to keep up with what is now a 1 billion page views a month site. From what I understand they're carefully trying to balance getting new hires (which Conde Nast now lets them do) and keep the damn ship afloat.
Re:Steve Huffman on Lessons Learned at Reddit by pjscott on Saturday February 26, 2011 @01:13PM (#2266086)
In the very first place, actually, they wrote the initial version in Lisp. The Python code was a later rewrite.
Re:Steve Huffman on Lessons Learned at Reddit by curtis on Saturday February 26, 2011 @11:59AM (#2265905)
Reddit was stable for a long time. It's really only been the last few months (~6?) that they've been suffering serious service outages.
Re:Steve Huffman on Lessons Learned at Reddit by jedberg on Saturday February 26, 2011 @02:40PM (#2266320)
Actually, our uptime has been better for the last 6 months than the previous few years.
Re:Steve Huffman on Lessons Learned at Reddit by ecuzzillo on Saturday February 26, 2011 @04:56PM (#2266625)
I don't go on reddit often enough to have any idea about the uptime, but out of curiosity, do you think there's anything that could give someone the impression it was worse recently?
Re:Steve Huffman on Lessons Learned at Reddit by crystalis on Saturday February 26, 2011 @06:00PM (#2266743)
There's enough users that each 3 second downtime is long enough to get someone who submits stories like 'WHY WAS REDDIT DOWN' and enough upvotes to stay on the front page long enough for everyone else to see it. And then recency effect kicks in as soon as reddit is down for another 4 seconds later on.
Re:Steve Huffman on Lessons Learned at Reddit by spez on Saturday February 26, 2011 @07:45PM (#2266971)
That's a bit of a stretch... That "reddit is under heavy load" page is an abomination.
Re:Steve Huffman on Lessons Learned at Reddit by jedberg on Saturday February 26, 2011 @08:52PM (#2267079)
Try turning admin mode off. :)
Re:Steve Huffman on Lessons Learned at Reddit by irahul on Saturday February 26, 2011 @01:20PM (#2266106)
The site is unstable doesn't mean Python is to blame. Perhaps you can elaborate why do you think so.
Re:Steve Huffman on Lessons Learned at Reddit by random42 on Saturday February 26, 2011 @03:38PM (#2266468)
I dont think reddit's stability is as bad as it looks. Just that Reddit's community is pretty vocal on it. IIRC, they have availability in high 90s (may be jedberg can confirm).
Re:Steve Huffman on Lessons Learned at Reddit by jedberg on Saturday February 26, 2011 @09:35PM (#2267143)
Yes, we are above 99%. We just have a community that is very vocal with things are broken, and then continue to be vocal about it after it is fixed because it is funny.

For example, we heard "search sucks" for weeks after we switched to the new service, until we announced the switch, and then all of a sudden the tune changed. :)