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

Add support for throttled updates to ProxySQL servers #22

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

proton-lisandro-pin
Copy link

The MySQL Binlog Reader currently pushes an update to every connected ProxySQL server every time it sees a GTID change; for complex database setups, this can have a significant impact in network usage.

This merge request implements a new option (-t) to batch and write updates every x milliseconds, instead of immediately after every GTID event.

A few new options will be introduced by the following commits.
If enabled, binlog reader will push updates to ProxySQL clients
ever X milliseconds, with all GTID events ocurring in that period.
When update message buffers are too big writes to ProxySQL
clients fail, as binlog reader tries to perform these in a
single write() call. This behavior is particularly noticeable
when -t is enabled, and causes ProxySQL to disconnect, and
immediately connect back.

This commit reworks writes to batch in chunks of a maximum
configurable size - currently 4kb.
23fb45d introduced a hard limit of max 2Kb write queues, which
can be (easly) hit with throttled updates. This commit fixes the
issue, and also reworks `Client_Data` memory management logic
to avoid fragementation.
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

Successfully merging this pull request may close these issues.

1 participant