Skip to main content

Azure MySQL Flexible Server: Architecture, Scalability, and Tips

Explore how Azure Database for MySQL - Flexible Server powers modern data workflows with advanced architecture, cost optimization, and seamless Azure integration.
Sep 17, 2025

Azure Database for MySQL Flexible Server is Microsoft’s managed MySQL service built for modern, data-driven applications that demand high performance, scalability, and control. It offers a more customizable architecture than the older single-server deployment, giving you finer tuning over compute, storage, availability zones, and maintenance windows.

For new projects on Azure, Microsoft now recommends Flexible Server. It offers improved performance, cost-optimized scaling, and enhanced high-availability configurations. Flexible Server provides data scientists and engineers with the ideal balance of managed convenience and operational flexibility, whether they're building analytics pipelines, powering large-scale transactional workloads, or creating real-time dashboards.

In this article, I will explain the architecture of the Flexible Server, discuss the available scalability options, and provide the best practices when using the database. If you are new to MySQL, I recommend checking our MySQL Tutorial to understand how to use the MySQL database to create databases and run SQL queries. 

MySQL Flexible Server Core Concepts

Azure Database for MySQL Flexible Server separates compute from storage, allowing you to scale each independently, which helps in optimizing costs and performance. Below are its core concepts:

Deployment model

Azure Database for MySQL Flexible Server offers three compute tiers tailored to different workload needs:

  • Burstable: Designed for low-cost development, testing, or workloads with low CPU demand that do not require continuous full compute capacity. It uses B-series burstable virtual machines and provides a cost-effective entry point for early-stage or less-intensive applications.
  • General Purpose: Suitable for most business-critical workloads requiring balanced CPU and memory with scalable I/O throughput. It uses D-series virtual machines and supports production applications like web and mobile apps with predictable performance and scalability.
  • Business Critical: Targets high-performance database workloads needing in-memory performance for faster transaction processing, higher concurrency, and lower latency. It uses E-series VMs and is ideal for real-time data processing and demanding transactional or analytical workloads.

Architecture overview

Flexible Server provides these two high-availability (HA) architecture models to ensure uptime and data redundancy:

  • Single Availability Zone (AZ): The compute and storage are located in the same physical data center in this model. This option offers lower latency but less redundancy.
  • Multi-Zone High Availability: Compute and storage are distributed across different AZs within the same Azure region. This protects against data center failures and provides automatic failover with minimal downtime.

Flexible Server automatically provisions and manages standby replicas for high availability with automatic failover. Behind the scenes, Flexible Server does the following:

  • Automated backups with point-in-time restore (retention up to 35 days).
  • Ability to schedule maintenance windows for patches and upgrades.
  • Automated patching of the underlying OS and MySQL engine.
  • Elastic scaling and cost optimization features, such as a burstable compute tier and the ability to stop and start servers to reduce costs.
  • Enterprise-grade security, including VNet integration and private endpoints.

Data Flow Between Clients, MySQL Flexible Server, and Azure Services

Data Flow Between Clients, MySQL Flexible Server, and Azure Services. Image from OpenAI.

In the above diagram, we have the following:

  • Application Clients: These can be web apps, mobile apps, or other services running on Azure, such as Azure App Service, Azure Kubernetes Service, or external environments. The clients connect via standard MySQL protocols over TLS/SSL for secure communication.
  • MySQL Flexible Server: The server handles SQL query processing, transaction management, and storage access. It manages data availability transparently with its standby replica for failover scenarios.
  • Azure Infrastructure Services: The Flexible Server is based on Azure compute, storage, and networking infrastructure components, including virtual machines (VMs), premium storage disks (SSD-backed), an Azure Virtual Network for network isolation, and Azure Backup services that orchestrate backups.
  • Azure Monitor: Azure Monitor and related tools gather performance metrics, logs, and alerts to support observability and automate management tasks like autoscaling or maintenance notifications.

MySQL Flexible Server Key Features

Azure Database for MySQL Flexible Server offers features that provide optimized control, high performance, and cost-effectiveness for data scientists and application developers. Let’s look at some of these features below:

1. High availability

As we’ve seen in its architecture, Flexible Server offers built-in high availability (HA) options to minimize downtime and data loss. Zone-redundant HA places the standby replica in a different availability zone, protecting against complete zone failures and offering the highest availability SLA. On the other hand, same-zone HA deploys the primary and standby replicas within the same availability zone, offering redundancy with lower latency. 

As a user, you are billed for the compute and storage of the primary and the standby replica. The standby is not an active server for reads or writes; it exists solely for fast failover.

Therefore, Zone-redundant HA is the recommended choice for production workloads that require a 99.99% SLA and need protection against a wide range of failures. Same-zone HA is a more cost-effective option for dev/test environments or applications where very low latency is more critical than protection against a whole zone failure. 

Starting September 2025, Microsoft has also introduced a dedicated SLB-based HA option in public preview, providing an additional, optional way to configure high availability for specific scenarios.

2. Scalability

Flexible Server allows you to scale your database resources to meet the demands of your workload with these features:

  • Compute scaling: You can scale your compute resources up or down between the Burstable, General Purpose, and Business Critical tiers. This operation involves a brief downtime as a new server is provisioned with the updated compute configuration.
  • Storage auto-grow and IOPS provisioning: Storage automatically grows up to 16 TB as needed. The service offers a dynamic IO model called Autoscale IOPS (pay-for-consumption), which automatically scales IOPS based on workload consumption.  For predictable performance, you can also choose Pre-provisioned IOPS (fixed and predictable) to meet specific performance requirements.
  • Read replicas: You can create up to 10 read replicas for read-heavy applications. These asynchronous copies of your primary server handle read-only traffic, offloading the primary instance and improving application performance.

3. Cost optimization

To better control the costs, Flexible Server offers the following features:

  • Stop/start feature: You can stop and start your server on demand. When the server is stopped, you are only billed for storage, not compute. This is especially useful for non-production environments that are not needed 24/7.
  • Burstable tier: The Burstable compute tier provides a cost-effective option for development, testing, and other workloads that don't need continuous high compute capacity.
  • Reserved instances: For predictable production workloads, you can save up to 67% on compute costs by purchasing a 1-year or 3-year reserved instance, which involves pre-paying for a specified amount of compute resources.

4. Security and compliance

Azure MySQL Flexible Server is designed with the following security features: 

  • Data encryption at rest: All data is encrypted at rest using industry standards, including FIPS 140-2 compliant modules and AES 256-bit encryption.
  • Data encryption in transit: Connections to the server are secured using TLS 1.2 encryption, ensuring data is protected during transmission.
  • Private endpoints and firewall rules: The integration with Azure Virtual Network allows the configuration of private endpoints for secure and private access. Firewall rules restrict access to trusted IP addresses only.
  • Azure Key Vault integration: For even greater security and compliance, you can integrate your server with Azure Key Vault. This allows you to centralize and securely manage secrets and encryption keys for your database.

5. Automated maintenance

To reduce the administrative overhead, Microsoft has automated the maintenance of MySQL Flexible Server in the following ways:

  • System versus custom maintenance windows: To control when updates occur, you can choose between system-managed or custom-defined windows
  • Minor version upgrades and patching: The platform automatically applies minor version upgrades and patches to MySQL and the underlying OS to ensure security and stability without manual intervention.
  • Automatic backups and point-in-time restore: The service automatically takes daily backups and continuously backs up transaction logs. You can restore your server to any point within the retention period, which can be configured from 1 to 35 days. The backups are stored in secure, locally redundant storage within the same availability zone.

Flexible Server for Data Science Workflows

Flexible Server is useful in providing scalable solutions for data science workflows. In this section, we will look at the different applications in advanced analytics and performance monitoring.

Advanced analytics use cases

With its scalability and integration with other Azure services, MySQL Flexible Server is suited for advanced analytics use cases such as:

  • Read replicas for analytics and ML: For large-scale reporting and machine learning, you can perform the read-heavy tasks like feature extraction and model scoring on read replicas. This prevents these computationally intensive queries from impacting the performance of the primary server, which handles the core OLTP (Online Transaction Processing) workload. This architecture ensures that your application remains responsive while running complex analytics in the background.
  • Integration with Azure services: Flexible Server integrates with the Azure ecosystem. For instance, you can use Azure Data Factory to design ETL/ELT pipelines. Similarly, you can connect the Flexible Server to Azure Synapse Analytics to perform large-scale data warehousing, combining your relational data with data from other sources for advanced analytics.

MySQL Flexible Server for data science workflows

MySQL Flexible Server for data science workflows. Image from OpenAI.

Data-In replication

Flexible Server supports inbound replication for hybrid and migration scenarios.

  • Hybrid/multi-cloud data synchronization: This feature allows you to replicate data from an external MySQL server, whether on-premises or in another cloud provider, into your Azure Database for MySQL Flexible Server. This makes it suitable for creating hybrid data solutions or synchronizing data across different cloud environments, ensuring a unified data view for your applications and analytics.
  • Minimal downtime migrations: Using data-in replication, you can set up a migration where the external source server is the primary and the Azure Flexible Server is the replica. The application continues to run on the source while the data is replicated to Azure. Once the Azure instance is fully synchronized, you perform a brief cutover to redirect the application's traffic, achieving a minimal downtime migration.

Performance monitoring for ML/Analytics

MySQL Flexible Server provides useful tools to monitor and optimize data science workflows through the following methods:

  • Azure Monitor and slow query logs: You can use Azure Monitor to view and analyze metrics and logs from your database. If you enable the slow query log, you can identify queries that take a long time to execute, which can be a bottleneck for data pipelines and analytics processes. You can then use this information to optimize your queries, for example, by adding indexes or rewriting the query logic.
  • Query Performance Insights workbook: This built-in workbook in Azure Monitor provides an intelligent analysis of your database's performance. It helps you quickly identify top long-running queries, their execution trends, and resource utilization (CPU, memory, and storage). As a data scientist, you can use this tool to understand workload patterns and optimize queries used in machine learning and analytics processes to ensure efficiency and reduce costs.

Migration and Onboarding

Migrating to Azure Database for MySQL Flexible Server can be done offline or online, depending on your application's tolerance for downtime. Let’s explore these methods and learn to choose the best one for your needs.

Offline migration

Offline migrations are a good choice when you can afford a period of downtime, such as for a non-critical application or during a scheduled maintenance window.

The Azure Database Migration Service (DMS) is a fully managed service that handles your migration process. For offline migrations, it takes a complete backup of your source database and restores it to your target Flexible Server.

During migration of large databases, you can use the mydumper command-line tool, which performs a multi-threaded data backup. The myloader tool then restores it with multiple concurrent connections. This method is effective for migrating large databases because it can significantly reduce the total migration time compared to traditional single-threaded tools like mysqldump.

Online (Minimal Downtime) migrations

When handling data in a highly productive environment, you should consider online migration if you want minimal disruption.

In this case, you will use data-in replication to set up your Azure Database for MySQL Flexible Server as a replica of an external MySQL server. The data is replicated to Azure as the source server continues to handle transactions. This results in minimal downtime, typically a few seconds to a few minutes.

This method works across hybrid or multi-cloud architectures. You can migrate from on-premises, VMs, AWS RDS, Google Cloud SQL, and even older Azure Single Server deployments.

Tips and best practices

Following these best practices will help ensure a smooth and successful transition regardless of your chosen migration method:

  • Pre-check environment: Validate source and target network connectivity and firewalls, and ensure that necessary ports are open. Check Azure VM sizing if using intermediary VMs and ensure bandwidth sufficiency between source and target.
  • Test in Dev: Always perform a test migration to a development or staging environment before attempting a production migration. This allows you to identify and fix potential issues without impacting your live application.
  • Ensure correct MySQL versions: The target Flexible Server's MySQL version must be equal to or greater than the source server's version. For example, if your source is MySQL 5.7, you can migrate to a Flexible Server running 5.7 or 8.0, but not 5.6.
  • Backup and rollback: Always take on-demand backups before migrating and major upgrades to have a rollback plan when necessary.

You should note that starting September 1, 2025, all new Flexible Servers are provisioned on the latest September 2025 version, which includes upgrades to MySQL 8.0.42 (for existing 8.0 servers), general availability of MySQL 8.4, and enhanced security (TLS 1.2 enforcement and CA rotation). You can check your current engine version with SELECT VERSION().

Getting Started and Next Steps

Now that you have seen the features of MySQL Flexible Server, I encourage you to learn how to use the platform.

Microsoft offers a free 12-month Azure account with a monthly allowance to try out Azure Database for MySQL Flexible Server at no cost. This includes 750 hours per month of the Burstable B1ms instance, enough to run a single instance continuously. You also get 32 GB of storage and 32 GB of backup storage. This free tier is ideal for testing, learning, and early development before scaling up.

Microsoft also provides quickstart tutorials to help you set up your first server in minutes. You can check out Azure MySQL Flexible Server Quickstart Docs to learn how to create a MySQL Flexible Server, connect from your application, and integrate with Azure services.

You can also stay up-to-date with the latest features, tips, and best practices by following the Azure Database for MySQL blog.

Conclusion

Azure Database for MySQL Flexible Server offers a robust, scalable, cost-effective solution for modern data science workflows and high-scale applications. It simplifies database management by separating computing and storage, providing granular control, and integrating with the broader Azure ecosystem.

The service's high availability, flexible scalability, and intelligent performance monitoring tools make it an ideal choice for OLTP applications and intensive analytics.

I encourage you to explore these features by taking advantage of the 12-month free offer to see how Flexible Server can streamline your data operations and unlock new project possibilities. And don’t forget to enroll in our Understanding Microsoft Azure course to get the sort of experience you need to gain to maximize the value of Azure Flexible Server in your work.

MySQL Flexible Server FAQs

What is Azure Database for MySQL Flexible Server?

It is a fully managed relational database service built on MySQL, providing high availability, scalability, and enterprise-grade security on Azure.

How does Flexible Server differ from Single Server?

Flexible Server offers zone-redundant high availability, customizable maintenance windows, VNet integration, burstable tier, and cost optimization features not present in Single Server.

What compute tiers are available in MySQL Flexible Server?

 Flexible Server supports Burstable, General Purpose, and Business Critical tiers, allowing tuning for cost, performance, and workload requirements.

What's the difference between High Availability (HA) and Read Replicas?

HA ensures your database is always available by maintaining a passive standby server for failover, which you are billed for. However, read replicas are active, read-only copies of your data that are used to scale out read-intensive workloads and billed as separate servers.

Does Flexible Server integrate with analytics tools?

Yes. Flexible Server connects natively with Azure Data Factory, Synapse Analytics, and Power BI for end-to-end data pipelines.


Allan Ouko's photo
Author
Allan Ouko
LinkedIn
I create articles that simplify data science and analytics, making them easy to understand and accessible.
Topics

Top DataCamp Courses

Track

Microsoft Azure Fundamentals (AZ-900)

0 min
Prepare for Microsoft’s Azure Fundamentals certification (AZ-900) by learning the fundamentals of Azure: computing, storage, and networking.
See DetailsRight Arrow
Start Course
See MoreRight Arrow
Related

blog

MySQL vs MongoDB: Choosing the Right Database for Your Project

Learn the pros, cons, and real-world examples of MySQL vs MongoDB. Compare schema design, performance & scaling to choose the best database for your project.
Mark Pedigo's photo

Mark Pedigo

13 min

blog

Azure Services: A Complete Guide to Microsoft’s Cloud Offerings

Discover the key services in Microsoft Azure, including compute, storage, networking, databases, AI, and security. Learn how they work, when to use them, and best practices to optimize your cloud experience.
Laiba Siddiqui's photo

Laiba Siddiqui

15 min

blog

Snowflake Architecture: A Technical Deep Dive into Cloud Data Warehousing

Explore Snowflake's three-layer architecture, data warehouse design, and advanced features. Learn how storage, compute, and services work together.
Bex Tuychiev's photo

Bex Tuychiev

12 min

Tutorial

Azure Cosmos DB: A Global-Scale NoSQL Cloud Database

Discover how Microsoft’s fully managed, multi-model database delivers low-latency performance, elastic scalability, and real-time capabilities for AI, IoT, e-commerce, and more.
Josep Ferrer's photo

Josep Ferrer

Tutorial

Azure SQL Database: Step-by-Step Setup and Management

Learn how to create, connect, manage, query, and secure your Azure SQL Database. This step-by-step guide covers all the essentials for optimal database setup.
Anneleen Rummens's photo

Anneleen Rummens

Tutorial

Azure App Service: A Complete Guide for Data Practitioners

This guide shows you how to deploy, manage, and optimize applications using Azure App Service—with practical tips for security, scaling, and cost-saving.
Kofi Glover's photo

Kofi Glover

See MoreSee More