Skip to content

Update connection option documentation #573

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

Merged
merged 2 commits into from
Nov 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions docs/content/connection-options.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
lastmod: 2018-08-21
lastmod: 2018-10-13
date: 2016-10-16
title: Connection Options
weight: 30
Expand All @@ -10,7 +10,7 @@ menu:
Connection Options
==================

MySqlConnector supports a subset of Oracle's [Connector/NET connection options](https://dev.mysql.com/doc/connector-net/en/connector-net-connection-options.html).
MySqlConnector supports a subset of Oracles [Connector/NET connection options](https://dev.mysql.com/doc/connector-net/en/connector-net-8-0-connection-options.html).

Base Options
------------
Expand Down Expand Up @@ -173,6 +173,20 @@ Connection pooling is enabled by default. These options are used to configure it
</tr>
</table>

### Connection Pooling with Multiple Servers

The `Server` option supports multiple comma-delimited host names. When this is used with connection
pooling, the `LoadBalance` option controls how load is distributed across backend servers.

* `RoundRobin` (default), `Random`: A total of `MaximumPoolSize` connections will be opened, but they
may be unevenly distributed across back ends.
* `LeastConnections`: A total of `MaximumPoolSize` connections will be opened, and they will be evenly
distributed across back ends. The active connections will be selected from the pool in least-recently-used
order, which does not ensure even load across the back ends. You should set `MaximumPoolSize` to the
number of servers multiplied by the desired maximum number of open connections per backend server.
* `Failover`: All connections will initially be made to the first server in the list. You should set `MaximumPoolSize`
to the maximum number of open connections you want per server.

Other Options
-------------

Expand Down