What's the difference beetween Web Role (Node.js) and Worker Role (Node.js)? Both can run on 80 port. Code for both are identical. I know that Web Role runs on IIS but why I need IIS as proxy if Node.js has his own WebServer?
The difference is that Node Web Role will runs through IIS. But Node Web Worker is VM and runs through node.exe it self as clustered worker.
Main difference here is that your virtual hosts and web platform setup will depend on the option you choose. As you aware setting up IIS is very different from node.exe it self.
So with Web Role it will proxy all traffic through IIS rather than directly through node master process.
Cons/Pros:
Main advantage of Web Worker as it does not relies on any stack and you have full control over what runs there and how it affects your app. As well if you already have something ready, you can reuse it without big problems.
In mean time you will need to manage your stack your self, by implementing master node process and then forking workers your self.
While using Web Role you can start faster, and if you have nothing complicated regarding http platform setup, it is the way to go, but there will be relation between IIS and node, and this relation has dependencies and might be a little bit limiting in very advanced cases though.
And you have ability to reuse Windows Azure Cloud features the ones that relies on IIS.
There is not much technically difference for common development, unless you need something very specific regarding your web application setup.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With