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

check_type by backend server #2186

Closed
markuman opened this issue Aug 9, 2019 · 2 comments
Closed

check_type by backend server #2186

markuman opened this issue Aug 9, 2019 · 2 comments

Comments

@markuman
Copy link

markuman commented Aug 9, 2019

I reference to this comment:

I would like to avoid the path of making too many assumptions, because it is possible to have servers without InnoDB (so innodb_read_only won't exist), like ProxySQL admin interface itself or servers that only have TokuDB or only MyRocks.
In the past I have been asked to check super_read_only instead of read_only , so I think it is reasonable to make the check configurable by the end user.

#1195 (comment)

When aurora does a failover, all nodes are rebooting. When it is planed, the downtime takes just a few seconds. But when it is unplaned, we see here two times downtime from 2-3 minutes.

So what we did, we add a simple RDS MySQL as a read-replica of the Aurora Cluster. Our reader hostgroup id 1 now has both

  • Aurora readers (check type innodb_read_only)
  • default MySQL readers (check type read_only).

This reduces our reader downtime to near zero.

When we set mysql_replication_hostgroups to check type innodb_read_only, than the RDS replica will be detected as a writer node.
And when we set the check type to read_only, the aurora readers are detected as writers.

It would be nice if you could set the mysql_replication_hostgroups check type by backend server id. If it is not provided, all backend server of the hostgroup are taken.
Alternativley - a check type which test/covers all types of read only variants.

What do you think?
Or am I on my own and must work with the scheduler?

@srikiraju
Copy link

This kind of feature is super useful for us as well.

Sometimes, we want to force the database to go into read_only. We can modify parameter groups in Aurora to force it into read_only. This sets the read_only var to true, but the innodb_read_only var is still False. This means proxysql can detect only one or the other case, but not both.

If we can convert the check into an OR, which puts the host into the reader replication group if either of the variables are set, this is super useful. It should also be simple to implement. @renecannao Any chance we can get this prioritized?

renecannao added a commit that referenced this issue Sep 28, 2019
Added support for:
- read_only|innodb_read_only
- read_only&innodb_read_only
renecannao added a commit that referenced this issue Oct 19, 2019
More mysql_replication_hostgroups.check_type #2186
@markuman markuman closed this as completed Nov 5, 2019
@asifjoyia
Copy link

We are facing the same issue on the 2.0.8-1 Version. any solution. Urgently required.

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