This topic describes the purpose of OBProxy and the management features of OBProxy in OceanBase Cloud Platform (OCP).
OBProxy overview
OceanBase Database is a distributed database. This makes it different from traditional standalone databases. In OceanBase Database, each table or table partition may be stored on a different server. 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 DML statement. This is almost impossible to implement at the application level. OBProxy is a reverse proxy designed for OceanBase Database. Its core feature is to route the data requests from the client to the right OBServer.
The following figure shows how a client request accesses OceanBase Database through OBProxy. The user sends a request from a client. The request is forwarded by a load-balancing module to a stateless OBProxy, which then forwards the request to the optimal OBServer in the backend OceanBase cluster.
Note
- The load-balancing module can be any common product, such as SLB and F5.
- OBProxy 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 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 OBServers use the Paxos protocol to ensure high availability. In this architecture design, OBProxy only performs routing and provides disaster recovery capabilities. OBSever 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.
OBProxy can accurately forward a request to a leader. You can also configure OBProxy to support write/read splitting or read data first from a follower. In addition, when an OBServer is down, being upgraded or is undergoing a major compaction, OBProxy uses its blacklist mechanism to forward requests to a functioning OBServer.

OceanBase Cloud Platform (OCP) supports automatic startup of the obproxy process along with the OCP-Agent service upon power-on. When the server is restarted, the obproxy process is automatically started and restored to the state before the server restart. For more information, see OCP-Agent processes.
Manage OBProxy
OCP provides the following management features for OBProxy.
| Operation | Description |
|---|---|
| Take over an OBProxy | You can perform this operation to take over an external OBProxy to the current OCP for management. |
| Create an OBProxy Cluster | You can perform this operation to create an OBProxy cluster. |
| Delete an OBProxy | You can perform this operation to delete an OBProxy from the cluster. |
| Restart an OBProxy | You can perform this operation to restart an OBProxy in the cluster. |
| Upgrade an OBProxy | You can perform this operation to upgrade an OBProxy in the cluster. |
| Add an OBProxy | You can perform this operation to add an OBProxy to an OBProxy cluster. |
| Refresh OBProxy Configurations | You can perform this operation to refresh the configurations of an OBProxy |
| View OBProxy Cluster Service Monitor | You can perform this operation to view the service monitoring data of an OBProxy cluster. |
| View OBProxy Cluster System Monitor | You can perform this operation to view the system monitoring data of an OBProxy cluster. |
| OBProxy Cluster Request Analysis | You can perform this operation to view the performance request analysis data of an OBProxy cluster. |
| Manage OBProxy Cluster Parameters | You can perform this operation to manage the parameters of an OBProxy cluster. |
| Add Connectable OceanBase Cluster | You can perform this operation to add an OceanBase cluster that is accessible to an OBProxy cluster. |
| Delete an OBProxy Cluster | You can perform this operation to delete an OBProxy cluster. |
| Upgrade All OBProxies | You can perform this operation to upgrade all OBProxies in an OBProxy cluster. |
| Restart All OBProxies | You can perform this operation to restart all OBProxies in an OBProxy cluster. |
| Delete Connected OceanBase Cluster | You can perform this operation to delete an OceanBase cluster that is connected to an OBProxy cluster. |