News for hackers. Stuff that matters.
Re:AMA with Barack Obama by ashray on Wednesday August 29, 2012 @05:02PM (#4451228)
It looks like the Obama AMA has really caused some serious fires in reddit's backend infrastructure. The site's been down for the last 10 minutes.

I would've thought that they'd have brought in some additional computing power for such an event, should've been easy for them considering they have a cloud deployment. Maybe this gives them greater reason to hire more engineers. I found it impressive that they served billions of impressions with just 2 engineers a short while ago..

Also, it says a lot about the "Come Cloud with us, we'll help you scale" marketing bandwagon. We've seen time and again issues with EC2s infrastructure and if EC2 doesn't have issues right now (http://status.aws.amazon.com/) then it's just sad that they can't order a gazillion instances for this event and have it scale easily.

Definitely makes me think that we still have a long way to go to compute in a truly 'elastic' way.

reddit definitely does have some crazy infrastructure in place but this would've been one of the most important moments in reddit history (so far..) and I'm sad to see that their engineers are probably going to get blamed for this..

EDIT: Okay, they're back in read only mode.. I wonder how they'll hack in some write access for the AMA while keeping everything else read only. Time for some app server redeployments! Funsies!

EDIT2: And they're gone again sigh

Re:AMA with Barack Obama by philwelch on Wednesday August 29, 2012 @05:17PM (#4451348)
Cloud computing is cruise control for scaling, but you still have to steer.
Re:AMA with Barack Obama by tzs on Wednesday August 29, 2012 @05:40PM (#4451489)
How much advance warning did Reddit have that Obama was doing an AMA?
Re:AMA with Barack Obama by bolasanibk on Thursday August 30, 2012 @12:15PM (#4455303)
Re:AMA with Barack Obama by untog on Wednesday August 29, 2012 @05:07PM (#4451265)
I'd be more interested in seeing how a site using a service like Google App Engine responds. In theory their Cloud Storage should just keep on scaling and scaling, rather than forcing the admin to spin up more instances, set up database replication, etc, etc.
Re:AMA with Barack Obama by ashray on Wednesday August 29, 2012 @05:11PM (#4451292)
Well, to be fair maybe they didn't have enough notice to spin up additional instances and get replication completed beforehand but I highly doubt that considering how high profile this AMA is. The US President doesn't probably drop in on people / or websites :P

Yeah GAE might work better but they're a bit out of reach mostly due to the technologies that you are required to use. Any migration at that scale is a seriously massive matter.

I guess the funny thing is that you can't plan to grow that big. Usually it just happens suddenly (facebook/reddit style) and then you've got to make some tough architectural calls.

It's funny how folks are like "That's a problem I'd like to have..". I'm not sure they're very happy with this problem at this very moment.. sigh

Re:AMA with Barack Obama by mattmaroon on Wednesday August 29, 2012 @05:13PM (#4451316)
I don't know about websites, but the US President drops in on lots of places (restaurants for instance) as a matter of security. From what I understand with interviews, it's often not uncommon for the interviewer to get very little notice either at times.
Re:AMA with Barack Obama by ljd on Wednesday August 29, 2012 @05:08PM (#4451268)
AWS Elastic Beanstalk will do the same thing.
Re:AMA with Barack Obama by deno on Wednesday August 29, 2012 @05:24PM (#4451387)
Beanstalk has nothing to do with the database, which is the point of contention. Spinning up more app servers only helps with serving signed in users.
Re:AMA with Barack Obama by ljd on Wednesday August 29, 2012 @05:40PM (#4451488)
You can configure beanstalk to scale your database out as well.
Re:AMA with Barack Obama by deno on Thursday August 30, 2012 @06:43AM (#4453954)
Scaling out database is nothing at all like spinning up stateless app servers.
Re:AMA with Barack Obama by ljd on Wednesday September 05, 2012 @03:52PM (#4481119)
Well there is no magical database solution where you can do that and I have to make decisions on what I can buy today not on what may be magically developed in the future.

In this respect, application partitioning with a deployable schema is not a bad solution for what I do.

Re:AMA with Barack Obama by untog on Wednesday August 29, 2012 @05:10PM (#4451286)
AFAIK Reddit aren't using it. If anyone can clarify I'd love to hear more.
Re:AMA with Barack Obama by lobster45 on Wednesday August 29, 2012 @05:08PM (#4451275)
I agree that this is more of a problem with elastic cloud services than reddit engineers. I am sure that they anticipated the load and did what they could, but the traffic is surely immense
Re:AMA with Barack Obama by pippy on Wednesday August 29, 2012 @05:17PM (#4451341)
Stupid question: is the because reddits backend is in python?

I often hear that PHP + varnish is only limited by the size of the pipe. Can this scale on cloud platforms?

Re:AMA with Barack Obama by forensic on Wednesday August 29, 2012 @06:07PM (#4451651)
It's a stupid question because the particular dialect of assembler this was written in is completely irrelevant for performance considerations.

You've been brainwashed by the idiotic pop culture language wars that pretend a question like Ruby vs Python vs whatever has any meaning. These are debates over buzzwords, not reality.

All that matters is the database configuration and associated architecture. Not some buzzword drama.

Re:AMA with Barack Obama by xtracto on Thursday August 30, 2012 @08:59AM (#4454370)
Wow, news.ycombinator surely has become very offensive and attacking. So much that a person cannot ask questions about IT.
Re:AMA with Barack Obama by forensic on Thursday August 30, 2012 @04:00PM (#4456448)
"become" ?

4 years ago, stupid comments were brutally discouraged. People with stupid things to say would be dogpiled by negative comments.

It is pop culture that thinks asking stupid questions is a virtue.

Most people are just too tactful to tell the truth.

Re:AMA with Barack Obama by pippy on Thursday August 30, 2012 @11:01PM (#4458042)
The main issue with his post is he has no idea what he's talking about. He mentions languages neither interpreter is written in and talks about 'buzzwords', while all the products I mentioned are real things.
Re:AMA with Barack Obama by pippy on Thursday August 30, 2012 @10:59PM (#4458038)
I'm not sure what you're talking about. Both Python, PHP and Varnish are (mostly) written in higher level languages.

Also performance has a massive effect on how and what language a site is written in.

Re:AMA with Barack Obama by forensic on Wednesday September 05, 2012 @10:48PM (#4482629)
>I'm not sure what you're talking about.

My comment is sarcastic and abstract. A literal interpretation will not suffice to understand my meaning.

If you want it literally: the language this is written in is irrelevant, because the performance differences between the various languages are negligible next to the performance differences that come about due to the precise design of the website.

A poorly engineered website in a "fast" language will still be slower than a well-engineered website in a "slow" language. The actual language is completely irrelevant next to the implementation details.

>Also performance has a massive effect on how and what language a site is written in.

Not really. Experienced engineers understand that language is basically irrelevant for a situation like this. Whether it is written in Python or something else is irrelevant information.

Additionally, newbies tend to focus on "language" and "language wars" and the comparison between languages not for any engineering or technical reason. Newbies do this because languages represent buzzwords around which various communities congregate. The Python vs. Ruby fight is as irrelevant as the Presbyterian vs. Baptist fight. It is the psychological appeal of "identity politics" that motivates people to engage in these meaningless debates about buzzwords.

Re:AMA with Barack Obama by ashray on Wednesday August 29, 2012 @05:19PM (#4451365)
No, it's probably due to the massive number of reads/writes pumping through their system. I'm pretty sure that their database isn't able to handle what's going on at the moment.

Also, if you were to use Varnish as a cache, that wouldn't help you much with write access because every time there is a write (a new post..) you'd have to invalidate the cache. In a high volume scenario such as this (tons of posts coming in..), the page is as good as dynamic, even if you DO cache it for a bit.

Re:AMA with Barack Obama by natrius on Wednesday August 29, 2012 @05:53PM (#4451575)
Varnish can only really help Reddit with users who aren't logged in since every page is customized. It'd still help in high volume scenarios since Varnish solves the thundering herd problem: only one request (at most) will hit the database for each invalidation.
Re:AMA with Barack Obama by emidln on Wednesday August 29, 2012 @07:32PM (#4452045)
Vanish can cache snippets of content. They refer to this as Edge Side Includes.
Re:AMA with Barack Obama by natrius on Thursday August 30, 2012 @08:41PM (#4457632)
Reddit's customization is far more than snippets. I've used ESIs with Varnish extensively, and I don't think it would help much for authenticated Reddit users.
Re:AMA with Barack Obama by pippy on Thursday August 30, 2012 @11:02PM (#4458046)
Thank you, this is the answer that I was looking for
Re:AMA with Barack Obama by iso-8859-1 on Wednesday August 29, 2012 @05:56PM (#4451594)
Why ask it if you know it's stupid?

No, PHP+Varnish can not always scale. You're forgeting the most important important factor in this equation, the database. Varnish is simply for caching and you won't find any large site that doesn't have it. PHP is a scripting language and the runtime performance differences to other common web application languages (i.e. Python, Java) is negligible since you're using caching anyway. Here's what you should worry about if you want scaling: Your database, your data structures and your code quality.

Re:AMA with Barack Obama by ubernostrum on Wednesday August 29, 2012 @05:28PM (#4451413)
reddit's backend could be written in assembly hand-tuned by God Himself, and having half the world hit it at once would still cause bottlenecks at the database.
Re:AMA with Barack Obama by Havoc on Wednesday August 29, 2012 @05:50PM (#4451548)
The problem is that pretty much all of it is dynamically generated. Short of the sidebar & header there is nothing that is really static static. e.g. With all the comments it checks whether that person is on your friend list & colours those differently. Easy enough to do...but it doesn't scale well. They've got a blog explaining the issue(s) somewhere.
Re:AMA with Barack Obama by lobster45 on Wednesday August 29, 2012 @05:11PM (#4451298)
Looks like part of their infrastructure is still up. website is down, but I can connect on my mobile using baconreader app
Re:AMA with Barack Obama by morsegeek on Wednesday August 29, 2012 @05:18PM (#4451359)
I'm still able to access the AMA through Alien Blue on iPhone, so that part of their infrastructure must still be up.
Re:AMA with Barack Obama by Achshar on Thursday August 30, 2012 @02:55AM (#4453374)
I believe it was a surprise AMA, so no heads up to Reddit team.