OceanBase logo

OceanBase

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

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

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

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 Proxy

V4.1.0Enterprise Edition

  • What is ODP?
  • Installation and deployment
    • Deploy ODP by using the CLI
    • Deployment modes
  • Basic operations
  • Configuration parameter
    • Parameter description
    • Dynamically modifiable parameters
    • Parameters that are not dynamically modifiable
    • In-memory parameters
  • Connection management
  • Data routing
    • Factors affecting data routing
    • Routing strategies
    • ODP routing
    • Intra-tenant routing
    • Read/Write separation
  • High availability mechanism
    • Overview
    • High availability of ODP services
    • High availability of OceanBase Database
    • High availability testing
  • Security and protocols
  • Operation and maintenance
    • Troubleshooting
      • Troubleshooting logic
      • Monitoring logs
    • Performance analysis

Download PDF

What is ODP? Deploy ODP by using the CLI Deployment modes Basic operations Parameter description Dynamically modifiable parameters Parameters that are not dynamically modifiable In-memory parameters Connection management Factors affecting data routing Routing strategies ODP routing Intra-tenant routing Read/Write separation Overview High availability of ODP services High availability of OceanBase Database High availability testing Security and protocols Troubleshooting logic Monitoring logs Performance analysis
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogLive DemosTraining & Certification
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 Proxy
  3. V4.1.0
iconOceanBase Database Proxy
V 4.1.0Enterprise Edition
  • V 4.3.6
  • V 4.3.4
  • V 4.3.3
  • V 4.3.2
  • V 4.3.1
  • V 4.3.0
  • V 4.2.3
  • V 4.2.2
  • V 4.2.0 and earlier

Factors affecting data routing

Last Updated:2026-04-14 09:41:34  Updated
share
What is on this page
Functionality
Performance
High availability

folded

share

Before we learn about the routing principles of ODP, let's first look at the factors affecting data routing, so as to better understand and evaluate the routing feature. This topic describes the following factors: functionality, performance, and high availability.

Functionality

This section takes the PreparedStatement feature as an example to illustrate how functionality affects routing. A PreparedStatement object is executed in two steps:

  1. Perform the PREPARE operation, for example, sending the select * from t1 where c1 = ? statement.

  2. Perform the EXECUTE operation to pass the data used by the SELECT statement and execute the SELECT statement.

Step 2 depends on step 1. Assume that the execution is as shown in the following figure. When OBServer2 receives an EXECUTE request in Step 2 and does not know the content of the PREPARE request in Step 1, OBServer2 gracefully reports an error or forcibly disconnects the connection.

PS execution

In this case, two solutions are available:

  • Solution 1: Record the node OBServer1 to which the PREPARE request is routed, and also route the EXECUTE request to OBServer1. This method is simple to implement, but does not fully utilize the advantage of a distributed system.

  • Solution 2: Synchronize the status of the PREPARE request to OBServer2 before executing the EXECUTE request. For more information about status synchronization, see related description in Connection management. This method requires ODP to synchronize connection status, which is complex to implement, but fully leverages the advantage of a distributed system. ODP adopts this method.

Solution

Performance

High performance is an important characteristic of OceanBase Database. Routing affects performance mainly in terms of latency, namely network communication overheads. ODP reduces network communication overheads and improves overall performance by perceiving data distribution and geographic locations of servers.

  • Data distribution

    Data distribution determines the number of hops on an execution link. In best cases, ODP directly hits the node where the data resides in routing. The section uses the select c1 from test statement as an example to illustrate the impact of data distribution on performance. As shown in the following figure, data in Table t1 is distributed on OBServer1. In Routing method 1, the statement is directly routed to OBServer1. This is the most efficient method. In Routing method 2, the SQL statement is sent to OBServer2, and OBServer2 then routes the statement to OBServer1. Compared with Routing method 1, this routing method is less efficient. To implement Routing method 1, ODP must be aware of the distribution of SQL statements and table data.

    Routing methods

  • Geographic location of servers

    The geographic location of a server affects the network latency. When a remote node is selected, SQL execution slows down. Sometimes, the network latency is much longer than the database execution time. Therefore, ODP selects servers in different geographic locations in the following priority: a server in the same IDC > a server in a different IDC in the same city > a server in a different city.

High availability

High availability means that OceanBase Database is tolerant of server faults, which makes the faults transparent and imperceptible to applications. High availability is implemented by using fault detection, the blacklist mechanism, and the retry logic. When ODP finds that an OBServer node is faulty, it excludes the faulty node and selects a healthy node during routing. ODP also allows failed SQL statements to be retried.

For more information about high availability, see High availability mechanism.

Previous topic

Connection management
Last

Next topic

Routing strategies
Next
What is on this page
Functionality
Performance
High availability