Thursday, 25 May 2017

The most efficient way to run Node.js service

I have a ruby program which calls node do-something-cool data 10 times a second from a shell. Instead of spawning Node.js environment every time, I want to keep it open to reduce overhead, but still be able to call the binary a number of times per second. Therefore, it seems that I need to open a server, and query it -- e.g., http server and curl. But I'm not sure if TCP is the best protocol, and if calling curl would be significantly better than spawning Node.



via zavr

No comments:

Post a Comment