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

Accept minimum required GTID #2444

Closed
kirs opened this issue Dec 12, 2019 · 4 comments
Closed

Accept minimum required GTID #2444

kirs opened this issue Dec 12, 2019 · 4 comments
Assignees

Comments

@kirs
Copy link
Contributor

kirs commented Dec 12, 2019

I've been really excited to see 6691a86 and #2120! Thanks for working on this.

I'm opening the issue to discuss a potential feature request. Feel free to close it if you think it's not too relevant.

Given the app that connects to ProxySQL is now able to get current GTID from its MySQL session, we could store that GTID somewhere between requests (maybe in a cookie/web session), and when the browser makes a next request, out web app would know "minimum GTID" that it required to consistently access data.

Could we make a way to signal that minimum GTID to ProxySQL and ask it to route queries to any MySQL host that is >= that GTID?

One way would be to pass it in a magic comment as a part of query (/*+ proxysql_min_gtid=foo */ SELECT ...), but there might be better options.

This would allow to balance queries on all replicas that are caught up until a certain point.

Looking forward to hear your thoughts.

@renecannao
Copy link
Contributor

Hi @kirs ,
If I understand correctly your request, you would like to extend ProxySQL ability to perform Adaptive query routing based on GTID tracking : instead of proxysql tracking the last GTID by the client, the client has to submit the GTID.

@kirs
Copy link
Contributor Author

kirs commented Dec 13, 2019

That's correct!

Maybe this diagram would help to illustrate what I'm looking for (it assumes HA-based ProxySQL setup and lots of web app workers):

ProxySQL GTID_il

@kirs kirs changed the title Pass minimum required GTID Accept minimum required GTID Jan 1, 2020
@renecannao
Copy link
Contributor

The last step here is documenting this feature.
Assigning it to @Val214
Thanks

@renecannao
Copy link
Contributor

Closing this issue because of PR #2469 .
Thank you @kirs

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

No branches or pull requests

3 participants