It seems that a lot of attention is paid to virtual networks. This is great, but ... if all you are trying to do is create a multi-tier application with several virtual machines working together, you can just create several virtual machines in the same cloud service (that is, they are all live at xyz.cloudapp.net ).
All of them will be sitting at the only public IP address, but consider your case when you have a web server and a database server:
- Export ports 80 and 443 specifically for the web server (you can have multiple and load balancing ports in these virtual machines
- Do not publish public ports for the database server
After deploying with the same cloud service, each virtual machine in the cloud service can communicate directly with any other virtual machine in the cloud service using the host name that you assigned to it.
You can also deploy your Internet tiers and databases for various cloud services and still communicate between them without a virtual network. If you open, say, port 1433 on the database server, now your web tier can simply open a connection to yourdb.cloudapp.net:1433 . Of course, this means that the whole world can do the same, but ... you can apply the endpoint ACL (access control list) on yourdb.cloudapp.net port 1433 and allow only the public VIP of your web-level cloud service.
You will need a virtual network if your Internet levels and databases are in separate cloud services, and you do not want open ports open at your data level, and you do not want to go through the built-in load balancer.
David Makogon
source share