OceanBase Database Proxy (ODP, also known as OBProxy) is a proxy server dedicated for OceanBase Database. OceanBase Database stores replicas of user data on multiple OBServer nodes. When ODP receives an SQL statement from a user, ODP forwards the statement to an OBServer node and returns the execution result to the user.
ODP concepts
OceanBase Database is a distributed database. This makes it different from traditional standalone databases. In OceanBase Database, tables and table partitions may be stored on different servers. To read data from or write data to a table, the system must first locate the leader and follower replicas of the table or partition that contains the data, and then execute the SQL statement. This is almost impossible to implement at the application level. ODP is a reverse proxy designed for OceanBase Database. Its core feature is to route the data requests from the client to the right OBServer node, and return the response from the OBServer node to the client.
A client request accesses OceanBase Database by using ODP like this: The user sends a request from a client. The request is forwarded by a load-balancing module to a stateless ODP, which then forwards the request to the optimal OBServer node in the backend OceanBase cluster.
Note
The load-balancing module can be a popular service such as SLB or F5.
ODP is just a reverse proxy. It is not responsible for sharding. It does not generate or schedule execution plans as an SQL engine does.
Each OBServer node contains a complete SQL engine and a storage engine. These engines are used to parse the SQL statements that you executed to generate and execute physical execution plans for these statements. The distributed OBServer nodes use the Paxos protocol to ensure high availability. In this architecture design, ODP only performs routing and provides disaster recovery capabilities. The OBServer node incorporates all the database features. This division of responsibilities is clear and simple. It increases the performance of each component and helps OceanBase Database perform almost as well as a standalone database.
ODP can accurately forward a request to a leader. You can also configure ODP to support write/read splitting or read data first from a follower. In addition, when an OBServer node is down, being upgraded, or is undergoing a major compaction, ODP uses its blocklist mechanism to forward requests to a functioning OBServer node.
Manage ODP
OceanBase Cloud Platform (OCP) provides the following management features for ODP.
| Operations | Description |
|---|---|
| Create an ODP cluster | You can perform this operation to create an ODP cluster. |
| Manage ODP parameters | You can perform this operation to manage the parameters of an ODP cluster. |
| Delete an ODP cluster | You can perform this operation to delete an ODP cluster. |
| Upgrade all ODPs in an ODP cluster | You can perform this operation to upgrade all ODPs in an ODP cluster. |
| Restart all ODPs | You can perform this operation to restart all ODPs in an ODP cluster. |
| Manage OceanBase clusters connected to an ODP cluster | You can connect an OceanBase cluster to an ODP cluster or delete a connected OceanBase cluster in the OCP console. |
| Monitor ODP cluster performance | The OCP console allows you to view the performance monitoring data of an ODP cluster, including service monitoring information and system monitoring information. |
| Add an ODP | You can perform this operation to add an ODP to an ODP cluster. |
| Start an ODP | You can perform this operation to start an ODP. |
| Refresh ODP configurations | You can perform this operation to refresh the configurations of an ODP. |
| Stop an ODP | You can perform this operation to stop an ODP. |
| Delete an ODP | You can perform this operation to delete an ODP from the cluster. |
| Restart an ODP | You can perform this operation to restart an ODP in the cluster. |
| Upgrade an ODP | You can perform this operation to upgrade an ODP in the cluster. |