-
Notifications
You must be signed in to change notification settings - Fork 979
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
Writer instance is registered as Reader hostgroup even if mysql_aws_aurora_hostgroups.writer_is_also_reader=0 #4595
Comments
And also wondering that there's any way to remove Writer instance from Reader hostgroup. |
@sunguck Have you checked this variable "aurora_max_lag_ms_only_read_from_replicas" ? |
Thanks @xykhappy . Are you suggesting that I can send all read traffic to read replicas using |
@sunguck That's not the case. Since you're already using the "mysql_aws_aurora_hostgroups", just try to tune "mysql-aurora_max_lag_ms_only_read_from_replicas" to a small value like 0.
I reviewed your settings once more and feel another possible reason is that you have added the writer specifically to hostgroup 1 in mysql_servers. From my experience, the aurora hostgroup is just responsible for auto discovering or replacing the backend servers, but not for removing redundant ones. Therefore, you should consider defining only hostgroup 0 in mysql_servers and let the ProxySQL do the discovery. |
Thanks @xykhappy
The issue has gone after defining server only hostgroup=0 in mysql_servers. One more thing is |
@sunguck It doesn't matter. The ProxySQL will detect the Aurora role changes and update the runtime_mysql_servers automatically. Anyway you can test this out on your local.
|
I have tested few cases as you suggested, and found no problems when I configure just single node in mysql_servers (CASE-1). CASE-1
CASE-2
CASE-3
|
Using Aurora MySQL + ProxySQL 2.6.3
Writer instance is registered as Reader hostgroup even if mysql_aws_aurora_hostgroups.writer_is_also_reader=FALSE.
I have also attached ProxySQL log file
Test procedure
1. Load mysql_hostgroup_attributes by SQL first.
2. Startup proxysql with following proxysql.cnf
Just after restart, looks autodiscovery of proxysql is working fine.
2. Run "LOAD MYSQL SERVERS TO RUNTIME" command again
But, after run "LOAD MYSQL SERVERS TO RUNTIME" command, aurora mysql writer instance is registered in reader hostgroup too.
Even if
writer_is_also_reader=FALSE
.Thank you!
The text was updated successfully, but these errors were encountered: