Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS Aurora read replica support (using the read only DataSource) #1994

Open
riteshmaurya opened this issue Apr 20, 2020 · 1 comment
Open

Comments

@riteshmaurya
Copy link

riteshmaurya commented Apr 20, 2020

ebean should automatically direct read request to reader instance of aws aurora cluster and write request to writer instance

developer should have an option of enable/disable using properties file.

@rbygrave rbygrave changed the title AWS Aroura read replica support from ebean side AWS Aurora read replica support (using the read only DataSource) Apr 23, 2020
@rbygrave
Copy link
Member

Yes. This is really a documentation issue as Ebean already has support for this via configuring a read only DataSource.

// jdbc datasource that uses the aws aurora `-ro` endpoint
DataSource readonlyDataSource = ... 

databaseConfig.setReadonlyDataSource(...)

Ebean will automatically send query requests that are not in a @Transactional and not a for update to the read only DataSource.

Outstanding task:

  • Add documentation for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants