diff --git a/doc/adminguide/listenpaths.sgml b/doc/adminguide/listenpaths.sgml index 243a45b..d21a653 100644 --- a/doc/adminguide/listenpaths.sgml +++ b/doc/adminguide/listenpaths.sgml @@ -208,6 +208,61 @@ linkend="table.sl-path"> are modified, the listener paths. + + Connection Management + + &slony1; uses the listen paths to determine which database +connections to use to listen for events, which has the consequence +that the paths set up using indicate +which databases connections to open and monitor. That may seem +(particularly with the bit of recursion done in computing listen paths +in RebuildListenEntries()) rather +self-referential; things may be clarified by examining the +trade-offs. Consider that, effectively, all paths indicated +by will be used. + + + In a cluster with many nodes, that is fully, or +nearly fully, connected, each node tends to open (n-1) connections, +most of which are merely used to listen for events. + + If most nodes have one data provider, that means that (n-2) of +those connections are arguably spurious, as it +ought to be possible for such nodes to draw in +events via their data provider. + + Across a large, fully-connected cluster, this means that there +will be around (n-1)(n-1), or O(n*n) connections that are not actively +used. + + + On a cluster with 10 nodes, that's 81 connections that aren't +doing you much good, and it would be nice to get rid of those. + You could do so by eliminating +entries that connect subscriber nodes to most or all +nodes aside from the provider for that +node. + + + On a small cluster, these extra +connections aren't much of an issue. If there are only two nodes, +there are no unnecessary connections; for +replication to work, altogether, the cluster must be fully connected. +In a cluster with three nodes, there is likely only one arguably +unnecessary connection, and eliminating it is quite likely not worth +the effort and potential +complications. + + + If a cluster is not fully +connected, then, in case of , the +administrator is liable to need to preface failover efforts by adding +back additional requests to ensure the +new post-failover configuration of the replication network is suitably +connected. This complicates failover. + + +