News for hackers. Stuff that matters.
Re:Surviving a traffic surge: Three techniques to scale your... by sp332 on Tuesday March 29, 2011 @10:20AM (#2382705)
If the blog supports comments, it needs to talk to databases.

Step one: Have your blog export all entries to plain HTML.

He did that.

A website hosting a blog, on the other hand, needs to serve files. And that's been a solved problem for fifteen years.

"Too few Apache threads" is a known problem, which he recognized as soon as he saw the load numbers.

Re:Surviving a traffic surge: Three techniques to scale your... by JoachimSchipper on Tuesday March 29, 2011 @11:11AM (#2382883)
> If the blog supports comments, it needs to talk to databases.

Sure, but it doesn't have to fall over. Outsourcing to Disqus is the easiest solution, but you can build your own AJAXy solution. Or just write out a new static file for each comment (if you're really overloaded, comments may take a while to be processed, but you can just serve the old page in the interim.)

Re:Surviving a traffic surge: Three techniques to scale your... by jasonkester on Tuesday March 29, 2011 @10:30AM (#2382743)
He did that.

Exactly my point. He did that and it worked.

If you have a blog that may one day see traffic, I'd recommend taking that bit of the post to heart and skipping the whole "serve blog content via the database" part altogether.

Re:Surviving a traffic surge: Three techniques to scale your... by saranagati on Tuesday March 29, 2011 @05:58PM (#2384684)
"If the blog supports comments, it needs to talk to databases."

No it doesn't. Comments aren't added all that much relative to how much your site is getting hit. It would make more sense that the page is just a static html file with a form. The form submits to your app engine (php/python/whatever) which adds the data to the database. That then triggers your static html file to be rewritten to display that comment as well. The only other modification you "may" want to make is set it so that browsers don't cache your html page so they can see new comments if they refresh.