Configuring Connection Manager v6.5.0

Configuring Connection Manager

Connection Manager takes its configuration from the PGD Group options for the group the node is a member of.

These can be configured using the pgd group set-option command or the bdr.alter_node_group_option SQL function.

The following options are available for configuring Connection Manager:

OptionDefaultDescription
read_write_portPostgres's port + 1000
(usually 6432)
which port to listen on for read-write connections
read_only_portread_write_port + 1
(usually 6433)
which port to listen on for read-only connections
http_portread_write_port + 2
(usually 6434)
which HTTP port to listen for REST API calls (for integration purposes)
use_httpsfalsewhether HTTP listener should use HTTPS, if enabled, the server certificate is used to TLS
server_pool_modenoneconnection pooling mode. Valid values are none (no pooling), session, and transaction. See Connection pooling.
server_pool_timeout10 secondshow long to wait for an available pooled server connection before giving up, when server_pool_mode is session or transaction
read_write_max_client_connectionsmax_connectionmaximum read-write client connections allowed, defaults to max_connections
read_write_max_server_connectionsmax_connectionsmaximum read-write connections that will be opened to server
read_only_max_client_connectionsmax_connectionsmaximum read-only client connections allowed
read_only_max_server_connectionsmax_connectionsmaximum read-only connections that will be opened to server
read_write_consensus_timeout0 (immediate action)how long to wait on loss of consensus before read-write connections are no longer accepted
read_only_consensus_timeout0 (immediate action)how long to wait on loss of consensus before read-only connections are no longer accepted.

When consensus is lost and the consensus timeout expires, Connection Manager disconnects all clients. Because both consensus timeout options default to 0, the disconnect is immediate unless you set a timeout. See Understanding write leader failover for how PGD selects a new write leader, and Understanding failure scenarios for how consensus loss relates to other failures.

Note

To enable HTTPS in Connection Manager, you must set use_https option to true and configure ssl_cert_file and ssl_key_file in postgresql.conf or via the command line. HTTPS can be active even if global server SSL (ssl = on) is disabled. If either certificate file is missing, Connection Manager defaults to plaintext HTTP regardless of the use_https setting.