Hi Rafel
I work on the node/azure team at Microsoft. Whether or not to create
many roles depends on what you are doing. The main benefit of WebRole
is IIS manages your node processes for you. It will spin up multiple
instances. It will monitor memory pressure and kill frozen instances
and restart them. We also provide access to logs over an http endpoint.
Further you can enable node-inspector for server side debugging within
Azure via our IIS integration.
The big benefit for worker is that it is leaner and it supports
WebSockets. In worker IIS is not present. This means there is less in
the box from a management perspective, but you get closer to the metal.
Because they are lighter they are more ideal for background processes
or for serving web apis.
One place where you might do a hybrid is for Websockets. For example
your front end might run in a WebRole with multiple instances while
your backend exposes web apis / uses WebSockets via a Worker.
Another scenario where you might use worker is for hosting an app
server like Redis / Mongo which your web role uses.
That being said, many folks just use one role and you do not have to
use multiple.
Hope this helps.
Sent from my Windows Phone
From: Rafel
Sent: 4/26/2012 8:51 AM
To: nodejs
Subject: [nodejs] Multiple Web Roles on Azure