How to connect 2 virtual machines in Windows Azure to a two-tier architecture?

How to create 2 connected virtual computers in Windows Azure to be able to deploy a solution with two levels?

Let me clarify the scenario. I am currently using 1 virtual machine in Windows Azure where SQL Server 2008 DB and ASP.NET solution are installed.

However, I want to create a very simple two-tier architecture where SQL Server 2008 is installed on Server1 and the ASP.NET solution is deployed on Server2.

So how to do this? I mean, how to connect these two separate virtual machines? And how can they work together to run one solution?

Could you help me in this scenario?

Thanks!

+7
virtual-machine azure n-tier-architecture
source share
3 answers

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.

+9
source share

You must use a virtual network ( http://www.windowsazure.com/en-us/services/virtual-network/ ). In addition, you can configure both machines as part of a single cloud service to ensure that they are encapsulated together and publicly accessible through the same cloudapp.net address. Please note that in order to use Azure SLA, you need to run two instances of each level (web / DB).

Please note: you cannot add an existing virtual machine to a new virtual network.

0
source share

You can create a virtual network, and then add both servers to the same network if they are on different cloud services (which is standard when using quick creation). But you cannot do this on the servers that were created, so you will need to disconnect your drives in order to create 2 new servers on the new network, and then reconnect your drives to the new servers.

If you plan to use a DC, then create 2 subnets on your virtual network and put your DC on one and on the other servers, since you do not want your DC to get a different IP address.

-one
source share

All Articles