Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Expand slave_selection_criteria documentation
Added a section about how `slave_selection_criteria` and
`max_slave_connections` affect each other.
  • Loading branch information
markus456 committed Mar 2, 2017
1 parent e286905 commit 075ca42
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Documentation/Routers/ReadWriteSplit.md
Expand Up @@ -81,6 +81,25 @@ The `LEAST_GLOBAL_CONNECTIONS` and `LEAST_ROUTER_CONNECTIONS` use the connection

`LEAST_BEHIND_MASTER` does not take server weights into account when choosing a server.

#### Interaction Between `slave_selection_criteria` and `max_slave_connections`

Depending on the value of `max_slave_connections`, the slave selection criteria
behave in different ways. Here are a few example cases of how the different
criteria work with different amounts of slave connections.

* With `slave_selection_criteria=LEAST_GLOBAL_CONNECTIONS` and `max_slave_connections=1`, each session picks
one slave and one master

* With `slave_selection_criteria=LEAST_CURRENT_OPERATIONS` and `max_slave_connections=100%`, each session
picks one master and as many slaves as possible

* With `slave_selection_criteria=LEAST_CURRENT_OPERATIONS` each read is load balanced based on how many
queries are active on a particular slave

* With `slave_selection_criteria=LEAST_GLOBAL_CONNECTIONS` each read is sent to the slave with the least
amount of connections


### `max_sescmd_history`

**`max_sescmd_history`** sets a limit on how many session commands each session can execute before the session command history is disabled. The default is an unlimited number of session commands.
Expand Down

0 comments on commit 075ca42

Please sign in to comment.