This topic describes how to add an endpoint.
Concepts
Primary endpoint: supports read and write operations by default. It provides strongly consistent read and write operations. 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.
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.
Prerequisites
Before you add an endpoint, make sure that the following conditions are met:
The cloud vendor of the current instance is AWS, Google Cloud, Huawei Cloud, or Alibaba Cloud.
You have registered a primary account of the cloud vendor.
The current instance has a private endpoint or a peering connection endpoint. For more information, see Connection string overview
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 based on your needs.
Parameter Description Select 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.
Zone The zone where the endpoint is located. This zone is also the zone where the read-only replica is located and where data is accessible in read requests. 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.
Note
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.
Note
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. After the basic settings are completed, perform the following operations based on the selected network type.
Private endpoint: Complete the creation and connection of the endpoint and the endpoint service based on the different cloud vendors.
Peering connection endpoint: On the configuration page, select the target peering connection ID and click Create VPC Peering Endpoint.
Related operations
View the endpoint
After you add an endpoint or direct connection endpoint, you can view the endpoint information in the topology diagram on the Overview page of the tenant.
Hover the pointer over the primary endpoint, access endpoint, or direct connection endpoint card. The complete private endpoint is displayed. The settings and delete icons are displayed in the upper-right corner of the card. You can click the settings icon to edit the endpoint or direct connection endpoint, and click the delete icon to delete the endpoint.
Click the copy icon next to the private endpoint to copy the private endpoint.
Click Modify next to the maximum connections to change the maximum connections for the endpoint. For more information, see Modify the maximum number of connections for a tenant proxy
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.