This topic describes how to add an endpoint.
Background information
Primary endpoint: Supports strongly consistent reads and writes. By default, it reads from the primary replica and its proxy runs in the tenant’s primary zone. If you skip creating the primary endpoint when you create the tenant, you can create it later when you obtain a public or private connection address.
Read-only endpoint: Routes queries to replicas according to the configured traffic policy and provides eventual consistency.
Read/write splitting endpoint: Routes writes to the leader of the full-featured replicas and reads outside transactions to standby replicas. This reduces the load on the leader and provides eventual consistency.
Direct connect endpoint: Sends reads and writes directly to the primary replica, bypassing the database proxy. It provides low-latency access for workloads that require fast responses.
Note
- We recommend that you use the primary endpoint, read-only endpoint, and read/write splitting endpoint in a production environment.
- Direct connect endpoints are available only to users on the allowlist. If you want to enable this feature, contact OceanBase Technical Support.
Prerequisites
Before you add an endpoint, make sure that the following conditions are met:
Your instance runs on Huawei Cloud, Alibaba Cloud, AWS, or Google Cloud.
You have registered a primary account with your cloud provider.
The current instance has a private endpoint or a peering connection endpoint. For more information, see Connection string overview.
Note
Azure instances use shared private connections. For instructions on connecting through Azure Private Link, see the MySQL mode guide or the Oracle mode guide. The procedure in this topic for adding endpoints does not apply to Azure.
Considerations
The following limitations apply to endpoints:
You cannot add endpoints to tenants on standby instances.
In a single-IDC or dual-IDC deployment mode, the proxy layer supports one primary endpoint and at most one read-only or read/write splitting endpoint.
In a multi-IDC deployment mode, the proxy layer supports one primary endpoint and at most two read-only or read/write splitting endpoints. If you need more endpoints, contact OceanBase Technical Support to apply for a larger proxy resource.
Each additional read-only replica you purchase for the instance lets you create one more endpoint. For more information, see the read-only replica overview.
The following limitations apply to direct connect endpoints:
Direct connect endpoints can be created only for clusters deployed in dual-IDC or multi-IDC mode with exactly one OceanBase node in each IDC.
Direct connect endpoints are supported only for tenants with a database version of V4.2.1 or later, a unit count of 1, and a single primary zone.
Each tenant can have only one direct connect endpoint.
You can scale out an OceanBase instance or switch it to single-IDC mode while it has a direct connect endpoint. However, these operations pose risks to subsequent use of the endpoint.
You cannot create a standby instance for an instance that has a direct connect endpoint. You also cannot create a direct connect endpoint for an OceanBase primary instance that has a standby instance.
Direct connect endpoints are supported for instances on the AWS and Alibaba Cloud channels and are accessed over the private network. This feature is available only to users on the allowlist. To use it, contact OceanBase Technical Support.
Direct connect endpoints do not support SSL encryption or changes to the maximum number of connections.
The following version requirements apply to read/write splitting endpoints:
If the OceanBase cluster is of version 3.x, the database proxy must be of version V3.2.9 to V4.0 to support read/write splitting endpoints.
If the OceanBase cluster is of version 4.x, the database proxy must be of version V4.1 or later to support read/write splitting endpoints.
Procedure
Log in to the OceanBase Cloud console.
In the left-side navigation pane, click Instances.
In the instance list, find the target instance, click the instance name to go to the instance overview page.
In the left-side navigation pane, click Tenants.
In the tenant list, click the name of the target tenant to go to the tenant overview page.
Click Add Endpoint in the right-side topology diagram.
Configure the endpoint as needed.
Basic configurations.
ParameterDescriptionSelect Network Type to Create Select whether to create a private endpoint or a peering connection endpoint. Endpoint Type The type of the endpoint to add. Valid values:
Read-only: Performs read-only operations on a replica and isolates the replica from the primary endpoint to implement read/write splitting.
Read/Write Splitting: Supports automatic read/write splitting, where write requests are automatically forwarded to the primary replica, and read requests are forwarded to a standby replica or read-only replica based on the settings.
Direct Connection: Directly connect to the database without using a database proxy. This provides high-performance, low-latency access, which is suitable for businesses that require extremely fast response times. Both read and write requests are directly sent to the primary replica.Read Traffic Distribution By Replica Type: Routes reads to replicas of the selected type. If several replicas match, the proxy distributes reads according to the configured load balancing policy.
By Replica: Routes reads to the selected replica.Load Balancing Same Zone Priority: Prioritizes replicas in the same zone as the ODP. This parameter is available only when Read Traffic Distribution is set to By Replica Type.
Auto Balance: For read/write splitting and read-only endpoints, read traffic is automatically balanced across standby replicas in the ODP.
Custom Weights: Allows you to set custom weights for the replicas based on the access traffic. This parameter is available only when Read Traffic Distribution is set to By Replica.Failover - If no replica of the type you selected is available, read traffic is automatically forwarded to the primary replica.
- If a standby replica is configured, traffic is forwarded to the standby replica when all specified replicas are unavailable. The traffic is automatically balanced across the available replicas.
Consistency Level Eventual consistency. Because replication takes time, reads from a read-only zone can briefly return older data than reads from the primary zone. Configure the database proxy.
Note
- Database proxy configuration is available for AWS instances and for Alibaba Cloud instances that support proxy deployment mode configuration.
- On Alibaba Cloud instances that support proxy deployment mode configuration, each new read-only or read/write splitting endpoint gets its own proxy cluster. The primary endpoint keeps its existing proxy.
- Choose the proxy specification type, deployment mode, zones, and node specification from the options in the console.
ParameterDescriptionProxy Cluster Specification Type Select a proxy cluster specification type from the options shown in the console. - Serverless: The proxy scales automatically as traffic changes. This tier suits workloads with variable traffic and is currently free. For billing details, see the database proxy overview.
- Shared: The proxy shares compute resources with other customers and suits workloads with steady traffic.
- Exclusive: Exclusive proxy clusters use dedicated compute resources and are suited to high-traffic workloads. For more information about billing, see Database proxy billing.
Note
Serverless specifications are available only to allowlisted users on AWS.
Proxy Cluster Deployment Mode Alibaba Cloud and AWS instances support the following proxy cluster deployment modes. Select a mode from the options shown in the console. - Single-zone deployment: All nodes run in the same zone and handle traffic.
- Dual-zone deployment: Nodes run in two zones.
- Primary-standby (Exclusive only): The primary node handles most of the traffic. The standby node handles 1%. Choose the client’s zone as the primary zone of the proxy cluster. Connections from the standby zone may be interrupted if a deployment mode change in the proxy cluster or database cluster takes that zone offline.
- Active-active: Both zones handle traffic.
- Three-zone deployment: Proxy nodes run in three zones. This mode is available only with the Exclusive tier.
- Primary-standby: The primary node handles most of the traffic. Each of the two standby nodes handles 1%.
- Multi-active: The three zones share traffic evenly.
Proxy Cluster Nodes The number of nodes in the proxy cluster. Node Zone(s) Select the zone for the proxy nodes. If the primary endpoint’s proxy runs outside the tenant’s primary zone, traffic crosses zones, which can increase SQL response times. Node Specification Select a node specification from the options shown in the console. - Alibaba Cloud and AWS: The minimum Shared specification is 1C 2G, with increments of 0.25C 0.5G. Exclusive specifications range from 1C 2G to 30C 60G, with increments of 1C 2G.
- Other cloud providers: Shared specifications range from 2C 4G to 8C 16G, with increments of 2C 4G. Exclusive specifications range from 2C 4G to 30C 60G, with increments of 2C 4G.
After the basic settings are completed, perform the following operations based on the selected network type.
Private endpoint: Create and connect the endpoint service and endpoint based on your cloud vendor.
Peering connection endpoint: After you complete the peering connection configuration, select the target peering connection ID and click Create peering connection address.
Related operations
Notice
- When migrating an original private connection to Private Link, delete only the original private connection address that is no longer in use. Do not delete the access endpoint itself, such as the primary or read-only endpoint, the Private Link endpoint, or any public address that is still in use.
- For more information about migration and deleting the original private connection address, see MySQL mode guide and Oracle mode guide.
View the endpoint
After you add an endpoint, you can view it in the topology diagram on the tenant’s Overview page.
Hover over an endpoint card to view its details.
Hover over the endpoint to see the options to copy, edit, or delete it.
To change the endpoint’s connection limit, click Modify next to the maximum number of connections. For more information, see Modify the maximum number of connections for a tenant proxy.
Note
This setting is available only for Alibaba Cloud instances.
Edit an endpoint
Go to the Overview page of the tenant.
In the topology diagram, click the Edit icon next to the target endpoint.
On the Edit endpoint page, modify the endpoint configuration as needed.
Click OK.
Delete an endpoint
Go to the Overview page of the tenant.
In the topology diagram, click the Delete icon next to the target endpoint.
Confirm the operation and click OK.