Hey,
I'm not on the ProxySQL team, but I may be able to help here.
The `mysql_servers` table is your 'staging' area, where you define and prepare the servers, set weights and connection limits, etc.
The `runtime_mysql_servers` table is the runtime environment showing the actual status of the servers.
You use `load mysql servers to runtime;` to upload your staging changes to the runtime environment and make them active.
You use `save mysql servers from runtime;` to download the runtime environment to your staging environment.
The `save mysql servers to disk;` will ONLY save the staging environment to disk, not the runtime environment (basically don't trust ChatGPT 😬 ).
When you stop the MySQL service on a host, ProxySQL identifies that as shown in your logs, and updates the `runtime_mysql_servers` table.
No new application connections would be sent to that host until it comes back `ONLINE`.
So yes, ignore the `mysql_servers` table when looking at the realtime state of the cluster, refer to the `runtime_mysql_servers` table instead.
Also, by stopping the `replica` as you described above does not test a `failover` event, but a `failure` event of that host.
To test a `failover`, you would need to stop the MySQL service on the primary DB host, and then alter the config on the replica to remove the read-only setting making it read-write.
ProxySQL would then detect this, and move the (old) replica into the `writer` hostgroup, and route your users with the `writer` hostgroup as a default to the new primary node.
Remember, if you do this, your old primary is essentially then a stale database, and would need to be recreated as a new replica to the new primary.
And of course, always test this using a database backend cluster that you don't mind recreating if it all goes wrong.
Regards,
Dave