Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
2.2.2
-
None
Description
Spent several days figuring out why my Aurora read replicas weren't getting any traffic. Realized that even after calling setReadOnly(true) on the Connection, isReadOnly() returned false immediately after (with no logging or error to indicate why), and all traffic went to master. I had to debug into the depths of the driver code to find AuroraListener:77 that hard -codes the expected URL pattern for a cluster.
However, in our case, we have friendly CNAME's for the two cluster endpoints (e.g., "myapp-writer.example.com" and "myapp-reader.example.com"). I know there's already a bug entered about being able to specify the cluster "ro" endpoint (CONJ-565), so this might be related. In any case, I would imagine the driver, once given any endpoint (regardless of specific URL pattern), might be able to query the DB to get the entire shape of the cluster.