Hello, @Muhd Azhar !
How does high availability (HA) work for VMs with app dependencies like SQL?
There are many different options for hosting applications on Azure depending on how much simplicity you want versus how much control you want. Virtual Machines (VMs) are on the control end of the spectrum and do not include stateful data management. Instead the intended architecture would be to design your application with stateful data that resides outside of the VM. In N-tier architecture, for example, which is used for simple web applications and migrating an on-premises application to Azure with minimal refactoring, you would host the data tier on SQL Server.
N-tier architecture running on VMs:
Another option when looking at VM high availability is Virtual Machine Scale Sets which allow you to create and manage a group of load balanced VMs that provides high availability to your applications and allow you to centrally manage, configure, and update many VMs.
Expanding further, there are a variety of database solutions that also have high availability that work on similar principles.
Example of HA in Azure SQL Database for Basic, Standard and General Purpose service tiers:
Example of HA in Azure SQL Database for Hyperscale service tier:
I'm going to include some additional reading below which covers the key HA information for a VM hosted applications, as well as a link for services that automate a lot of the high availability overhead:
- Hosting applications on Azure
- N-tier architecture style
- Build solutions for high availability using availability zones
- Availability options for Azure Virtual Machines
- What are Virtual Machine Scale Sets?
- High availability for Azure SQL Database
- Azure Well-Architected Framework review - Virtual Machines
- Run a Windows VM on Azure
I hope this has been helpful! Your feedback is important so please take a moment to accept answers.
If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!