BYOC tenants support read-only and read/write splitting endpoints. This topic describes how to add an endpoint.
Concepts
- Primary endpoint: Supports reads and writes, reads from the primary replica by default, and provides strong consistency. It is created automatically when you create a tenant. By default, its proxy is deployed in the tenant's primary zone.
- Read-only endpoint: Supports queries only. Query requests are routed to replicas according to the configured traffic distribution policy. Reads are eventually consistent.
- Read/write splitting endpoint: Supports reads and writes. Write requests are routed to the primary full-featured replica. Read requests are routed to replicas according to the endpoint configuration to reduce the load on the primary replica. The default consistency level is strong read.
- Direct endpoint: Connects directly to the database, bypassing ODP, for high-performance, low-latency access. It is intended for workloads with strict response time requirements. It supports both reads and writes, and requests go directly to the primary replica.
Note
- For production workloads, we recommend primary, read-only, or read/write splitting endpoints.
- Direct endpoints are available only to allowlisted users. Contact OceanBase Technical Support to enable this feature.
Considerations
- Endpoint limits:
- You cannot add endpoints to tenants in standby instances.
- In a single-IDC or dual-IDC deployment, the proxy layer supports one primary endpoint and up to one additional read-only or read/write splitting endpoint.
- In a multi-IDC deployment, the proxy layer supports one primary endpoint and up to two additional read-only or read/write splitting endpoints. If you need more endpoints, contact OceanBase Technical Support to request more proxy resources.
- Each additional read-only replica instance purchased for the cluster increases the endpoint limit by one. For more information, see Read-only replica overview.
- Direct endpoint limits:
- Direct endpoints are supported only for tenants with one resource unit on OceanBase Database V4.2.1 or later.
- Each tenant supports one direct endpoint.
- Direct endpoints are supported only for instances on AWS and can be accessed only over a private network.
- Version requirements for read/write splitting endpoints:
- For OceanBase Database 3.x clusters, the ODP version must be between V3.2.9 and V4.0.
- For OceanBase Database 4.x clusters, the ODP version must be V4.1 or later.
Prerequisites
Before adding an endpoint, make sure that:
- The cluster is deployed on AWS.
- You have registered a primary account with the cloud provider.
- You have created a BYOC instance and a tenant. The primary endpoint's private connection information is visible in the deployment diagram on the tenant Overview page.
Procedure
Log in to the OceanBase Cloud console.
In the left-side navigation pane, click Instances.
Find the cluster instance and click its name to open its Overview page.
In the left-side navigation pane, click Tenants.
Click the tenant name to open its Overview page.
Click Add Endpoint on the right side of the deployment diagram.
Configure the endpoint as needed.
Basic settings
ParameterDescriptionEndpoint Type Select the type of endpoint to add. - Read-only: Queries a replica through an endpoint separate from the primary endpoint, isolating read traffic from write traffic.
- Read/Write Splitting: Routes writes automatically to the primary replica and reads to replicas according to the configuration.
- Direct: Bypasses ODP and sends reads and writes directly to the primary replica for low-latency access.
Read Traffic Distribution Choose which replicas can receive read requests. The available options depend on the endpoint type. Load Balancing Choose an available policy to control how read requests are distributed across the selected replicas. Failover Enable failover as needed. When enabled, read traffic automatically switches to the primary replica if the selected replicas are unavailable. Default Read Consistency Level Read-only endpoints use weak reads by default. Read/write splitting endpoints use strong reads by default. Weak reads may return stale data due to replication latency between replicas. Database proxy settings
ParameterDescriptionProxy Cluster Deployment Mode Select a deployment mode. - Single-zone deployment: All nodes are deployed in one zone and serve traffic.
- Dual-zone active-active deployment: Nodes are distributed across two zones, and nodes in both zones serve traffic.
Proxy Cluster Nodes The number of nodes in the proxy cluster. Target Node Zone(s) Select the zones for the nodes. Note
If the primary endpoint's proxy is deployed in a different zone from the tenant's primary zone, traffic is forwarded across IDCs, which may increase SQL response time.
Node Specification Select a node specification, such as 4 vCPUs and 8 GiB, 8 vCPUs and 16 GiB, 16 vCPUs and 32 GiB, or 32 vCPUs and 64 GiB. Available specifications are shown in the console.
Click Create.
After creation is complete, locate the new endpoint card in the deployment diagram on the tenant Overview page. Check its read/write mode and connection information. The private connection address of a read-only or read/write splitting endpoint appears on its card.
Related operations
View endpoints
After adding an endpoint or a direct endpoint, you can view it in the deployment diagram on the tenant Overview page.
- Hover over a primary, additional, or direct endpoint card to view its basic information.
- Hover over an endpoint to display the buttons for copying, editing, or deleting it.
Edit an endpoint
- Open the tenant Overview page.
- In the deployment diagram, click the edit icon in the upper-right corner of the endpoint card.
- Change the configuration as needed.
- Click OK.
Delete an endpoint
- Open the tenant Overview page.
- In the deployment diagram, click the delete icon in the upper-right corner of the endpoint card.
- Review the risks of deleting the configuration and click Confirm.