Designing Scalable MySQL Cloud DBaaS: Architecture, Availability, and Future Plans
This article summarizes the design and evolution of a MySQL cloud DBaaS platform, covering MySQL 8.0 features, the need for DBaaS, multi‑generation architecture, service and data availability strategies, monitoring, DTS design, and upcoming roadmap for broader database support and hybrid cloud deployment.
MySQL 8.0
MySQL is a mature open‑source database with over twenty years of history and remains the most popular in the internet era. MySQL 8.0, released on April 19, introduces major enhancements such as a unified SQL + NoSQL architecture, native JSON support, the new X protocol for NoSQL APIs, and built‑in support for Java, Python, .NET connectors on port 33060.
SQL capabilities have been expanded to include window functions, CTEs, and advanced JSON handling, bringing MySQL on par with other open‑source and commercial databases.
Link: https://modern-sql.com/blog/2018-04/mysql-8.0
Why DBaaS
DBaaS lowers the entry barrier for open‑source databases, automates operations, and standardizes services, enabling enterprises without deep in‑house expertise to adopt MySQL efficiently.
Reduce database usage threshold
From manual to automated to self‑service
Standardized service delivery
DBaaS Platform Architecture Evolution
First generation (2011) wrapped MySQL as a standard service for mobile enterprise customers, using a Manager‑Agent model with MySQL storing management data.
Second generation introduced a split Manager (web layer + scheduling layer) and added an HA server component to improve failover capabilities.
Third generation refactored the architecture into micro‑services, adding middleware components and emphasizing high availability, security, and observability.
Design Considerations
Programming Languages : Golang, Python, Java
Architecture : Micro‑service decomposition by function, small fault domains, independent upgrades, degradable operation, layered guardianship, self‑checking alerts, reverse alerts, VPC support
Security : RPC encryption with gRPC + TLS, per‑server private keys, encrypted log storage, audit logs, Linux capabilities for fine‑grained permissions
Core Components
Ucore – Distributed KV store for configuration management with built‑in high availability.
UMC – Management console for DBAs.
URDS – Self‑service portal for developers to request and manage database instances.
Urman – Backup scheduling and execution service.
Umonitor – Aggregates monitoring data from Ustat.
Ustat – Collects performance and resource metrics.
Uguard – Handles MySQL high‑availability failover decisions and execution.
Service Availability Design
Availability is addressed beyond simple failover, considering slave write protection, replication health, and decision‑maker reliability. The platform defines SLA protocols (RPO and RTO) with categories P/PE and T/TE to guide automated or manual failover actions.
Data Availability
Backup scheduling follows defined maintenance windows, with automatic dump transfers. Regular recovery drills verify that backups are restorable, ensuring both backup creation and validation are part of daily operations.
Monitoring Design
The platform migrated from Zabbix to Prometheus for time‑series data collection, visualized with Grafana. Data collection runs as a single‑process Go application using channels for parallel service metric gathering.
DTS Design
Data Transfer Service (DTS) supports distributed shard migration, offering narrow‑bandwidth efficiency, full + incremental transfer, GTID support, parallel replay, Kafka output, and compatibility with Alibaba Cloud, Microsoft Azure, and native MySQL. It also facilitates cloud‑to‑cloud and on‑premise migrations.
Manager uses a leader‑follower model to dispatch migration tasks, while Agents handle data extraction from MySQL binlogs and parallel replay.
Future Planning
Support a broader range of open‑source databases
Explore containerized database management
Implement hybrid cloud management for unified private‑public cloud database services
Efficient Ops
This public account is maintained by Xiaotianguo and friends, regularly publishing widely-read original technical articles. We focus on operations transformation and accompany you throughout your operations career, growing together happily.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.