GBASE database high availability technology ensures stable and reliable operation of user systems
Database High Availability (HA) refers to the ability of a database system to remain continuously available in the face of hardware or software failures. It is critical for normal business operations and data management; the absence of HA can lead to immeasurable and severe consequences. For example, a database failure or outage prevents business systems from accessing data normally, causing business interruption and impacting normal operations. Without effective backup and redundancy mechanisms, critical data may be permanently lost. For users, data loss not only means the loss of important information but may also lead to legal and compliance issues. A prolonged recovery time can make the restoration process after a failure extremely slow and complex, disrupting normal business operations during that period. Therefore, a mature enterprise-grade database system must incorporate comprehensive HA mechanisms.
Database high availability safeguards business continuity by quickly switching to standby nodes or systems when node failures occur, minimizing business disruption and impact. It protects data security and integrity through data redundancy, fault detection, and fault recovery mechanisms, preventing data loss and corruption. A highly available database must provide fast fault recovery, swiftly failing over to standby systems or nodes to reduce the impact on the business and improve system fault tolerance and reliability.
How does a database achieve high availability? In short, it relies on two pillars: redundancy and management. Data redundancy, also known as data replication (the primary mechanism, though writing multiple copies is also possible; this article focuses on replication), is the foundation of HA. Data is stored in multiple copies; when one or some nodes fail, other nodes still have backup data to provide support. HA management orchestrates and administers the overall implementation, responsible for status judgment, failover, and other tasks.
1. Data replication/redundancy: By replicating and synchronizing data across multiple nodes, data replication provides redundant backup and fault tolerance.
2. High Availability Architecture: Designing an HA architecture based on user requirements to ensure the system can maintain reliable operation and services in the event of failures or anomalies. It generally falls into centralized and distributed architectures.
3. Load Balancing: Distributing user requests appropriately across different database nodes to ensure each node's load is balanced.
4. Automatic Fault Detection: Monitoring the status of database nodes and, upon detecting a node failure, automatically triggering failover to redirect requests to a standby node or system. This minimizes the impact of failures on the business and enables fast recovery.
5. Failover: When a node fails, requests can be automatically redirected to other healthy nodes, enabling failover and continuous service.
GBase (General Data Technology Co., Ltd.) focuses on database software products and services. The company's GBase series database products all feature mature database HA technologies and solutions, meeting the needs of industries such as finance, telecommunications, government, energy, transportation, and defense. They provide uninterrupted database services for users' businesses. Among them:
GBase 8a is a mature analytical MPP database independently developed by GBase for the business analytics and business intelligence market. Its HA mechanisms include data redundancy, multi-level HA architecture, and HA management.
Data Redundancy:
Provides 1 or 3 data replicas for redundancy.
Automatic data synchronization between replicas.
Multi-shard mechanism reduces the barrel effect caused by node failures.
Flexible configuration of the number of replicas and shards in the cluster, allowing assignment of replica shards to any node. Nodes with higher performance and larger storage can be configured to host more primary and replica shards according to the configuration.
Multi-level HA Architecture:
Node-level HA: the scheduling node (GCluster) uses a Failover mechanism to ensure data consistency for SQL execution. The management node (GCware) uses a virtual synchronization mechanism to ensure metadata consistency across the cluster. Compute nodes (GNode) ensure primary/replica data consistency through automatic synchronization.
Active-Active cluster architecture supports near-real-time data synchronization between two homogeneous clusters. In the M-S architecture, the primary cluster supports writes while the backup cluster supports queries. Block-based incremental synchronization greatly improves synchronization efficiency for massive data compared to traditional logical log-based synchronization.
Virtual cluster mirroring architecture supports real-time data synchronization between two mirror clusters. The mirror clusters ensure real-time data consistency, with both mirrored clusters writable simultaneously. Mirror table data serves as real-time backup; any data change initiated on either end of the mirror cluster is synchronized to the mirror table in real time. Once a primary table has a mirror relationship, it is effectively an extra backup shard for query modules. Query modules can utilize these extra backups to improve query high availability. Mirror relationships can be created and removed at the database or table level. When created at the database level, all tables under that database will automatically create mirrors; all functions, stored procedures, and views will also be synchronized and created under the target mirror database.
HA Management:
The replication engine automatically manages data synchronization.
When a node fails, the system automatically switches to other nodes to ensure business continuity, minimizing noticeable performance jitter caused by the barrel effect after failover.
Node failures are transparent to applications and do not interrupt ongoing business. Once a failed node recovers, GBase 8a restores its data from other nodes and immediately provides services after the update is complete.
GBase 8s is a mature and stable enterprise-grade transactional database independently developed by GBase, with proprietary intellectual property rights and an EAL4-level product security evaluation. Its HA can achieve failover in seconds, with an availability level of 99.999%. HA mechanisms include data redundancy, flexible HA cluster architecture, and HA management.
Data Redundancy:
GBase 8s uses logical log replication technology to achieve node HA.
Logical log update supports synchronous, semi-synchronous, and asynchronous modes.
Flexible HA Cluster Architecture:
Intra-city primary-standby disaster recovery (HAC), RPO=0, RTO<30 seconds.
Remote disaster recovery (RHAC), RPO<100 seconds, RTO<5 minutes.
Supports two-site three-center HA deployment, with remote disaster recovery distance exceeding 1,000 km.
Supports active-active capabilities across database clusters in different locations, ensuring data consistency between active-active clusters.
While the primary node handles read-write operations, the standby node can take on read operations such as queries and reports.
HA Management:
All HA capabilities are built into the database server itself, eliminating the need to deploy third-party components. This enhances the stability of the HA solution and reduces maintenance costs.
Provides a Connection Manager (CM) component that achieves failover and load balancing, transparent to applications.
GBase 8c is a multi-model, multi-mode distributed database built on openGauss, supporting both primary-standby and distributed HA deployment. The primary-standby mode of GBase 8c offers multiple deployment options: synchronous, asynchronous, and cascaded standby. The distributed cluster mode has no single point of failure globally, achieving 99.99% availability. The distributed cluster supports two-site three-center deployment and active-active across locations, ensuring continuous online business with zero data loss.
Data Redundancy:
Primary-standby HA supports multi-copy data redundancy. Data exchange between primary and standby replicas occurs through logs, ensuring that the failure of any node does not affect database services to the outside and no data is lost, meeting ACID properties.
Distributed HA employs full-component redundancy across all distributed components.
Multi-mode HA Architecture:
Primary-standby HA supports multi-copy data redundancy for components including: coordinators, data nodes, cluster state manager, and cluster manager, all with backup redundancy. When the primary node fails, the standby node can automatically be promoted to primary and continue providing external services. This process is transparent to applications, with zero perceptible impact during the primary-standby switchover.
Distributed HA implements component-level redundancy for each component within the distributed cluster at the software layer.
CN: Coordinator, deployed in a fully symmetrical manner; multiple CNs provide service redundancy and support load balancing.
DN: Data Node, using a primary-standby HA architecture with configurable synchronous or asynchronous replication between primary and standby.
GTM: Global Transaction Manager, using a primary-standby HA architecture with configurable synchronous or asynchronous replication.
HA Center: Cluster State Manager, using the Raft replication protocol.
GHA Server: Cluster Manager, using a primary-standby HA architecture with configurable synchronous or asynchronous replication.
Multiple HA solutions meet diverse requirements for databases in various application scenarios, including intra-data center disaster recovery, intra-city disaster recovery, remote disaster recovery, and active-active across locations.
HA Management:
The Global Transaction Manager manages distributed strongly consistent transactions. Even for modern database workloads that prioritize performance, it can achieve strong consistency rather than eventual consistency.
The Cluster State Manager stores the HA status of each node and is responsible for determining node states in failure scenarios, utilizing the Raft replication protocol.
The Cluster Manager manages the HA status of all nodes in the cluster (primary/standby, down, etc.).
Database high availability is crucial for the stable operation of user systems. Through HA redundancy and management mechanisms such as data replication, automatic fault detection and failover, and load balancing, GBase database ensures 24/7 stable and continuous operation of business systems across industries.
The pursuit of higher database availability never ends. GBase will continue to strive and improve, refining secure and stable database products, solutions, and services that fit user applications, meeting customer needs and expectations while contributing to the development of China's information technology industry.