OceanBase Database Proxy (ODP) is a proxy server dedicated to OceanBase AI Database. OceanBase AI Database stores replicas of user data on multiple OBServer nodes. When ODP receives an SQL statement from a user, ODP forwards the statement to the optimal OBServer node and returns the execution result to the user.
ODP overview
OceanBase AI Database differs from traditional standalone databases in that it is a distributed database, where each table, or even different partitions of a table, may be stored on different machines. To read from or write to a table, you must first locate the primary replica of the table or partition that contains the data, and then execute the corresponding SQL statement. This is almost impossible to achieve at the application layer. As a dedicated reverse proxy for OceanBase AI Database, ODP has routing as its core function: it forwards data access requests initiated by clients to the correct OBServer node and forwards the response from the OBServer node back to the client.
The following figure shows how a client accesses data in OceanBase AI Database by using ODP.

The user sends a request from a client to a load balancing component, which forwards the request to a stateless ODP. Then, ODP forwards the request to the optimal OBServer node in the OceanBase AI Database cluster.
Note
The load balancing component can be a common product on the market, such as SLB or F5.
ODP is not responsible for database or table sharding, nor does it participate in the generation or scheduling of execution plans as an SQL engine does. It performs only reverse proxy forwarding.
Each OBServer node contains a complete SQL engine and a storage engine, which parse user SQL statements to generate and execute physical execution plans. Distributed OBServer nodes use the Paxos protocol to ensure high availability. In this architecture, ODP undertakes only basic routing and disaster recovery, whereas all database capabilities are implemented by OBServer nodes. This clear division of labor allows each component to perform to its full potential, enabling OceanBase AI Database to achieve performance close to that of a standalone database.
ODP can correctly send requests to the primary replica. With specific configurations, ODP also supports scenarios such as read/write splitting and read preference for standby replicas. In addition, when an OBServer node is down, being upgraded, or undergoing a major compaction, the Blocklist mechanism ensures that user requests are routed to a normally available OBServer node.
Manage ODP
OceanBase Cloud Platform (OCP) provides the following management functions for ODP.
Operation |
Description |
|---|---|
| Create an OBProxy cluster | You can perform this operation to create an OBProxy cluster. |
| OBProxy parameters | You can perform this operation to manage the parameters of an OBProxy cluster. |
| Delete an OBProxy cluster | You can perform this operation to delete an OBProxy cluster. |
| Upgrade all OBProxies in an OBProxy cluster | You can perform this operation to upgrade all OBProxies in an OBProxy cluster. |
| Restart all OBProxies in an OBProxy cluster | You can perform this operation to restart all OBProxies in an OBProxy cluster. |
| Manage OceanBase AI Database clusters connected to OBProxy | You can use OCP to connect an OceanBase cluster to OBProxy or delete a connected OceanBase cluster. |
| Monitor the performance of an OBProxy cluster | You can view the performance monitoring data of an OBProxy cluster on OCP, including service monitoring information and system monitoring information. |
| Add an OBProxy | You can perform this operation to add an OBProxy to an OBProxy cluster. |
| Start OBProxy | You can perform this operation to start OBProxy. |
| Refresh OBProxy configuration | You can perform this operation to refresh the configuration of OBProxy. |
| Stop OBProxy | You can perform this operation to stop OBProxy. |
| Delete an OBProxy | You can perform this operation to delete an OBProxy from the cluster. |
| Restart OBProxy | You can perform this operation to restart an OBProxy in the cluster. |
| Upgrade OBProxy | You can perform this operation to upgrade an OBProxy in the cluster. |