website cluster

Azure Public Test Date Azure Public Test Result

Azure US Gov Last Test Date Azure US Gov Last Test Result

Best Practice Check Cred Scan Check

Deploy To Azure Deploy To Azure US Gov Visualize

This template deploys a website cluster and enables Zabbix monitoring, and allows user to define the number of web servers. The website cluster contains 1 load balancer, 3 web servers, 1 redis master with 1 redis slave, 1 MySQL master with 1 MySQL slave by default.

This template also allows you to input your existing zabbix server IP address to monitor these servers.

The load balancer exposes on public IP addresses that you can access through SSH on the standard port, also port 80 open so that you can access your website through browsers.

The servers are under the same net, there are 4 subnets under this net: web subnet, haproxy subnet, redis subnet, mysql subnet. The details are below:

  • web:

  • mysql:

  • redis:

  • haproxy:

Each server has dynamic private ip address. Web servers belong to web subnet, the ip addresses usually start from; MySQL servers belong to mysql subnet, the ip addresses start from; redis servers belong to redis subnet, the ip addresses start from; load balancer belongs to haproxy subnet, the ip address start from

##Important Notice Each server uses raid0 to improve performance. We use 4 data disks on each server for raid0. The size of each data disk is set to 100GB. Execute the command "df -h" to find out the mount details, /dev/md0 is for the data disks. The VM size is set to Standard_A3. You can check the VM size details by clicking the URL .

##After deployment, you can do below to verify if the website cluster really works or not:

  1. Open the URL http://your load balancer public ip/mysql.php to see if can connect to MySQL DB successfully.

  2. Check MySQL data replication status. SSH connect to load balancer, then SSH connect to MySQL slave(usually, then execute below:

$mysql -uroot -p<mysqlpassword>

use testdb;

select * from test01;

You should see some records in the test01 table.

  1. Check redis data replication status. SSH connect to load balancer, then SSH connect to redis master(usually, then execute below:

set hello world

get hello

SSH connect to redis slave(usually, then execute below:


get hello

You should get the output as same as redis master does.

##Known Limitations

  • The website uses one load balancer and the load balancer uses haproxy software. You can create more load balancers and you can even use Azure's traffic manager to do the load balancing.
  • You can add more web servers and database servers after the deployment.

Tags: Microsoft.Resources/deployments, Microsoft.Network/networkSecurityGroups, Microsoft.Network/publicIPAddresses, Microsoft.Network/networkInterfaces, Microsoft.Compute/virtualMachines, Microsoft.Compute/virtualMachines/extensions, CustomScript, Microsoft.Compute/availabilitySets, Microsoft.Network/virtualNetworks