Search code examples
azureinternalendpoint

Communication between 2 cloud services


I'am new in windows azure cloud services and I'd like to know if it's possible to allow communication between 2 roles in 2 different Cloud Services over an internal endpoint?

I have a small HttpModule which has the role of "dispatcher". This HttpModule is hosted in a Cloud Service and recieve request from the internet on a http endpoint (Web Role).

Then, I have a second Cloud Service which hosts a REST Service (Web Role too). I'd like that the httpModule forwards the incomming request to the REST Service through an internal endpoint.

Is it possible to do that (if yes, how?)

Thank you


Solution

  • There are a couple of ways to do this.

    Make sure both deployments are part of the same subscription Create an affinity group Create a Vnet Add both services to the group.

    Pretty good description here: http://michaelwasham.com/2012/08/06/connecting-web-or-worker-roles-to-a-simple-virtual-network-in-windows-azure/

    Note that this will only work so long as both services are hosted in the same region. If you need to have multiple regions (e.g. a listener in every region, but a single worker), this won't work. For that you would need to use something like Azure Service Bus or connect via the VIPs.