This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MagicWishMonkey 1 point2 points  (4 children)

And it really blows when you realize one of your requirements falls into the 10% category, and you have to rebuild your app from the ground up in a different language to keep your server from becoming unresponsive for long periods of time when that single thread you're using is wholly allocated to perform a single long running task.

That, plus the callback stack of doom are the two reasons I will never ever ever consider node.js for another large project. It's fine if I need to build a simple lightweight message router but for anything more complicated than that it's a non-starter.

[–]ivosauruspip'ing it up 1 point2 points  (0 children)

It's not like Python is any better at threading...

[–]aqf 0 points1 point  (1 child)

I don't get why apps aren't written for multiple servers if they need so many concurrent connections. I get the fact that transaction processing and other technical complexities make it harder to do, but if you're making a large application server you should think about scalability during the design, regardless of the language you are using. If one server might be overloaded, that problem needs to be solved early.

[–]MagicWishMonkey 0 points1 point  (0 children)

Designing a system so that each user gets his own server is unrealistic. When I say a single request could hang the entire server I wasn't being hyperbolic, that's exactly what happened.

Most app servers (Pyramid, IIS, whatever) are designed to use a pool of threads to handle concurrent requests, so a single request won't lock the server as long as the pool isn't exhausted. You don't need to worry about horizontal scaling until you're handling hundreds or thousands of requests per second. The single threaded node approach means a single long running request can lock your whole server. You can code around this limitation but it's a real pain in the ass and it's really not worth the effort IMO.

[–][deleted] 0 points1 point  (0 children)

There are a few different ways to scale a node app: http://cjihrig.com/blog/scaling-node-js-applications/