Skip to content

Commit e213c65

Browse files
committed
Document how MaximumPoolSize works with multiple back ends.
Signed-off-by: Bradley Grainger <[email protected]>
1 parent 2b489e1 commit e213c65

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

docs/content/connection-options.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
lastmod: 2018-08-21
2+
lastmod: 2018-10-13
33
date: 2016-10-16
44
title: Connection Options
55
weight: 30
@@ -173,6 +173,20 @@ Connection pooling is enabled by default. These options are used to configure it
173173
</tr>
174174
</table>
175175

176+
### Connection Pooling with Multiple Servers
177+
178+
The `Server` option supports multiple comma-delimited host names. When this is used with connection
179+
pooling, the `LoadBalance` option controls how load is distributed across backend servers.
180+
181+
* `RoundRobin` (default), `Random`: A total of `MaximumPoolSize` connections will be opened, but they
182+
may be unevenly distributed across back ends.
183+
* `LeastConnections`: A total of `MaximumPoolSize` connections will be opened, and they will be evenly
184+
distributed across back ends. The active connections will be selected from the pool in least-recently-used
185+
order, which does not ensure even load across the back ends. You should set `MaximumPoolSize` to the
186+
number of servers multiplied by the desired maximum number of open connections per backend server.
187+
* `Failover`: All connections will initially be made to the first server in the list. You should set `MaximumPoolSize`
188+
to the maximum number of open connections you want per server.
189+
176190
Other Options
177191
-------------
178192

0 commit comments

Comments
 (0)