This topic describes the concepts of the OceanBase Cloud database proxy service.
Background information
The database proxy of OceanBase Cloud sits between the client and the OceanBase Cloud database, receiving client requests and forwarding them to the backend database. It ensures optimal routing to minimize distributed transactions and enhances the high availability of OceanBase Cloud databases by preventing application impact from single-server failures in multi-replica environments.
The OceanBase Cloud database proxy offers features such as connection management, optimal routing, high-performance forwarding, easy maintenance, high availability, and proprietary protocols. The following table describes some of the key concepts:
Term |
Description |
|---|---|
| Proxy endpoint | The proxy endpoint is at the core of the database proxy. It supports customizable access strategies, allowing you to modify endpoint prefixes, port numbers, etc. Connecting to RDS instances through the database proxy endpoint enables you to utilize advanced proxy features. |
| Connection management | For each client's physical connection, the database proxy maintains its connections to multiple backend OBServer nodes. It uses a version-based incremental synchronization method to maintain session states for each OBServer node, ensuring efficient client access to all OBServer nodes. |
| Optimal routing | The database proxy considers factors such as replica locations, user-configured read/write separation routing strategies, optimal links for OceanBase's multi-region deployments, and the status and load of each OceanBase server. This enables the proxy to route requests to the best OBServer node, ensuring the high-performance operation of OceanBase. |
| High-performance forwarding | The database proxy is fully compatible with the MySQL protocol and supports OceanBase's proprietary protocol. It employs a multi-threaded asynchronous framework and transparent stream forwarding design to ensure high-performance data forwarding while minimizing its resource consumption. |
| Easy maintenance | The database proxy is stateless and supports unlimited horizontal scaling, allowing it to access multiple OceanBase instances simultaneously. You can monitor the status of the database proxy in real-time through the OceanBase Cloud console, making maintenance simple and convenient. |
| High availability | The high availability of the database proxy is twofold: it ensures its own high availability to continuously provide proxy services, and it is a key component of OceanBase's high availability system. It shields users from downtime, upgrades, and other disruptions, ensuring stable and fast recovery of OceanBase database services. |
| Proprietary protocol | The database proxy communicates with OBServer nodes using OceanBase's proprietary protocol, which includes enhanced features such as CRC checks for data packet integrity and support for Oracle-compatible data types and interaction models. |
Proxy specification types
OceanBase Cloud provides three database proxy specification types: Shared, Exclusive, and Serverless.
Shared: The database proxy service instance shares compute resources with other customers. The size of the database proxy instance is fixed based on the actual size of the instance. This type is suitable for businesses with relatively fixed and average traffic.
Exclusive: The database proxy service instance exclusively occupies compute resources. You can expand the database proxy resources as needed based on your business requirements. This type is suitable for businesses with high traffic. The exclusive proxy service is billed by the hour based on the resources you use.
Serverless: Compute resources scale automatically with traffic demand. This type is suitable for workloads with highly variable traffic.
The following table compares the three specification types:
Feature |
Shared |
Exclusive |
Serverless |
|---|---|---|---|
| Billing type | Free | Pay-as-you-go | Free |
| Resource type | Shared CPU physical resources | Exclusive CPU physical resources with more stable performance. | - |
| Deployment architecture | High-availability cluster deployment architecture to ensure smooth failover. | High-availability cluster deployment architecture to ensure smooth failover. | High-availability cluster deployment architecture to ensure smooth failover. |
| Node specifications | AWS: minimum 1C; other cloud providers: 2C to 8C. | AWS: 1C to 30C; other cloud providers: 2C to 30C. | AWS: elastic scaling from 1C to 30C per primary node. |
| Read/write separation | Supported | Supported | Supported |
| Transaction splitting | Supported | Supported | Supported |
| Connection keep-alive | Supported | Supported | Supported |
| Non-disruptive configuration changes | Supported. The proxy automatically switches to nodes with the new specifications. | Supported. The proxy automatically switches to nodes with the new specifications. | In-place scaling has no impact. Non-in-place scale-up may interrupt connections. |
| SSL encryption | Supported | Supported | Supported |
Note
For node specification ranges and increments by cloud provider, see Manage database proxy. For details about the free quota for Shared specifications and billing rules for Exclusive specifications, see Database proxy billing.
Serverless database proxy cluster
Note
- Serverless database proxy clusters are currently in public beta and available only to allowlisted users. To use this feature, contact OceanBase Technical Support. This feature is currently supported only on AWS.
- You can switch from Serverless to Shared or Exclusive specifications and vice versa by clicking Change Configuration. For instructions, see Manage database proxy.
About Serverless database proxy clusters
ODP Serverless is the serverless version of OceanBase Database Proxy. It automatically adjusts the computing resources of ODP based on the actual load of business traffic, eliminating the need for manual cluster specification planning. ODP Serverless is suitable for business scenarios with large load fluctuations and unpredictable traffic peaks and troughs, such as major promotions on e-commerce platforms, SaaS multi-tenant services, and scheduled reporting tasks.
Unlike the Serverless Database Proxy Cluster, a database proxy that uses Shared or Exclusive specifications requires you to set the proxy cluster specifications manually and then manually scale the cluster up or down when resources are insufficient or underutilized. This type is suitable for workloads with relatively stable traffic or when you want to reserve a fixed amount of compute resources for the proxy cluster.
Except for elastic scaling, the Serverless Database Proxy Cluster does not differ from non-serverless proxy clusters in disaster recovery, connection limits, or other attributes.
Serverless database proxy cluster pricing
ODP Serverless is currently free. After enabling ODP Serverless, you do not need to pay any additional fees for its elastic computing capability or proxy cluster specifications. Note that although ODP Serverless itself is free, you still need to pay cross-zone traffic fees for private network requests on AWS.
Elastic scaling mechanism
ODP Serverless combines burst load detection with a vertical elastic resource recommendation mechanism to continuously assess the resource requirements of a proxy cluster. When the system determines over multiple consecutive detection cycles that the current specification cannot meet the business load, it automatically triggers a scale-up, gradually increasing the proxy cluster's CPU and memory specifications. After each adjustment, the system re-evaluates the resource pressure; if the current specification is still insufficient, it continues to scale up until the proxy cluster returns to a reasonable and stable operational level.
Initial proxy cluster specification (base capacity)
The initial specification of a Serverless proxy cluster equals the tenant specification × number of units × 1/4. For example, if the tenant specification is 4C and the number of units is 2, the initial specification of the Serverless proxy cluster is 4C × 2/4 = 2C.
Primary node scaling limits (maximum and minimum capacity)
Each Serverless primary node can scale from 1C to 30C.
Impact of elastic scaling on client connections
Generally, the Serverless Database Proxy Cluster uses in-place scaling to increase or decrease node specifications, so scaling has no impact on client connections. In rare cases, non-in-place scaling may occur, involving the creation and deletion of proxy cluster nodes. Connections on the deleted database proxy nodes will be interrupted. For this scaling method, we will send an email and an in-app notification three days in advance to inform you of the node deletion time, allowing you to contact us to modify the time. It is recommended that you configure an automatic retry mechanism for clients to avoid connection interruptions caused by non-in-place scale-ups.