Node.js Azure WorkerRole with more than one instances cannot use same port?

I am trying a Node.js app on my Azure Emulator. I have a single worker role, with 3 instances.

Once I start the app in the emulator, only one of the instances works correctly, while the others crash due to port addr not available.

Is this an issue with the emulator? As, there would be no point having multiple instances of any app, as all would use ports.

If you need to get rid off this issue then set instance count as 1 and do your local developments.At the time when you deploy the project change it as back to 3 instances.On cloud environment it's working properly (load balancer is responsible for this).

solution 1

change instance count as 1 likes below.

enter image description here

Solution 2:

This issue exist with Auzre SDK 1.4.

If you can installe higher than that version it will work without any issue.(since Auzre SDK 1.5)

Using Windows Azure SDK 1.5 or higher (now it's October 2012) testing application in compute emulator is much closer to real cloud platform.

On Latest versions multiple instances of your role deployments are allocated different IP addresses while trying to maintain the port specified in the service definition.

You can get more details about this from Avkash Chauhan's Blog

I hope this will help to you.