I want to ping a server from my node.js app.
Is that doable?
Thanks
Doing ping(programmable) requires root privileges because it requires raws sockets which require root access. You could perform ping following Gradwohl's snippet, but keep in mind that you are forking a new process which is expensive(relatively). If you don't need to do it a lot(concurrency) this will definitely work :)
To do it in node.js(only) without forking process I think you have a couple of options, which are both hard to implement :()
Not (only) using node.js:
As a side-note how to use redis on node.js: