Azure Database for MySQL: Architecture Overview

Understanding the architecture of Azure Database for MySQL is crucial for designing scalable, resilient, and performant applications. Azure Database for MySQL is a fully managed relational database service based on the open-source MySQL Community Edition database engine.

Azure Database for MySQL Architecture Diagram
Conceptual diagram illustrating the core components of Azure Database for MySQL.

Core Components and Concepts

Azure Database for MySQL is built on a robust cloud infrastructure, offering features like automated backups, high availability, and read replicas. The architecture can be understood by examining its key components:

1. Compute and Storage Layer

Azure Database for MySQL separates compute and storage. This separation allows compute resources (CPU, memory) to scale independently of storage. When you provision a server, you choose a compute tier (General Purpose or Memory Optimized) and a storage size. Storage is provisioned as disk IOPS, meaning the performance of your storage is directly tied to the amount of storage you provision.

2. Networking Layer

Your Azure Database for MySQL server is secured by a firewall and can be accessed via private endpoints or service endpoints for enhanced security. Connectivity is managed through Azure's global network. Application clients can connect to the database server using standard MySQL drivers and connectors.

3. High Availability

Azure Database for MySQL offers built-in high availability. For the General Purpose and Memory Optimized tiers, the service provides automatic failover to a standby replica. This failover process is managed by Azure, ensuring minimal downtime during hardware failures or network issues. The standby replica is continuously synchronized with the primary server.

4. Read Replicas

You can create read replicas of your primary Azure Database for MySQL server. Read replicas are asynchronous physical replicas that can be located in the same or different Azure regions. They are useful for offloading read-heavy workloads from your primary server, improving application performance and scalability. Applications can connect to read replicas to perform read operations.

5. Data Durability and Backup

Azure Database for MySQL automatically performs full, differential, and transaction log backups of your database. These backups are stored in Azure Storage, and you can configure the retention period. Point-in-time restore allows you to restore your database to a specific point within the configured retention period. Geo-redundant backup storage is also an option for disaster recovery purposes.

6. Security Features

Security is a top priority. Azure Database for MySQL supports SSL/TLS for encrypting connections. Azure Active Directory authentication can be used for centralized identity management. Row-level security and dynamic data masking can be implemented within your MySQL database. Furthermore, Azure provides network security features like firewalls and private endpoints.

Deployment Options

Azure Database for MySQL offers two primary deployment options:

Note: The Single Server deployment option is being retired for new deployments. We recommend using the Flexible Server option for new deployments. For existing Single Server deployments, please refer to the migration guidance.

Key Architectural Considerations

By understanding these architectural aspects, you can effectively leverage Azure Database for MySQL to build robust and high-performing database solutions.