News for hackers. Stuff that matters.
Re:TC Slows Hacker News - Start the Arc can't scale rants. by immad on Monday March 10, 2008 @06:18PM (#133517)
The slowness is a self-defense mechanism. Slow down new signups and submissions.

Its genius really

Re:TC Slows Hacker News - Start the Arc can't scale rants. by wehriam on Monday March 10, 2008 @08:10PM (#133602)
Arc can heal.
Re:TC Slows Hacker News - Start the Arc can't scale rants. by pg on Monday March 10, 2008 @06:11PM (#133507)
At these moderate loads the problem is more likely to be in the design of the web server than the language itself.
Re:TC Slows Hacker News - Start the Arc can't scale rants. by pg on Monday March 10, 2008 @11:18PM (#133804)
In fact it was a design flaw, though not in the server.

The code for checking whether a username was taken was inefficient, so it was taking a huge amount of time to create a new account. The culprit was this line:

  (some [is dcuser (downcase _)] (keys hpasswords*))
The reason the TechCrunch post slowed the site down so much was not the traffic per se but the number of those visitors who were creating new accounts. I pasted a fix into the repl, so the site should be faster now.

Thanks to Rtm for narrowing the problem down to account creation.

Re:TC Slows Hacker News - Start the Arc can't scale rants. by Flemlord on Tuesday March 11, 2008 @12:40AM (#133895)

   The reason [the site was slow] was not the traffic... 
   but the number of visitors who were creating new accounts.
The only better startup problem than that is "the site was slow because so many people were trying to give us money that our credit card processor crashed".
Re:TC Slows Hacker News - Start the Arc can't scale rants. by TheTarquin on Tuesday March 11, 2008 @01:08AM (#133924)
My friend Mike once told me: "When you can't tell the difference between public opinion and a DDoS, you're either doing something right, or doing something horribly wrong."
Re:TC Slows Hacker News - Start the Arc can't scale rants. by iamelgringo on Tuesday March 11, 2008 @05:40AM (#134102)
Are you coding live on the server? Or do you have a test platform that you work on first, and then past working code to the repl on the webserver?
Re:TC Slows Hacker News - Start the Arc can't scale rants. by almost on Tuesday March 11, 2008 @08:09AM (#134149)
Any chance you could fix a bug in the header handling as well? It's not accepting "Content-length" headers (lower case l) which is perfectly acceptable HTTP and happens to be what w3m produces. Means I can't post comments from w3m.
Re:TC Slows Hacker News - Start the Arc can't scale rants. by joecomotion on Tuesday March 11, 2008 @02:23PM (#134486)
What type of tests do you guys maintain for news.yc other than the live deployment? Did this hiccup result in something like an account creation stress test being added to an automated test suite?
Re:TC Slows Hacker News - Start the Arc can't scale rants. by Hexstream on Tuesday March 11, 2008 @04:44AM (#134077)
Hope you'll actually commit the change to the codebase so that the problem doesn't resurface on server restart like it happened once...
Re:TC Slows Hacker News - Start the Arc can't scale rants. by Excedrin on Tuesday March 11, 2008 @12:44AM (#133899)
I wish my webserver had a repl.
Re:TC Slows Hacker News - Start the Arc can't scale rants. by pg on Tuesday March 11, 2008 @02:01AM (#133970)
Re:TC Slows Hacker News - Start the Arc can't scale rants. by nostrademons on Tuesday March 11, 2008 @09:28AM (#134181)
Django has a shell that automatically loads all model objects. If you've got a decent shared-nothing architecture and point your config to the live DB (bad idea, but for the sake of argument...) that's effectively a REPL for the webserver.

For that matter, you can get the same effect with the MySQL prompt and a shared-nothing PHP architecture.

Re:TC Slows Hacker News - Start the Arc can't scale rants. by anewaccountname on Tuesday March 11, 2008 @12:45PM (#134365)
>For that matter, you can get the same effect with the MySQL prompt and a shared-nothing PHP architecture.

I see how you could, say, drop a user from the users table using this; but how would you fix a login bug like the one under discussion?

