test
You're in a situation many face with Amazon Aurora, where understanding how endpoints distribute connections isn't always straightforward. Let me explain clearly:
What your manager asked:
"Endpoints will distribute connections passively to the instances" — this means:
- Aurora endpoints (like Cluster Endpoint, Reader Endpoint) don’t actively balance traffic like a true load balancer would.
- Instead, they passively hand out instance information (via DNS) and it's up to the client (JDBC, psql, app, etc.) to decide which IP/instance to connect to.
- For example, Reader Endpoint returns one of the available reader IPs randomly (not round-robin or weighted).
Why round-robin doesn't work as expected:
- AWS uses DNS-based routing.
- DNS returns one reader instance per query, and often that IP is cached by the client or OS.
- That leads to uneven distribution — one reader gets most of the load.
Options to improve connection distribution:
-
Use Heimdall Proxy (as AWS suggested):
- It sits between your app and Aurora.
- It intelligently splits reads and writes, and can enforce round-robin, least connections, etc.
- It’s officially supported by AWS.
-
Write custom client-side logic:
- Your app could manually distribute connections across different reader endpoints (if you list all the IPs with a script).
- Not always practical or reliable.
-
Using Route 53?
- You asked AWS about Route 53 — they may suggest:
- Weighted Routing Policy: Assign equal weight to each reader IP.
- Latency Routing Policy: Pick closest instance.
- Caveat: Aurora Reader Endpoint is not integrated natively with Route 53, so AWS may propose using Route 53 with custom records.
- You asked AWS about Route 53 — they may suggest:
What to do next:
- Wait for AWS’s suggestion on Route 53 — maybe they will give you a creative setup.
- Test Heimdall Proxy in a lower environment.
- If performance is critical and you want full control, consider custom load balancing with an application-aware proxy like:
- Pgpool-II
- HAProxy with PostgreSQL support
Would you like help drafting a response to AWS or your manager to clarify these points?
Comments
Post a Comment