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

GET requests should benefit from read-only-replica #88

Open
norbertbede opened this issue Oct 5, 2021 · 2 comments
Open

GET requests should benefit from read-only-replica #88

norbertbede opened this issue Oct 5, 2021 · 2 comments

Comments

@norbertbede
Copy link

GET requests should benefit from read-only-replica implementation
similar to: https://wiki.idempiere.org/en/NF6.2_Reporting_from_Read-Only_Replica

https://mattermost.idempiere.org/idempiere/pl/o8mu6jt593nyzbjk9ausmwyjze

@CarlosRuiz-globalqss
Copy link
Collaborator

I'm not sure how to do this, so, a pull request would be appreciated.

I think by default the system must keep reading from master, and adding maybe a parameter to the GET methods to explicitly instruct to try replica. For example something like $replica=true

@CarlosRuiz-globalqss
Copy link
Collaborator

Another issue to take into account, the reading from read-only replica was implemented opening/closing a direct connection, I mean, no connection pool, which must make it a lot slower than using the pool.

So, as it is, if you use extensively GET in read-only replica it will probably suffer from big slowness, would be better to implement a connection pool on the replica before using this extensively.

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

No branches or pull requests

2 participants