MXS-2873: Document readwritesplit router diagnostics

The REST API output is now documented in the router documentation. The
same will be done for other routers as well.
This commit is contained in:
Markus Mäkelä 2020-02-18 09:23:13 +02:00
parent cb96725a51
commit 2bc2ab2196
No known key found for this signature in database
GPG Key ID: 5CE746D557ACC499

View File

@ -661,6 +661,28 @@ initial connection creation is skipped. If the client executes only read
queries, no connection to the master is made. If only write queries are made,
only the master connection is used.
## Router Diagnostics
The `router_diagnostics` field of the MaxCtrl `show service` and the service
REST API output for a readwritesplit service contains the following fields.
* `queries`: Number of queries executed through this service.
* `route_master`: Number of writes routed to master.
* `route_slave`: Number of reads routed to slaves.
* `route_all`: Number of session commands routed to all servers.
* `rw_transactions`: Number of explicit read-write transactions.
* `ro_transactions`: Number of explicit read-only transactions.
* `replayed_transactions`: Number of replayed transactions.
* `server_query_statistics`: Statistics for each configured and used server consisting of the following fields.
* `id`: Name of the server
* `total`: Total number of queries.
* `read`: Total number of reads.
* `write`: Total number of writes.
* `avg_sess_duration`: Average duration of a client session to this server.
* `avg_sess_active_pct`: Average percentage of time client sessions were active. 0% means connections were opened but never used.
* `avg_selects_per_session`: Average number of selects per session.
## Server Ranks
The general rule with server ranks is that primary servers will be used before