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 two tiers of database proxy service: Shared and Exclusive.
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.
The following table describes the features and differences of the two 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. |
| Instance specifications | Supports 2C to 8C (1C to the upper limit of the Shared-tier quota on AWS) | Supports 2C to 64C (1C to 30C on AWS) | Elastic scaling |
| Read/write separation | Supported | Supported | Supported |
| Transaction splitting | Supported | Supported | Supported |
| Connection keep-alive | Supported | Supported | Supported |
| SSL encryption | Supported | Supported | Supported |
Serverless database proxy cluster
Note
- The Serverless Database Proxy Cluster is currently in public beta and available only to allowlisted users. To use this feature, contact OceanBase Technical Support. Currently, the feature is supported only through the AWS channel. Support for other cloud providers will be added later.
- You can switch from a shared or exclusive specification to the Serverless specification by clicking Change Configuration. However, switching from the Serverless specification to an exclusive or shared specification is not currently supported.
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 e-commerce promotions, 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 capabilities 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 the 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 operating level.
Initial proxy cluster specification (base capacity)
The initial specification is the greater of the tenant specification × number of units × 1/4 and 1C. For example, if the tenant specification is 4C and the number of units is 2, the initial specification of the Serverless proxy cluster is max(4C × 2/4, 1C) = 2C. If the tenant specification is 1C and the number of units is 1, the initial specification of the Serverless proxy cluster is max(1C × 1/4, 1C) = 1C.
Proxy cluster elastic scaling limits (maximum and minimum capacity)
The maximum CPU specification allowed for automatic scaling-up under sudden traffic and the minimum CPU specification maintained during off-peak traffic. The elastic upper limit equals 1/4 of the specification of a full-featured replica node in OceanBase Database. For example, for an OceanBase cluster deployed in 16C across multiple IDCs with a 2-2-2 configuration, the elastic upper limit for a single Serverless proxy cluster is 16C × 6/4 = 24C. The elastic lower limit is 1C.
Impact of elastic scaling on client connections
Generally, the Serverless Database Proxy Cluster uses in-place scaling to increase or decrease node specifications. In this case, scaling does not affect 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 non-in-place scaling, we will send you an email and an in-app notification three days before node deletion. You can contact us to reschedule the deletion. We recommend that you configure automatic retries for clients to avoid connection interruptions caused by non-in-place scale-ups.
