This article reviews the new native Azure SQL Database High Availability solution, which is designed to offer higher availability for mission-critical enterprise applications. The new capability is included with some service tiers and you can also purchase it as an upgrade. The article reviews the application implications of running on this service tier.
This blog post is authored by Brad Calder, Principal Program Manager for the Microsoft Windows Customer Advisory Team (SQL Server). Historically SQL Database had a single level of Failover support – Geo-Replication, which was intended to support Disaster Recovery scenarios only. Now SQL Database has two levels of high availability that are available with some service tiers.
Availability Priorities for SQL Database
High Availability has evolved into two distinct levels in Microsoft Azure SQL Database. The first level, which is included with some service tiers, is known as “Standard” High Availability (HA). This solution provides all the monitoring and automatic failover capabilities at no charge to the customer (it’s built-in), but requires application changes in order to work properly (more on that below). Standard HA is designed to be used for mission-critical applications, but can also provide an added layer of protection for businesses requiring less than five-nine availability (99.999%). These business requirements are typically satisfied by using lower service tiers that come with their own SLAs and charge. Note: There are a few limitations with Standard HA, which are described in this article.
Standard High Availability (HA) for Azure SQL Database
Azure SQL Database uses the term “Standard High Availability” to describe a solution that provides all of the monitoring and automatic failover capabilities at no charge to the customer (it’s built-in) but requires application changes in order to work properly. The three main features of Standard HA are:
- Automated monitoring of database instances with configurable options for incident detection and response actions. This ensures your databases are operational, up-to-date, patched, and have sufficient storage space available before allowing connections from applications.
- Allows databases within an availability group to be automatically failed over between servers without requiring any DBA intervention.
- Proactively monitors the health of a database instance and initiates a seamless failover to another server if necessary even before an outage is detected by the Monitoring Agent.
To benefit from Standard HA, your application must be running on one of the following service tiers: Basic, Business Critical, or Premium. If this is not your case then you should consider using Availability Groups as described in part 4 below. In addition to satisfying these prerequisites, Standard HA also requires that all databases within an availability group share the same compute configuration (e.g., DTU’s). Finally, there are a number of limitations with Standard HA which can be found here. Note: The new High Availability solution for Azure SQL Database does not have a separate charge and is included with the service tier you purchase (i.e., Basic, Business Critical or Premium). It also does not require you to use Availability Groups. With the new solution, your application will still enjoy failover at no additional charge; however, it will be limited in its ability to scale out because there’s only one read replica per availability group (two write replicas).
The previous version of SQL Server offered “Always On” as a choice for high availability. This option is now known as Availability Groups and provides the following advantages for mission-critical applications:
- Supports multiple databases within an availability group that can be distributed across many different servers and datacenters.
- Allows read-scale for mission-critical applications by utilizing up to nine additional replicated databases (read replicas). Note: Only two write replicas are allowed per availability group. The other servers in the group are read-only and intended for reporting or backup purposes.
- Provides an automated method for monitoring health, executing automatic failovers, and rebalancing data across the availability group. In addition, if a user’s connection is directly attached to one of the servers in the availability group then you can also provide manual failover from their application.
Availability Groups have been around since SQL Server 2005, however, they have been substantially enhanced with this new version of Azure SQL Database. For example, users no longer have to be concerned with manually managing the distribution of their application data because it is done automatically. In addition, up to nine replicas can be added to an availability group which allows for both read and write scalability (up to the limits described below). Availability Group Limitations
SQL Database Standard provides the features needed for applications that require high availability (e.g., mission-critical production applications with low latency requirements). In addition, it’s the only option available for those who wish to use Availability Groups without any limits on database size or the number of read replicas. If your application falls into this category then you should seriously consider using SQL Database Standard as your choice for a fully managed data tier in Azure. However, if you’re looking to build a larger scale public-facing website then you should probably look at using SQL Database Web/Business Critical instead. It’s important to point out that Premium and Business Critical service tiers are not included under the pay-as-you-go model which requires an active Software Assurance.