The Wayback Machine - https://web.archive.org/web/20240817183504/https://www.geeksforgeeks.org/microsoft-azure-database-availability-and-consistency-for-azure-sql/
Open In App

Microsoft Azure – Database Availability and Consistency For Azure SQL

Last Updated : 30 Mar, 2023
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

When you or your company decides to move your database from your on-premise servers/computers to a cloud environment, consistency and availability are two important factors to consider.

Database consistency is much more intricate. It means that no matter how or where you access your data, the same query would give you the same data output.  It also means that your data stays intact in case of an application failure, natural disaster, and so on.  

In this article, we aim to simplify how Azure Database for MySQL achieves the objectives of data consistency and high availability, across different deployment options. We will get an overview of the following concepts:

  • Understanding the 2 deployment modes Azure offers
  • Availability and consistency for single-server deployment.
  • Availability and consistency for flexible deployment.

Key Terminologies

Before getting started get yourself familiar with the following keywords:

  • PaaS:  Platform as a Service
  • Instance: Virtual servers running on physical hardware (In this case, Azure)
  • SLA: Service Level Agreement

Deployment Modes in Azure

Azure Database for MySQL is a PaaS (Platform as a service). This means that Azure provides you with an instance (or multiple instances) of the MYSQL server. Everything from patching to upgrades is handled by Azure. For this mode, there are 2 available deployment options-

  1. Single Server Deployment: This option is only recommended if you currently have an application/workload that is using a single server, and you wish to migrate it to the Azure cloud. A single server requires minimal user customization. It provided an SLA of 99.99% availability within a single region.  
  2. Flexible Server Deployment: This option is highly recommended for production workloads. It’s flexible, allowing you to choose availability zones, pricing tiers, cost optimizations, and more.  

So now that you have a basic understanding of the deployment nodes, let’s deep dive into availability and consistency for these 2 modes.  

Availability and Consistency

For Single-Server Deployment

Planned downtime: As an example, suppose you start out with 4 virtual cores on your Azure Database instance. As you add more and more applications, your database load increases. To handle this, you might need to increase your virtual cores. This is an instance of planned downtime. As you can see in the architecture, Azure Database for MySQL is built out of separate components like

  • Gateway/proxy
  • Database server
  • Azure storage

 

  • If you need to scale up/down your compute instances, a new database server is provided. This happens with minimal downtime.
  • Scaling up storage requires no downtime.
  • Upgrades, patch fixes, and bug fixes require minimal downtime, up to 60-120 seconds at maximum. However, users are advised to eliminate heavy transactions running on their database instances at planned downtimes.
  • Unplanned downtime: Whenever your server faces unexpected downtime, Azure automatically deploys another server within a minute.  For Azure storage failures, there is no downtime. This is because data is replicated 3 times, and if one copy fails, the azure servers switch to read data from the other 2 copies.
  • You can also configure Azure read replicas (backup database copies) in multiple Azure regions to ensure Disaster Recovery (DR) in case of failures in an entire region.

For Flexible Server Deployment:

 There are 2 primary modes of design:

  • Zone Redundant Architecture: This design will create a primary database server in the availability zone (like east us). Another server with the exact same configurations will be placed in a different availability zone within the same region (like east us 2). This model provides higher fault tolerance, but higher latency in transmitting traffic.
  • Same Zone Architecture: In this design, both your primary and secondary servers are placed within the same availability zone. Data transmission is faster, latency is lower due to the servers being physically close. However, fault tolerance is lower.
  • With both architectures, users can provision read replicas for backup and database consistency. Read replicas is a read-only copy of your Azure database, designed to reduce the load on your primary server. You can find a detailed guide to reading replicas here.

Azure Database for MYSQL has a comprehensive set of services that ensure data availability and consistency. There are various options for you to choose between different servers, architectures and pay only for the services you use. 


Previous Article
Next Article

Similar Reads

