proxy create v5.6

Creates proxy in the EDB Postgres Distributed cluster

Synopsis

Creates proxy in the EDB Postgres Distributed cluster and attaches it to the given group. The proxy name must be unique across the cluster and match with the name given in the corresponding proxy config file.

Use the proxy mode to route connections to Write Leader (default), Read Nodes (read-only), or both (any). Proxy listens on listen_port for Write Leader connections while on read_listen_port for Read Nodes connections.

pgd proxy create [flags]

Options

FlagFlag, long          ValueDescription
-g--group-namegroupnamegroup name
--proxy-modedefault
|read-only
|any
proxy mode. The proxy will route connections to -
default - Write Leader
read-only - Read Nodes
any - both Write Leader and Read Nodes
(default default)
--proxy-nameproxynameproxy name

Examples

Attaching with default mode

Attaching a new proxy called proxy-a1 to group group_a, with default` mode.

$ pgd proxy create --proxy-name proxy-a1 --group-name group_a
Output
proxy created successfully

Attaching with any mode

Attaching a new proxy called proxy-b1 to group group_b, with any mode.

$ pgd proxy create --proxy-name proxy-b1 --group-name group_b --proxy-mode any
Output
proxy created successfully