You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have multiple instances of a service running in EKS which are spread across different availability zones within 1 AWS region. I also have multiple RDS Aurora read replicas running across multiple availability zones within that same AWS region. Currently, when my service requests a connection to the RDS read-only endpoint, there is no priority given to RDS replica instances in the same availability zone as the service (even though same-AZ connections would have sub-millisecond latency versus single digit millisecond latency for cross-AZ connections).
Proposed Solution
Because the driver is already aware of the RDS cluster topology, most (all?) of the information required to implement availability zone affinity should be accessible. A new reader selection strategy could be implemented which will give a higher priority to replica instances within the current availability zone when establishing a new read-only connection.
Other Information
No response
Acknowledgements
I may be able to implement this feature request
This feature might incur a breaking change
The AWS Advanced JDBC Driver version used
2.4.0
JDK version used
Corretto 21.0.3
Operating System and version
Amazon Linux 2
The text was updated successfully, but these errors were encountered:
Thank you for reaching out with this issue. This idea has been discussed some time ago but unfortunately RDS API doesn't provide enough data to prioritize one cluster instance after another based on their availability zone. Availability zone for a cluster member isn't available through RDS API.
@sergiyvamz I'm not sure how difficult it would be to integrate with this API, but it looks like the RDS DescribeDBInstances API does include an AvailabilityZone property for each DBInstance in the response.
Thank you for looking into this. RDS API has already integrated in some of our plugins and there's no issues to add DescribeDBInstances. We'll review this enhancement once again.
Perhaps this feature can construct the AZ instance mappings not only using the RDS API, but also through custom RDS endpoints mappings provided by the user. Each custom RDS endpoint would contain instances of a specific AZ and these mappings are then provided via a data source property. Although, I suppose an integration with the RDS API would be a more seamless developer experience. Just some thoughts.
Follow up suggestion: now with Local Write Forwarding available on Aurora Postgres and MySQL, perhaps AZ affinity shouldn't be exclusive to read-only connections.
Describe the feature
A new reader selection strategy that supports availability zone affinity would be useful for reducing latency similar to what is described here: https://aws.amazon.com/blogs/architecture/improving-performance-and-reducing-cost-using-availability-zone-affinity/
Use Case
I have multiple instances of a service running in EKS which are spread across different availability zones within 1 AWS region. I also have multiple RDS Aurora read replicas running across multiple availability zones within that same AWS region. Currently, when my service requests a connection to the RDS read-only endpoint, there is no priority given to RDS replica instances in the same availability zone as the service (even though same-AZ connections would have sub-millisecond latency versus single digit millisecond latency for cross-AZ connections).
Proposed Solution
Because the driver is already aware of the RDS cluster topology, most (all?) of the information required to implement availability zone affinity should be accessible. A new reader selection strategy could be implemented which will give a higher priority to replica instances within the current availability zone when establishing a new read-only connection.
Other Information
No response
Acknowledgements
The AWS Advanced JDBC Driver version used
2.4.0
JDK version used
Corretto 21.0.3
Operating System and version
Amazon Linux 2
The text was updated successfully, but these errors were encountered: