proxy set options v5.6
Sets proxy options such as listen_address
, listen_port
, and max_client_conn
Synopsis
You can set the following proxy options with this command:
listen_address
listen_port
max_client_conn
max_server_conn
server_conn_keepalive
server_conn_timeout
consensus_grace_period
read_listen_address
read_listen_port
read_max_client_conn
read_max_server_conn
read_server_conn_keepalive
read_server_conn_timeout
read_consensus_grace_period
After updating any of these options, restart the proxy.
Set listen_port
to non-zero value to route traffic to the Write Leader and
set read_listen_port
to non-zero value to route traffic to Read nodes.
Setting it to zero will disable the respective routing.
Use 'pgd proxy list -o json' to view option values for each proxy.
pgd proxy set options [flags]
Options
Flag | Flag, long | Value | Description |
---|---|---|---|
--proxy-name | proxyname | proxy name | |
--option | option | option in name=value format |
Examples
Comma-separated options
When setting options with comma separated multiple options, spaces in keys and values aren't allowed.
$ pgd proxy set options --proxy-name proxy-a1 --option listen_address=0.0.0.0,listen_port=6432
Output
proxy options updated successfully, please restart proxy service
Multiple --option flags
You can use multiple --option flags to set multiple options.
$ pgd proxy set options --proxy-name proxy-a1 --option listen_address=0.0.0.0 --option listen_port=0
Output
proxy options updated successfully, please restart proxy service
Quoting option values
You should use double quote if an option value has spaces or special characters.
$ pgd proxy set options --proxy-name proxy-a1 --option "listen_address = 0.0.0.0" --option "consensus_grace_period=1h 30m 5s"
Output
proxy options updated successfully, please restart proxy service