Databases 5 min read

How QiYun Enhances OpenStack Trove for Seamless Master‑Slave Database Deployment

This article explains OpenStack Trove’s role as a Database-as-a-Service platform, outlines its core components, and details QiYun’s custom enhancements—including automated backup, monitoring, and a streamlined single-API master-slave instance creation with isolated networks and VIP-based failover for improved security and availability.

360 Zhihui Cloud Developer
360 Zhihui Cloud Developer
360 Zhihui Cloud Developer
How QiYun Enhances OpenStack Trove for Seamless Master‑Slave Database Deployment

Introduction

OpenStack Trove provides Database-as-a-Service (DBaaS) on OpenStack, allowing users to quickly provision relational or non‑relational databases without handling complex management tasks.

Trove Overview

Trove runs entirely within OpenStack, interacting with other services via RESTful APIs. It creates virtual machines that host the trove‑guestagent and the database program, stores images in Glance, obtains network information from Neutron, and authenticates through Keystone.

Trove Components

API Server

Message Bus

Task Manager

Guest Agent

Conductor

The API Server exposes RESTful endpoints for creating and managing instances, delegating heavy asynchronous tasks to the Task Manager, while simple tasks may be handled directly by the Guest Agent.

The Task Manager performs resource‑intensive operations such as instance creation, lifecycle management, and database actions.

The Guest Agent runs inside each database instance, listening to the message queue and managing the database.

The Conductor runs on the host, receiving messages from client instances.

Key Concepts

Instance : a database instance, i.e., an OpenStack VM containing the database program.

Replica instance : a read‑only copy that must be linked to a master instance at creation.

Datastore/Datastore version : defines the database type, version, and associated VM image; required when creating an instance.

QiYun’s Implementation

System Architecture

QiYun Trove system architecture
QiYun Trove system architecture

Based on the native Mitaka version of Trove, QiYun added automated backup (Trove‑backup), monitoring (Trove‑monitor), and optimized master‑slave switching, instance scaling, and parameter configuration.

Creating Master‑Slave Instances

QiYun Trove supports a single API request that creates both master and slave instances, each belonging to separate physical clusters. The VM includes two NICs: a management NIC for internal communication and a data NIC isolated from the user network, plus a service IP (VIP) to enable seamless master‑slave failover.

Master‑slave instance creation flow
Master‑slave instance creation flow

Master‑Slave Failover

Clients connect to the database via the VIP. If the master node fails, administrators can switch roles by moving the VIP to the slave, ensuring continuous service availability.

Failover process diagram
Failover process diagram
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.

cloud computingMaster‑SlaveBackupOpenStackfailoverDatabase-as-a-ServiceTrove
360 Zhihui Cloud Developer
Written by

360 Zhihui Cloud Developer

360 Zhihui Cloud is an enterprise open service platform that aims to "aggregate data value and empower an intelligent future," leveraging 360's extensive product and technology resources to deliver platform services to customers.

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.