Live data from Hacker News

On problems with threads in Node.js

future-processing.pl

1–10 of 66 posts

Re: On problems with threads in Node.js

#5
To sum it up: node.js runs only 4 background threads. Be aware of this.

No big deal really. I have multiple servers running node.js under load for 3+ years and never had an issue with this.

In fact, I found it helpful. If your database is under load and is already running 4 heavy queries, not giving it any more jobs is actually a good thing.

Re: On problems with threads in Node.js

#6
post #5

To sum it up: node.js runs only 4 background threads. Be aware of this. No big deal really. I have multiple servers running node.js under load for 3+ years and never had an issue with this. In fact, I found it helpful. If your database is under load and is already running 4 heavy queries, not giving it any more jobs is actually a good thing.

On the other hand, not being able to hit the filesystem because you have those four queries running is... not so helpful.

In general, this looks like it could be a performance bottleneck for highly-concurrent applications.

Re: On problems with threads in Node.js

#7
post #6
post #5

To sum it up: node.js runs only 4 background threads. Be aware of this. No big deal really. I have multiple servers running node.js under load for 3+ years and never had an issue with this. In fact, I found it helpful. If your database is under load and is already running 4 heavy queries, not giving it any more jobs is actually a good thing.

On the other hand, not being able to hit the filesystem because you have those four queries running is... not so helpful. In general, this looks like it could be a performance bottleneck for highly-concurrent applications.

[deleted]

Re: On problems with threads in Node.js

#10
Is this another case of "here's the code I ran" when in fact they didn't? There should be 3 lines of output, not 6!

Also, the code says it will print the time taken since the start of the program, which again doesn't go with the output and the conclusion being made!

Anyway, how come the output isn't in order?

Post reply on HN