Forum Discussion
Azure Site Recovery
I have Azure based VM's which is having Web tier and SQL Server database hosted on Azure VM's. I want to setup DR strategy for my application. Can someone assist me step by step? I am new in Azure.
5 Replies
Worth to take a look at this:
https://learn.microsoft.com/en-us/azure/site-recovery/azure-to-azure-tutorial-enable-replication
- Deleted
Hi IamKishor
I'm not an expert on this, but I think these notes might help you:
To establish a DR plan for Azure-based virtual machines (VMs) that host a web tier and SQL Server database, you need to follow a series of steps. Below is a detailed, step-by-step guide to assist you in setting up your DR strategy:
1. Assess Your Requirements
- Recovery Time Objective (RTO): Maximum acceptable time the application can be offline.
- Recovery Point Objective (RPO): Maximum acceptable amount of data loss measured in time.
2. Design Your DR Strategy
- Decide on DR Region: Choose an Azure region for disaster recovery.
- Select Appropriate Services: Utilize Azure Site Recovery (ASR) for VMs, Azure SQL Database, or SQL Server on Azure VM for database replication.
3. Implement Azure Site Recovery (ASR)
For Web Tier VMs:1. Prepare Azure Resources:
- Create a Recovery Services vault in your DR region.
- Configure storage accounts in the DR region for VM replication.
2. Enable Replication:
- Go to the Recovery Services vault.
- Under “Site Recovery,” select “Replicate.”
- Configure source settings (Primary region, Resource group, VMs).
- Configure target settings (DR region, Resource group, VNet).
3. Replication Settings:
- Set the replication policy (RPO threshold, recovery point retention, application-consistent snapshot frequency).
- Start the replication process.
For SQL Server VMs:
1. Prepare SQL Server for Replication: Ensure SQL Server instances are prepared for replication (configure Always On Availability Groups if applicable).
2. Enable Replication:
- Follow the same steps as for web tier VMs.
- Ensure SQL Server VMs are included in the replication setup.
4. Configure SQL Server Disaster Recovery
Using Always On Availability Groups:1. Configure Primary SQL Server:
- Set up an Always On Availability Group on the primary SQL Server.
- Add databases to the availability group.
2. Configure Secondary SQL Server:
- Set up a secondary SQL Server in the DR region.
- Join the secondary SQL Server to the availability group.
3. Test Failover: Perform a manual failover to ensure the secondary SQL Server can take over.
5. Set Up Load Balancers and Networking
Load Balancers: Configure Azure Load Balancers in both primary and DR regions to distribute traffic.
Networking:- Ensure VNets are peered between primary and DR regions.
- Set up necessary NSGs and routing rules.
6. Test Your DR Plan
- Replication Testing: Test the replication and failover processes regularly.
- Application Testing: Ensure the web application can connect to the secondary SQL Server in the event of a failover.
- End-to-End Testing: Simulate a complete failover scenario to validate RTO and RPO objectives.
7. Automate Failover and Recovery
- Runbooks: Create Azure Automation Runbooks to automate the failover and recovery process.
- Scripts: Develop PowerShell or Azure CLI scripts to manage the DR processes.
8. Monitor and Maintain
- Monitoring: Set up Azure Monitor and Azure Alerts to monitor the health and status of replication.
- Regular Drills: Conduct regular DR drills to ensure preparedness.
Step-by-Step Summary
1. Assess Requirements: Define RTO and RPO.
2. Design Strategy: Choose DR region and services.
3. Implement ASR for VMs:
- Prepare Azure resources.
- Enable replication for web tier VMs and SQL Server VMs.
4. Configure SQL DR:
- Set up Always On Availability Groups if applicable.
- Ensure databases are replicating correctly.
5. Set Up Networking: Configure load balancers and network peering.
6. Test DR Plan: Conduct replication and failover tests.
7. Automate Failover: Use Azure Automation and scripts.
8. Monitor and Maintain: Set up monitoring and conduct regular DR drills.
Following these steps will help you develop a solid DR strategy for your Azure-based application, guaranteeing minimal downtime and data loss in the event of a disaster.
Regards and good luck!, Tony
- IamKishorCopper ContributorIt's awesome summary you shared. But let me understand few more things for web tier first:
I am planning to setup Zonal level DR, not reginal level DR due to network complexity.
For setting up Zonal level DR, we need recivery service vaults and storage accounts to be setup. Apart from that:
1) Do I need to select Target resource group same as what we have for source resource group?
2) Which failover subnet need to select? Can I select subnet same as what we have for source VM?
3) In case my Web tier is down but DB tier is UP, is this OK to connect DR Web tier with production DB tier? or should I just switch App and DB tier both on DR site?
Anything else do I need to take care here?- Deleted
Hi thereIamKishor
Setting up Zonal level DR within the same Azure region can make network management a bit easier. Here’s how to do it:
1. Resource Group: Create a separate resource group for your DR resources to keep things organized.
2. Subnet: Use a different subnet in the same VNet, but make sure it’s in a different availability zone.
3. Web and DB failover:- If needed, connect your DR Web tier to the production DB.
- It’s usually better to switch both Web and DB tiers to the DR site for consistency.
4. Additional steps: Make sure network settings are the same, update your app settings, and regularly test your DR setup.
Hope this helps!, Tony