Cloud Native 8 min read

Implementing a Cloud‑Native MySQL Instance Service with CEPH RBD on Kubernetes

This article presents a cloud‑native solution for MySQL containerization on Kubernetes using CEPH RBD as backend storage, detailing the background, feasibility analysis with performance benchmarks, the operator‑based architecture, and the benefits for development‑test environments.

Ctrip Technology
Ctrip Technology
Ctrip Technology
Implementing a Cloud‑Native MySQL Instance Service with CEPH RBD on Kubernetes

The authors, Alex and Xiao Shichuan, describe their experience building a cloud‑native MySQL instance service on a Kubernetes platform, motivated by the difficulty of running stateful services such as MySQL in containers.

They explain that while stateless services run smoothly on Kubernetes, traditional stateful applications require careful handling of compute‑storage separation. After several attempts, they settled on a solution that uses a MySQL Operator, CEPH RBD block storage, and database versioning to provide fast, snapshot‑based MySQL instances.

Performance evaluation compares MySQL containers using local SAS disks versus CEPH RBD. Two test scenarios were executed with sysbench, measuring QPS across varying thread counts and concurrent instances. Results show that CEPH RBD, backed by SSD cache, delivers higher random write throughput (≈110 MB/s) than local disks (≈48.6 MB/s), leading to better QPS in scenario A, and the CEPH cluster can sustain up to ~80 K QPS in scenario B.

The implementation details include a Kubernetes‑deployed MySQL‑Operator that manages two custom resources (CRDs): MySQLInstance (a StatefulSet wrapper) and DatabaseSnapshot (a VolumeSnapshot wrapper). The operator handles lifecycle states, PVC provisioning, and snapshot management, enabling rapid creation of empty or pre‑populated MySQL instances.

Concluding remarks highlight that using CEPH RBD for MySQL in development‑test environments does not degrade performance, saves compute resources, and improves automation for CI/CD pipelines, while providing the elasticity and flexibility expected from cloud‑native architectures.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

performanceKubernetesOperatormysqlstorage
Ctrip Technology
Written by

Ctrip Technology

Official Ctrip Technology account, sharing and discussing growth.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.