Instead of an RDS instance I'm trying to use an RDS Aurora cluster.
I can use an instance within the cluster using
@EnableRdsInstance
However when trying to use the cluster itself I see an exception with this as the cause:
No database instance with id:'my-cluster-name' found. Please specify a valid db instance
Looking into the code, I can see that in AmazonRdsDataSourceFactoryBean, only instances are queried using AmazonRDS.describeDBInstances
It would be good to either amend this to support a cluster, or introduce a new annotation
@EnableRdsCluster
What do you think the chances are for RDS cluster support in Spring Cloud AWS?
Much needed one..
People are now going for serverless RDS, so cluster connection establishment is really required.
Do we know if this is on the road map at all?
This has also been reported here: This issue has also been reported here: https://github.com/spring-cloud/spring-cloud-aws/issues/302
Looking forward to the 3.0.0.M1 milestone!
Definitely need this feature to be able to connect to an Aurora RDS Cluster (through annotation and through the application.properties file) for Spring & Spring Boot projects.
Meanwhile, if anyone knows a workaround for connecting to an Aurora cluster in Spring Boot and enabling read replica support, please post here!
@aravindparappil46 currently you have to do it manually - look at Vlad's post for inspiration: https://vladmihalcea.com/read-write-read-only-transaction-routing-spring/
Vlad's post is interesting and certainly helps for day-to-day running. But it's of little help to Spring projects that are looking to reap the benefits of Aurora clusters for failover. The current provision of a retry interceptor isn't really good enough. Services should be able to connect to a cluster, the SDK should be aware of which instances are write and read-only, and should direct requests accordingly.
Roll on 3.0.0.M1. Hopefully that addresses the failover issue.
I've done it for now using reader/writer datasources + AOP .
basic idea is here: https://fable.sh/blog/splitting-read-and-write-operations-in-spring-boot/
Looking forward to 3.0.0.M1 milestone!
unable to connect to an Aurora RDS Cluster with read replica (through annotation and through the application.properties file) for spring boot project using spring cloud
Any news Please !
Replaced with https://github.com/awspring/spring-cloud-aws/issues/50
Most helpful comment
Do we know if this is on the road map at all?