This topic describes how to add an endpoint.
Concepts
Primary endpoint: The read/write mode is readable and writable with reads from the primary replica by default, providing strongly consistent reads and writes. When you create a tenant, the primary endpoint is automatically created. The zone where the primary endpoint proxy is deployed is the same as the primary zone by default.
Read-only endpoint: supports only read operations. It sends query SQL requests to the corresponding replica for query based on the traffic strategy that you set. The data consistency strategy is eventual consistency.
Read/write splitting endpoint: The read/write splitting endpoint is readable and writable. Write requests are sent to the primary replica of the universal replica. Read requests outside of transactions are sent to the standby replica. This reduces the pressure on the primary replica and ensures eventual consistency.
Direct connect endpoint: The direct connect endpoint connects directly to the database without going through the database proxy. It provides high performance and low latency. It is suitable for businesses that require extremely fast response times. It supports read and write operations, with requests directly sent to the primary replica.
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.
Considerations
The following limitations apply to endpoints:
Tenants on standby instances do not support adding endpoints.
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.
If you purchase additional read-only replicas later, each time you purchase a new read-only replica for the cluster instance, the number of endpoints you can create increases by one. For more information, see Overview of read-only replicas.
The following limitations apply to direct connect endpoints:
Direct connect endpoints are supported only for tenants with a database version of V4.2.1 or later and a unit count of 1.
Each tenant can have only one direct connect endpoint.
Direct connect endpoints are supported only for instances on the AWS channel, and they are accessed over the private network.
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.
Prerequisites
Before you add an endpoint, make sure that the following conditions are met:
The cloud vendor of the current cluster instance is Tencent Cloud, Huawei Cloud, or Alibaba Cloud.
You have registered the primary account of the cloud vendor.
The current cluster instance has a private endpoint or a peering connection endpoint. For more information, see Connect to a database over the network.
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: Sends traffic to replicas of the type you specified. If multiple replicas of the specified type are available, traffic is distributed to these replicas based on the configured load balancing strategy.
- By Replica: Sends traffic to the replica you specified.
Note
Currently, it is only supported to select by replica on Alibaba Cloud with ODP V4.3.1 or later.
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 Final consistency. There is a replication delay between the read-only and primary zones, which may cause a time difference between the query result in the read-only zone and that in the primary zone. The final data is consistent. The actual access result depends on the replication delay. Configure the database proxy.
Note
Currently, only AWS instances support database proxy configuration.
ParameterDescriptionProxy Cluster Specification Type You can choose between Shared and Exclusive. - Shared: The database proxy service instance shares computing resources with other customers. This option is suitable for businesses with relatively stable and average traffic.
- Exclusive: The database proxy service instance exclusively occupies computing resources. This option is suitable for businesses with high traffic. For more information about billing, see Database proxy billing.
Proxy Cluster Deployment Mode You can choose between single-zone deployment, dual-zone active-active deployment, and dual-zone primary-standby deployment. - Single-zone deployment: All nodes are deployed in the same zone and handle traffic.
- Dual-zone active-active deployment: Nodes are distributed across two different zones and handle traffic.
- Dual-zone primary-standby deployment: ODP nodes are deployed in two different zones. One zone handles traffic, while the other serves as a cold standby. When you select dual-zone primary-standby deployment, make sure to choose the same zone as the client for the primary zone of the proxy cluster. Requests from the standby zone may be disconnected if the zone is taken offline during a deployment mode change in the proxy cluster or database cluster.
Note
Dual-zone primary-standby deployment is only supported for Exclusive.
Proxy Cluster Nodes The number of nodes in the proxy cluster. Target Node Zone(s) Select the node zone. Note
If the zone of the primary endpoint proxy is different from the primary zone of the tenant, traffic forwarding will occur across IDCs, which may increase SQL response latency.
Node Specification Select the target specification. Shared and Exclusive specifications have different limits and increments.
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 VPC Peering Endpoint.
Related operations
View the endpoint
After you add an endpoint or direct connect endpoint, you can view the endpoint information in the deployment relationship diagram on the tenant workbench.
Hover the pointer over the primary endpoint, endpoint, or direct connect endpoint card to view basic endpoint information.
Hover the pointer over the target endpoint to view operation buttons for copying, editing, or deleting the endpoint.
Click Modify to the right of the maximum connections to change the maximum connections for the endpoint. For more information, see Modify the maximum number of database proxy connections.
Note
Currently, only instances from Alibaba Cloud channel support modifying the maximum number of connections.
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.
