28

Build high scalable web apps they say, it will be fast they say

Comments
  • 3
  • 8
    the fuck did they expect from something that only supports 1 thread
  • 8
    It still handles 10k+ connections fine for me :)
  • 2
    @Artemix Friend of mine works for a company which uses node for a million+ live connections. Works fine!
  • 8
    Node 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.
  • 0
    @Artemix not that I know what I'm talking about, but I thought node could use native modules?
  • 0
    @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 :)
  • 0
    @Artemix see my (perhaps naive) thinking, is that the native interface can mitigate this problem
  • 1
    @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.
Add Comment