Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@Artemix Friend of mine works for a company which uses node for a million+ live connections. Works fine!
-
Voxera113977yNode works well if requests are short or can release control while waiting for database or other separate service.
So if you have to do heavier work you need to offload it either to a rest service or webworker thread.
Go is designed specifically to handle such concurrency with less hassle.
You can do it in most langs you just might need to do more boiler plate code to reach the result. -
@Artemix not that I know what I'm talking about, but I thought node could use native modules?
-
Voxera113977y@Artemix @Hedgepig you can do heavy work by calling an external service or a webworker and have a callback that completes the request by writing a response.
Its a bit like old windows programs before NT where you had s method DoEvents whereby the current code releases control back to windows that can let next task work.
Once all tasks have had a go yours are awoken on the next instruction.
That way several requests can interleave without blocking.
But if a single one behaves badly it stalls the whole server.
Done right node is fast and can handle a lot but just like old c you have to know what you are doing.
Other platforms can be more forgiving or even force you to do right :) -
@Artemix see my (perhaps naive) thinking, is that the native interface can mitigate this problem
-
Voxera113977y@Hedgepig only if the call to the native is with a callback and not blocking. Have not worked with the native interface so I have no knowledge of it.
Related Rants
Build high scalable web apps they say, it will be fast they say
rant
nodejs
golang