Hacker News new | ask | show | jobs
by AlexC04 5483 days ago
Yes and no, I've spent the last two weeks building and launching a node.js project and it's really really fast.

Blazingly so.

I've got a PHP project at http://fstr.net and its pageloads take about 4 to 5 seconds under normal load. With my other project pageloads are less than a second most of the time (though there seems to be some variability when dealing with the first connection).

Both projects do essentially the same thing (query database, present list). It's really shocking just how much faster node.js is.

Another nice aspect of NODE with a MongoDB solution is that I can scale it very easily. On AWS I can send all traffic into a load balancer, then as the server's load increases I can just fire up additional (CLONE) instances and add them to the load balancer.

A reserved Amazon micro instance costs ~$5 per month or a 'high CPU' instance comes in at $17. Scaling node is really as easy as turning on another machine (or running multiple instances of the application on a machine with multiple cores).

2 comments

Compare the performance of almost anything to PHP and you're going to be delighted.

Yes, the V8 engine is fast. That's what it's designed for. But that's only remarkable because it's a JavaScript engine. You can get the same performance from Go (with better memory utilization to boot) or even Java.

> I've got a PHP project at http://fstr.net and its pageloads take about 4 to 5 seconds under normal load.

Whatever language you are using, if loading a page takes >1 second, you are doing something very wrong.

I have built web apps out of shell scripts that perform hundreds of forks and open dozens of files per request, and still easily managed <200ms response times while running on a crappy xen server.

>I have built web apps out of shell scripts that perform hundreds of forks and open dozens of files per request, and still easily managed <200ms response times while running on a crappy xen server.

With how much concurrency?

You're probably very right there. FSTR could definitely be 'tuned' to be faster, but since this one and the other have all other things held constant in terms of programmer skill, then doesn't it come down to the language?

I mean if I'm doing something wrong in PHP, then I'll likely make the same mistakes in node.

You are right though, PHP+apache can be just as fast as anything else. I'm told that apache has a lot of overhead because of all the modules that come enabled by default. Apparently by removing all but what you need, you get a system that's a lot faster.

That's a bit more advanced though - while node's quick by default.

Anyways, I'm far from a language zealot in any way. I've loved every language that I've worked in.

I'd love t see some of the stuff you're talking about that's lightning fast with hundreds of forks... sounds like something I could learn from :)

I clicked through and the site feels quite fast in comparison to a lot of other similar sites. It's the external social media stuff that takes ages to load.

Anyway, I think we all want to know more about those forking web apps you've made. They sound quite impressive.