Re:TC Slows Hacker News - Start the Arc can't scale rants. by nostrademons on Wednesday March 12, 2008 @01:18PM (#135279)

  EXPLAIN SELECT username FROM users WHERE username = $dc_user
Then look at the output, and either

  CREATE INDEX users_username ON users(username)
Or cache the result, or do something else to fix the performance problem...

If you meant "How do you find out it was in the registration check?", that's what the slow query log and query profilers are for...

Re:TC Slows Hacker News - Start the Arc can't scale rants. by davidw on Tuesday March 11, 2008 @04:11AM (#134059)
FWIW, you can log into Erlang's Yaws.
Re:TC Slows Hacker News - Start the Arc can't scale rants. by musiciangames on Tuesday March 11, 2008 @05:36AM (#134099)
Re:TC Slows Hacker News - Start the Arc can't scale rants. by Xichekolas on Tuesday March 11, 2008 @11:32AM (#134273)
ruby script/console
Re:TC Slows Hacker News - Start the Arc can't scale rants. by Readmore on Monday March 10, 2008 @08:12PM (#133606)
I would agree. I just wanted to tongue in cheekly get this post over with.
Re:TC Slows Hacker News - Start the Arc can't scale rants. by wehriam on Monday March 10, 2008 @08:11PM (#133605)
I think your web server might be broken.
Re:TC Slows Hacker News - Start the Arc can't scale rants. by pg on Monday March 10, 2008 @10:16PM (#133755)
Rather a self-refuting comment...
Re:TC Slows Hacker News - Start the Arc can't scale rants. by pg on Monday March 10, 2008 @11:37PM (#133828)
I take that back. Though the problem was not in the server itself, the inefficiency in the account creation code was bad enough that it should be called a bug.
Re:TC Slows Hacker News - Start the Arc can't scale rants. by lyime on Monday March 10, 2008 @07:50PM (#133591)
I was hoping a big blog would NOT post about news.YC I would rather have this community be small and focused rather then become something like Digg.
Re:TC Slows Hacker News - Start the Arc can't scale rants. by iamdave on Monday March 10, 2008 @07:55PM (#133595)
This was bound to happen, I'm afraid. If TechCrunch didn't do it, some Digg kidd would have.
Re:TC Slows Hacker News - Start the Arc can't scale rants. by TheTarquin on Monday March 10, 2008 @10:03PM (#133742)
The TC front-paging: A clever Arc stress-test organized by Paul Graham? Investigative report at 11...
Re:TC Slows Hacker News - Start the Arc can't scale rants. by mixmax on Monday March 10, 2008 @06:05PM (#133497)
For a language that was released a month ago I would be surprised if it did scale.
Re:TC Slows Hacker News - Start the Arc can't scale rants. by ibsulon on Monday March 10, 2008 @07:13PM (#133564)
Time to write it in an enterprise language -- I suggest C++.

(Seriously, though, this should give pg and company some valuable benchmarking data for later on.)

Re:TC Slows Hacker News - Start the Arc can't scale rants. by thomas on Monday March 10, 2008 @08:30PM (#133632)
maybe it was just the server?
Re:TC Slows Hacker News - Start the Arc can't scale rants. by ltbarcly on Monday March 10, 2008 @07:39PM (#133581)
What about arc makes anyone think it can scale? Is there an example of a continuations based web server that can?
Re:TC Slows Hacker News - Start the Arc can't scale rants. by mrevelle on Monday March 10, 2008 @09:31PM (#133704)
Seaside (http://seaside.st), which powers dabbledb (http://dabbledb.com/).
Re:TC Slows Hacker News - Start the Arc can't scale rants. by zetaprime on Monday March 10, 2008 @09:06PM (#133676)
Hacker news was a welcome relief from Reddit and Digg, Reddit is so political now that there are few articles anymore about "the craft". Aside from the the prerequisite preachings from the "GREAT!" Paul Graham (amen brothers), there was some very germaine content at times. I will be curious to see how they weather the coming storm, of course they do have have an ARC. Lol, I know ver ver bad pun.
Re:TC Slows Hacker News - Start the Arc can't scale rants. by apathy on Tuesday March 11, 2008 @12:03AM (#133861)
programming.reddit is not bad.

But, yeah, if you're a hacker, hacker news is better yet.