Cross-Site High Availability Based on WindowAzureIAAS static website!
In the previous article, we discussed the PAAS-based Failover for simple web pages. Since PAAS interfaces correspond to a relatively small number of users, stateless configuration is relatively simple. For the configuration through virtual machines, we can achieve local high availability and cross-site high availability to provide higher availability.
Based on the high availability provided by virtual machines, we can create two local virtual machines to ensure the high availability of our applications, because there is no static page involving interaction, therefore, we can establish an availability cluster to ensure the availability of our website in the same data center. At the same time, we use Traffic Manager to ensure that there is no exception in data access across data centers.
The topology architecture is as follows:
It is the architecture that we can use for static websites or non-interactive websites. Now we use three standard A2-level servers to complete this simulation. We still use the previous website, create a Website Based on Windows Server 2008 R2 IIS to meet the customer's access requirements.
Next, let's simulate this process:
Follow these steps to create the first server. The network and storage account of the server define the eastern data center:
Select Chinese 2008 R2 system and click Next:
Enter the corresponding parameter states and click Next:
Create a new cloud service and select the East data center for storage. Select the pre-created network:
Select the agent to be installed:
At this point, the creation is complete:
Next, we will create another server to Improve the availability set creation. The other processes are the same. Note that this machine and the previous machine must be in the same cloud service:
The local high availability is basically created. Next we must find a method to achieve high availability. for users, ensure high availability when the front-end and stateless, we can use Server Load balancer. To ensure that these machines are associated, we need to create a server availability cluster, next, we will create Server Load balancer and availability clusters respectively based on the server Load balancer and availability clusters. First, create a Server Load balancer instance.
Go to the Windows ServerA endpoint, create a port 80, and create a Server Load balancer instance:
Select Add independent endpoint:
Select the create Server Load balancer set check box:
We select the probe method and Port:
We have already created port 80:
Next we add ServerB to Server Load balancer:
After the nouns are set, they are created:
Back to the port list, we can see that the list has been created:
Next we will create an availability set as needed. The availability set is not necessary, but in most cases, it is best to create an availability set to complete the availability set of our virtual machines, it is mainly used to achieve automatic resource Scaling Based on the cloud scaling function in the future. Next, we will set the availability set to complete the setting of our virtual machine. We will directly select our virtual machine:
Select to create a new availability cluster:
Availability set created:
Next we select another machine and add another machine to the availability cluster:
After completing the above steps, we have completed the required operations to achieve the availability target of the local website. Next, we will deploy the website on two servers. We log on to the two servers and install IIS.
Copy data to the IIS root directory:
At the same time, deploy the file in another IIS. Next we will test and open http://piloteast.chinacloudapp.cn/, and we will find that the file is normal:
Next, we deployed cross-site access. Here we still use traffic manager to achieve our goal. In fact, we also use the Traffic Manager technology to achieve failover to achieve our high availability goal, let's take a look at the Traffic Manager technology:
For example, we have four sites, and we use DNS to query the Traffic Manager address. Traffic Manager checks the WEB status of the four sites to determine the business status, return to a healthy application address to achieve our high-availability data access goal. Next we will first create a remote high-availability server, next, we use the Traffic manager technology to reverse the Failover Traffic to a remote site after a problem occurs.
First, create an access server on the remote site:
Next, deploy the website on the third server:
Next, we need to set up our Traffic Manager to implement the Failover function of the application. First, we need to create a new Traffic Manager for failover. Go to the traffic manager on the Portal page and click "new:
After the creation is complete, we add machines in the east and north data centers, because they are virtual machines, and virtual machines are affiliated with windows Azure, because we are in the east and north data centers:
After creation, check whether the status is normal:
Let's see if the endpoint is normal:
Next, configure the TTL time and related configurations:
After the storage is complete, we start the test. The test procedure is as follows:
Open IE and test whether the website is normal.
Close ServerA. We try again to open the website, and the website is still normal:
Next, let's see if we can achieve high availability of Cross-Site virtual machines. Next, we will close ServerB and see if we can switch to a remote site. It's Okay:
By now, the high availability of stateless IAAS-based applications has been configured and the goal has been fully achieved.