set-proxy-options#
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_addresslisten_portmax_client_connmax_server_connserver_conn_keepaliveserver_conn_timeoutconsensus_grace_periodread_listen_addressread_listen_portread_max_client_connread_max_server_connread_server_conn_keepaliveread_server_conn_timeoutread_consensus_grace_period
After updating any of these options, restart 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 show-proxies -o json to view option values for each proxy.
pgd set-proxy-options [flags]
Options#
Flag |
Description |
|---|---|
--proxy-name |
proxy name |
--option |
option in name=value format |
See Global Options for global options.
Examples#
Setting proxy options with multiple options#
In this example, we use comma separated multiple options. Spaces are not allowed in the option values.
$ pgd set-proxy-options --proxy-name proxy-a1 --option listen_address=0.0.0.0,listen_port=6432
__OUTPUT__
proxy options updated successfully, please restart proxy service
Setting proxy options with multiple option flags#
In this example, we use multiple option flags. Spaces are not allowed in the option values.
$ pgd set-proxy-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
Setting proxy options with double quotes#
In this example, we use double quotes around options if the option value has spaces or special characters.
$ pgd set-proxy-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