From be508fe5d924609fb57d36d5ae339c22c547e06c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 18 Feb 2020 09:45:02 +0200 Subject: [PATCH] MXS-2873: Document more router diagnostics Documented readconnroute and schemarouter router diagnostics. The duplicated fields that are already in the general service diagnostic output are not documented with the hopes that they can be eventually removed. --- Documentation/Routers/ReadConnRoute.md | 6 +++++ Documentation/Routers/ReadWriteSplit.md | 4 +-- Documentation/Routers/SchemaRouter.md | 35 +++++++++++-------------- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/Documentation/Routers/ReadConnRoute.md b/Documentation/Routers/ReadConnRoute.md index 50456e1c6..af3d8dfc9 100644 --- a/Documentation/Routers/ReadConnRoute.md +++ b/Documentation/Routers/ReadConnRoute.md @@ -72,6 +72,12 @@ slave servers. For more complex examples of the readconnroute router, take a look at the examples in the [Tutorials](../Tutorials) folder. +## Router Diagnostics + +The `router_diagnostics` output for readconnroute has the following fields. + +* `queries`: Number of queries executed through this service. + ## Limitations * Sending of binary data with `LOAD DATA LOCAL INFILE` is not supported. diff --git a/Documentation/Routers/ReadWriteSplit.md b/Documentation/Routers/ReadWriteSplit.md index 5300a6a46..d6440fd72 100644 --- a/Documentation/Routers/ReadWriteSplit.md +++ b/Documentation/Routers/ReadWriteSplit.md @@ -663,8 +663,8 @@ 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. +The `router_diagnostics` 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. diff --git a/Documentation/Routers/SchemaRouter.md b/Documentation/Routers/SchemaRouter.md index a3f459619..8a4c69938 100644 --- a/Documentation/Routers/SchemaRouter.md +++ b/Documentation/Routers/SchemaRouter.md @@ -15,25 +15,7 @@ See [Limitations](#limitations) for more information. From 2.3.0 onwards, SchemaRouter is capable of limited table family sharding. -Table of Contents -================= - -* [Routing Logic](#routing-logic) -* [Configuration](#configuration) -* [Router Parameters](#router-parameters) - * [ignore_tables](#ignore_tables) - * [ignore_tables_regex](#ignore_tables_regex) - * [preferred_server](#preferred_server) - * [ignore_databases](#ignore_databases) - * [ignore_databases_regex](#ignore_databases_regex) -* [Table Family Sharding](#table-family-sharding) -* [Router Options](#router-options) - * [max_sescmd_history](#max_sescmd_history) - * [disable_sescmd_history](#disable_sescmd_history) - * [refresh_databases](#refresh_databases) - * [refresh_interval](#refresh_interval) -* [Limitations](#limitations) -* [Examples](#examples) +[TOC] ## Routing Logic @@ -232,6 +214,21 @@ versions a value without a unit may be rejected. Note that since the granularity of the intervaltimeout is seconds, a timeout specified in milliseconds will be rejected, even if the duration is longer than a second. +## Router Diagnostics + +The `router_diagnostics` output for a schemarouter service contains the +following fields. + +* `queries`: Number of queries executed through this service. +* `sescmd_percentage`: The percentage of queries that were session commands. +* `longest_sescmd_chain`: The largest amount of session commands executed by one client session. +* `times_sescmd_limit_exceeded`: Number of times the session command history limit was exceeded. +* `longest_session`: The longest client session in seconds. +* `shortest_session`: The shortest client session in seconds. +* `average_session`: The average client session duration in seconds. +* `shard_map_hits`: Cache hits for the shard map cache. +* `shard_map_misses`: Cache misses for the shard map cache. + ## Limitations 1. Cross-database queries (e.g. `SELECT column FROM database1.table UNION select column