Difference Between Azure SQL Database and Azure SQL Managed Instances
Azure is a cloud platform which is used for services like virtual computing, storage networking etc. It provides with solutions that include Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS). Both, Azure SQL Database and Azure SQL Managed Instances supports automatic backup and have built-in license
3 min read
Microsoft Azure - Advanced Threat Protection for Azure SQL Database
In this article, we will look into how to configure Advanced Threat Protection in Azure SQL Database. Advanced Threat Protection is a feature of Azure SQL Database that detects security threats and anomalies and lets you know about them so that you can act. Follow the below steps to configure it: Step 1: Here we already have an existing Azure SQL D
2 min read
Microsoft Azure - Introduction to Azure SQL Database
Azure SQL Database is a database built for modern Cloud applications. Developers and clients opt for Azure SQL for one or more of the below-mentioned reasons: If they want to build multi-tenanted software as a service type of application, elastic pools are a great option for the same.If they have a database and they don't want to have to choose bet
3 min read
Microsoft Azure - Azure SQL Database Deployment Options
Azure SQL Database is a database built for modern Cloud applications. Now coming back to the eccentric concepts for which consider If you have ever worked with Azure SQL Database, you must have come across terms such as "single database" or "Elastic scaling" and so on. There is an increasing trend of building applications in the cloud today. For an
5 min read
Microsoft Azure - Configure Auditing for Azure SQL Database
In this article, we will look into the process of configuring auditing for the Azure SQL Database. Follow the below steps to configure auditing for Azure SQL Database: Step 1: Here in the portal, we're looking at the Azure SQL Database, and down on the left under Security, we can select the Auditing tab. Step 2: Now, this is where we would go if we
2 min read
Microsoft Azure - Create Azure SQL Database Using all Configuration Options
Here, we will learn to create a SQL Azure Database in the cloud providing all the available options. In this article, we are going to look through all of the settings available for creating a SQL Database in the Azure portal. Implementation: Follow the below steps to create an Azure SQL database using all configuration options: Step 1: So, you can
6 min read
Microsoft Azure - Create Azure SQL Database
In this article, you will learn to create and query an Azure SQL database. SQL database is a high-performance reliable cloud database. If you have a data-driven application or a website that you want to create a database to support, you can use any programming language that you prefer and you don’t have to manage any of the infrastructures. Impleme
2 min read
Microsoft Azure - TDE is Enabled in Azure SQL Database
Pre-requisite: Azure VM Transparent Data EncryptionBy encrypting data at rest, transparent data encryption (TDE) protects Azure SQL Database, Azure SQL Managed Instance, and Azure Synapse Analytics against the threat of unauthorized offline actions. Without requiring changes to the system, it enables real-time encryption and decryption of the datab
3 min read
Microsoft Azure - Restore to a Point in Time with Azure SQL Database
Pre-requisite: Azure Microsoft Azure SQL Database is a service that provides managed Paas service running the latest SQL Server Database. It comes with a feature of point-in-time backups. So, in this article, we will study how we can create a point-in-time backup using Azure SQL Database and restore it using created backup. We will see two differen
3 min read
Microsoft Azure - Configure Azure SQL with Azure CLI
In this article, we're going to take a closer look at how you can configure something like connectivity using the Azure CLI. What we have here is we are in Azure Data Studio and similar to the SQL notebook we are actually using a PowerShell notebook. That just means all our code cells are going to run PowerShell and we are just connecting to localh
4 min read
Microsoft Azure - What are Regions and Availability Zones
Azure is Microsoft’s cloud infrastructure service. It provides a comprehensive set of technologies that allow you to build, test and deploy your applications using the Microsoft technology stack: Windows Server, SQL Server, System Center, Microsoft Office, and more. Microsoft Azure offers a wide range of tools, such as tools for developers, busines
10 min read
Microsoft Azure - Availability Zones For Kubernetes Cluster
In this article, we will learn how to create a highly available Kubernetes cluster with availability zones. When you create an Azure Kubernetes service or AKS cluster in Azure, its nodes and storage all reside in the same datacenter. The cluster is protected from hardware failure and maintenance within the data center because the nodes and storage
2 min read
Microsoft Azure - Using Flexible Server in Azure Database for PostrgeSQL
In this article, we will look into the process of using the Flexible Server in the Azure Database for Postgres SQL. You can create an Azure Database for Postgres SQL with a Flexible Server which allows for configuration and control of the database server. Let's take a look at the below implementation. For this follow the below steps: Step 1: In the
3 min read
Microsoft Azure - Introduction to Azure Database For MySQL
This article aims to provide introductory knowledge of the Azure Database for MySQL. By the end of this read, users will be able to Understand the basic idea of Azure Database for MYSQL, and how it differs from traditional MYSQL databases.Understand business requirements and benefits of this service.Understand how to deploy the MYSQL server in the
3 min read
Microsoft Azure - Develop Apps with Azure Database For PostgreSQL
In this article, we will learn how to use a Flexible Server in Azure Database for Postgres SQL. We can create an Azure Database for Postgres SQL with a Flexible Server which allows for configuration and control of the database server. Implementation: Follow the below-given steps to develop apps with Microsoft Azure Database for PostgreSQL. Step 1:
3 min read
Microsoft Azure - Using Flexible Server in Azure Database for MySQL
Pre-requisite: Azure VM Azure Database for MySQL is a PaaS implementation of MySQL in the Azure cloud. It provides high availability at no extra charge, as well as scalability as needed, automatic backups, and point-in-time restores. Connection security is provided by the server, which enforces firewall restrictions and, optionally, requires SSL co
2 min read
Microsoft Azure - Get Azure VM Properties using Azure PowerShell
The purpose of using the Azure PowerShell Commands is to quickly analyze the overall properties of VM/VMs at once the filtering the with select and where conditions. To find the properties of an Azure VM, you can perform the following commands in Azure Cloud Shell to get the details. Command: Get-AzVM Output: 1. Get all properties of an Azure Virtu
2 min read
Microsoft Azure - RDP to Azure Virtual Machines using Azure Bastion
In this article, we will learn how to do RDP(Remote Desktop Protocol) / SSH(Secure Shell) Connection to an Azure VM using Azure Bastion. First, let's discuss Azure Bastion. The Azure Bastion service is a fully platform-managed PaaS service that you provision inside your virtual network. It provides secure and seamless RDP/SSH connectivity to your v
3 min read
Microsoft Azure - Get CPU Utilization Data of a Azure VM in Azure Portal
Azure Virtual Machines (VM) is one of several types of on-demand, scalable computing resources that Azure offers. In this article, we will look into the process of getting the CPU Utilization data of an Azure VM in Azure Portal. Implementation: Follow the steps to get the CPU Utilization of an Azure VM in Azure Portal: Step 1: Log in to your Azure
2 min read
Microsoft Azure - Archive Azure VM to Azure Storage Account
In this article, we will be implementing a solution to archive a select azure VM snapshot to a select storage account for archiving using azure cloud shell. For implementation, we will be using Azure CLI commands. Prerequisite:VM SnapshotA storage account is neededUser needs "Storage Blob Contributor Data" IAM Role Access on Archiving Storage Accou
2 min read
Microsoft Azure - Check Status of Azure VM using Azure PowerShell
The following Azure PowerShell command helps you to find the Azure VM Config and properties details of Os Name, Os Version, Hyper V Generation, Disks properties, Extensions properties of Type Handler Version, Status and Message, VM Agents properties of Type Handler Version, Status and Message and also VM Power Status Codes, Messages, Plugins, Time
3 min read
Microsoft Azure - Azure VM Disk Space in Percentage using Azure KQL
Here we'll be using the Azure Insights Metric Query to find the free disk space in percentage using KQL. The purpose of this query is to find disk drive free space of all the Azure VMs without logging into every server. You can Run the following KQL log Queries in Azure Monitor or Azure VM Logs or Log Analytics Workspace. Note: VM Insights Agent sh
1 min read
Microsoft Azure - Enable Azure Monitor VM Insights Agent For Azure VM
Azure Monitor VM Insights Agent enables you to get more visibility into the health and performance of your Azure VM. Here we'll see how we can enable Azure Monitor VM Insights to monitor the health, performance, and dependencies of azure virtual machines. Implementation: Follow the below steps to enable Azure Monitor VM insights agents for an Azure
2 min read
Microsoft Azure - Azure CLI Commands to Manage Azure VMs
Azure Command-line interface is used to manage or to create Azure resources. By using the simple AZ CLI command we can manage Azure VM quickly and at a Scale. Let's get started by using a few important Azure CLI commands to manage Azure Virtual Machines. 1. Start a Specific Stopped VM in a Select Resource Group Use the below command to start a spec
2 min read
Microsoft Azure - Manage Azure VMs using Azure PowerShell Commands
Here we are using Azure PS Commands to manage azure resources from Azure Cloud Shell or by using Windows PowerShell. By using the simple AZ PS command we can manage Azure VM Quicks without any efforts of navigating in Azure Portal and at Scale. Let's get started by using the major Azure PS commands to manage Azure Virtual Machine. 1. Start a Specif
2 min read
Microsoft Azure - Query Azure Storage Logs in Azure Monitor Log Analytics
Pre-requisite:- Azure Log Analytics is a tool offered by Azure, which is used to edit and run log queries against data in the Azure Monitor Logs store and helps interactively analyze their results. One can easily use Log Analytics queries to retrieve records that match particular criteria, identify trends, analyze patterns, and provide various insi
5 min read
Microsoft Azure - Install Azure Command Line Interface (Azure CLI)
Azure CLI is a very powerful tool that can be used to automate tasks, create, update, manage or delete azure resources or to troubleshoot problems with az module cmdlets. By installing az modules on your system or on your development system you and your development team can easily create, update or manage Azure AD and Azure resources such as manage
4 min read
Microsoft Azure- Backing Up, Restoring, and Cloning Microsoft Azure App Services
Microsoft is well known for developing relevant software which are using in today's time of technology to conquer the demand of users and developers to build up applications. In sequence of it Microsoft introduces Azure well known as Microsoft Azure to make quality applications. In this article, we will discuss Backing up, restoring and cloning Mic
8 min read
Microsoft Azure - Security Capabilities and Tasks of Azure SQL
In this article, we are going to dive into the security module of Azure SQL. The way we're going to approach this module is by looking at security capabilities and tasks. At a high level, if we look at some of the capabilities that are available in Azure SQL, you're going to see a lot of overlap with capabilities you're familiar with in SQL Server
2 min read
Microsoft Azure - Zone Redundancy and SLA of Azure SQL
Azure SQL is a Database service offered by the Microsoft cloud platform. Azure SQL is often used to provide a storage layer for applications built or hosted in the cloud. This article aims to explain the basic details and concepts surrounding Azure SQL. We also deep dive into how SLAs and zone redundancy is configured in this service. Key Terminolo
4 min read
three90RightbarBannerImg