OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database

SQL - V2.2.77Enterprise Edition

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & CertificationTicket
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Database
    3. SQL
    4. V2.2.77
    iconOceanBase Database
    SQL - V 2.2.77Enterprise Edition
    Databases
    • OceanBase Database
    • OceanBase Cloud
    • OceanBase Tugraph
    • Interactive Tutorials
    • OceanBase Best Practices
    Tools
    • OceanBase Cloud Platform
    • OceanBase Migration Service
    • OceanBase Developer Center
    • OceanBase Migration Assessment
    • OceanBase Admin Tool
    • OceanBase Loader and Dumper
    • OceanBase Deployer
    • Kubernetes operator for OceanBase
    • OceanBase Diagnostic Tool
    • OceanBase Binlog Service
    Connectors and Middleware
    • OceanBase Database Proxy
    • Embedded SQL in C for OceanBase
    • OceanBase Call Interface
    • OceanBase Connector/C
    • OceanBase Connector/J
    • OceanBase Connector/ODBC
    • OceanBase Connector/NET
    SQL
    KV
    • V 4.6.0
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    Deployment modes

    Last Updated:2023-08-18 09:26:34  Updated
    Share
    What is on this page
    Three IDCs in the same city
    Three replicas in three IDCs across two regions
    Five replicas in three IDCs across two regions
    Five replicas in three IDCs across three regions
    Five replicas in five IDCs across three regions

    folded

    Share

    OceanBase Database supports multiple deployment models. This enables flexibility in choosing the most suitable model based on IDC specification and requirements on performance and availability.

    Three IDCs in the same city

    If you only have IDCs in one city and do not have stringent requirements for high availability, you may deploy your OceanBase Database cluster in three IDCs in the same city. This deployment mode offers excellent performance because network latency between IDCs in the same city is between 0.5 and 2 ms in general. It is even possible to achieve disaster recovery at the rack level by deploying three zones on different racks in the IDC.

    Three replicas in three IDCs across two regions

    "Three IDCs across two regions" is a deployment mode that supports both high availability and limited geo-disaster recovery. One replica is deployed in each of the three IDCs across two regions, with two replicas located in the same city. Generally, transactions are only committed to and synchronized between the two replicas in the same city, offering the same performance as the that of the "three IDCs in the same city" mode. No service interruption or data loss will arise in the OceanBase Database cluster if a regional failure occurs in the city with only one replica. However, when a regional failure affecting the city with two replicas occurs, the OceanBase Database cluster becomes unavailable. Despite the significant improvement in availability compared with the same-city mode, this mode only ensures IDC-level disaster recovery.

    Five replicas in three IDCs across two regions

    In this mode, the OceanBase Database cluster is deployed in two cities, with one serving as the primary city and the other as the standby city. The primary city has two IDCs with two replicas hosted in each IDC. The standby city has only one IDC and one replica. This mode evolves from the "three replicas in three IDCs across two regions" mode. Its purpose is to eliminate cross-city transaction committing in the event of an IDC failure in the city with more replicas. Assume that the leader is located in IDC 1 of the primary city. When IDC 2 experiences a total failure, the Paxos protocol reduces the group from 5 replicas to 3 by removing the two replicas in IDC 2 from the member list. Subsequent synchronizations will only occur between 2 of the 3 remaining replicas. In most cases, synchronization can be done within IDC 1 to avoid cross-city synchronization. Likewise, if a total failure happens at IDC 1, the Paxos protocol will switch the leader to IDC 2, and then reduce the group from 5 replicas to 3. Synchronization will then occur within IDC 2 to avoid cross-city synchronization.

    To reduce the cost, you can deploy one replica in IDC 1 and one in IDC 2 as the log replicas. Log replicas do not provide services. They only replicate logs for disaster recovery. Only 3 copies of data will be stored and served in this case.

    1

    Five replicas in three IDCs across three regions

    The "three IDCs across two regions" mode does not support lossless geo-disaster recovery. Based on the principle of the Paxos protocol, you need to deploy your cluster in at least three regions to achieve lossless geo-disaster recovery. OceanBase Database adopts a variant of the "three IDCs across two regions" mode, which involves five replicas in three IDCs across three regions. This model includes three cities with one IDC each. The IDC in the first two cities has two replicas each, while the third IDC only has one replica. Unlike the "three IDCs across two regions" mode, this mode requires each transaction to be synchronized to at least two cities. Business applications must be tolerant of the latency introduced by cross-region replication.

    Five replicas in five IDCs across three regions

    This is similar to five replicas in three IDCs across three regions, with the exception that each replica is deployed to a different IDC to improve disaster recovery at the IDC level.

    Previous topic

    High availability solution
    Last

    Next topic

    REDO log management
    Next
    What is on this page
    Three IDCs in the same city
    Three replicas in three IDCs across two regions
    Five replicas in three IDCs across two regions
    Five replicas in three IDCs across three regions
    Five replicas in five IDCs across three regions