In Amazon Aurora (a MySQL- and PostgreSQL-compatible relational database
engine), custom endpoints allow twtech to create a tailored connection endpoint that routes traffic to a specific
subset of Aurora DB instances in a Aurora
cluster. This is especially useful in Aurora clusters with multiple instances, such as those
used for read scaling or application-based workload separation.
The Custom Endpoint in Aurora
A custom
endpoint is a user-defined
endpoint that twtech associates with one or more Aurora reader instances in a cluster. It provides a logical endpoint (DNS name) that
applications can use to target specific
instances for reads.
- It does not support write operations.
- Custom endpoints route traffic only to reader nodes, never to the writer.
Use
Cases for Custom Endpoints
1.
Read Traffic
Segmentation
o Direct
specific workloads to certain readers (e.g., reporting, analytics).
2.
Application
Sharding
o Route
different microservices to different DB instances.
3.
Failover
Isolation
o Prevent
specific applications from being impacted during failover.
4.
Performance
Optimization
o Isolate heavy queries on a designated replica.
Default Aurora Endpoints (for comparison)
|
Endpoint Type |
Description |
Use Case |
|
|
Routes to the writer
instance. |
For write/read operations. |
|
|
Routes to any
available reader. |
For read scaling. |
|
|
Routes to a specific
instance. |
For troubleshooting/testing. |
Creating a Custom Endpoint
twtech can create custom endpoints using:
- AWS Management Console
- AWS CLI
- RDS API
CLI Example:
# bash aws rds create-db-cluster-endpoint \ --db-cluster-identifier twtech-aurora-cluster \ --db-cluster-endpoint-identifier analytics-endpoint \ --endpoint-type READER \ --static-members twechdbinstance2 twtechdbinstance3 \ --tags Key=Purpose,Value=Analytics Key Parameters
-
--db-cluster-endpoint-identifier: Custom name for the endpoint. -
--endpoint-type: Must beREADER(only type supported). -
--static-members: List of DB instances for routing. -
--excluded-members: Exclude specific DB instances from dynamic routing.
Limitations
- Only Aurora MySQL and Aurora PostgreSQL support custom endpoints.
- Custom endpoints are read-only—write traffic will fail.
- twtech can have up to 5 custom endpoints per cluster.
No comments:
Post a Comment