Skip to content

Commit b3e2c15

Browse files
authored
RS: Add proxy policy use cases, advantages, and disadvantages (#503)
* Proxy policy table edits * DOC-3624 RS: Add proxy policy use cases, advantages, and disadvantages * DOC-3624 RS: Add UI & REST API methods to configure proxy policy & some copy edits
1 parent 6ee3a1d commit b3e2c15

File tree

1 file changed

+66
-69
lines changed

1 file changed

+66
-69
lines changed

content/operate/rs/databases/configure/proxy-policy.md

Lines changed: 66 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -9,77 +9,93 @@ description: null
99
linktitle: Proxy policy
1010
weight: 40
1111
---
12-
Redis Enterprise Software (RS) provides high-performance data access
12+
Redis Software provides high-performance data access
1313
through a proxy process that manages and optimizes access to shards
14-
within the RS cluster. Each node contains a single proxy process.
14+
within the Redis Software cluster. Each node contains a single proxy process.
1515
Each proxy can be active and take incoming traffic or it can be passive
1616
and wait for failovers.
1717

1818
## Proxy policies
1919

20-
A database can have one of these proxy policies:
20+
A database can have one of the following proxy policies:
2121

22-
| **Proxy policy** | **Description** |
23-
|------------|-----------------|
24-
| Single | There is only a single proxy that is bound to the database. This is the default database configuration and preferable in most use cases. |
25-
| All primary shards | There are multiple proxies that are bound to the database, one on each node that hosts a database primary shard. This mode fits most use cases that require multiple proxies. |
26-
| All nodes | There are multiple proxies that are bound to the database, one on each node in the cluster, regardless of whether or not there is a shard from this database on the node. This mode should be used only in special cases, such as [using a load balancer]({{< relref "/operate/rs/networking/cluster-lba-setup.md" >}}). |
22+
| Proxy policy | Description | Recommended use cases | Advantages | Disadvantages |
23+
|--------------|-------------|-----------------------|-----------|-----------------|
24+
| Single | Only a single proxy is bound to the database. This is the default database configuration. | Most use cases without high traffic or load | Lower resource usage, fewer application-to-cluster connections | Higher latency, more network hops |
25+
| All primary shards | Multiple proxies are bound to the database, one on each node that hosts a database primary shard. | Most use cases that require multiple endpoints, such as when using the [OSS Cluster API]({{<relref "/operate/rs/clusters/optimize/oss-cluster-api">}}) | Lower latency, fewer network hops, higher throughput | Higher resource usage, more application-to-proxy connections |
26+
| All nodes | Multiple proxies are bound to the database, one on each node in the cluster, regardless of whether or not there is a shard from this database on the node. | When using [load balancers]({{<relref "/operate/rs/networking/cluster-lba-setup">}}) for environments without DNS | Higher throughput | Highest resource usage |
2727

28-
{{< note >}}
29-
Manual intervention is also available via the rladmin bind add and
30-
remove commands.
31-
{{< /note >}}
32-
33-
## Database configuration
28+
## View proxy policy
3429

35-
A database can be configured with a proxy policy using rladmin bind.
30+
You can use the Cluster Manager UI, [`rladmin`]({{<relref "/operate/rs/references/cli-utilities/rladmin">}}), or the [REST API]({{<relref "/operate/rs/references/rest-api">}}) to view proxy configuration settings.
3631

37-
Warning: Any configuration update which causes existing proxies to be
38-
unbounded can cause existing client connections to get disconnected.
39-
40-
You can run rladmin to control and view the existing settings for proxy
41-
configuration.
42-
43-
The **info** command on cluster returns the existing proxy policy for
44-
sharded and non-sharded (single shard) databases.
32+
The [`rladmin info cluster`]({{<relref "/operate/rs/references/cli-utilities/rladmin/info#info-cluster">}}) command returns the current proxy policy for sharded and non-sharded (single shard) databases.
4533

4634
```sh
4735
$ rladmin info cluster
4836
cluster configuration:
49-
  repl_diskless: enabled
37+
  ...
5038
default_non_sharded_proxy_policy: single
5139
   default_sharded_proxy_policy: single
52-
   default_shards_placement: dense
53-
   default_shards_overbooking: disabled
54-
   default_fork_evict_ram: enabled
55-
   default_redis_version: 3.2
56-
   redis_migrate_node_threshold: 0KB (0 bytes)
57-
   redis_migrate_node_threshold_percent: 8 (%)
58-
   redis_provision_node_threshold: 0KB (0 bytes)
59-
   redis_provision_node_threshold_percent: 12 (%)
60-
   max_simultaneous_backups: 4
61-
   watchdog profile: local-network
40+
...
41+
```
42+
43+
## Configure database proxy policy
44+
45+
You can use the [Cluster Manager UI](#cluster-manager-ui-method), the [REST API](#rest-api-method), or [`rladmin`](#command-line-method) to configure a database's proxy policy.
46+
47+
{{<warning>}}
48+
Any configuration update that unbinds existing proxies can disconnect existing client connections.
49+
{{</warning>}}
50+
51+
### Cluster Manager UI method
52+
53+
You can change a database's proxy policy when you [create]({{<relref "/operate/rs/databases/create">}}) or [edit]({{<relref "/operate/rs/databases/configure#edit-database-settings">}}) a database using the Cluster Manager UI:
54+
55+
1. While in edit mode on the database's configuration screen, expand the **Clustering** section.
56+
57+
1. Select a policy from the **Database proxy** list.
58+
59+
1. Click **Create** or **Save**.
60+
61+
### REST API method
62+
63+
You can specify a proxy policy when you [create a database]({{<relref "/operate/rs/references/rest-api/requests/bdbs#post-bdbs-v1">}}) using the REST API:
64+
65+
```sh
66+
POST /v1/bdbs/<database-id>
67+
{
68+
"proxy_policy": "single | all-master-shards | all-nodes",
69+
// Other database configuration parameters
70+
}
6271
```
6372

64-
You can configure the proxy policy using the `bind` command in
65-
rladmin. The following command is an example that changes the bind
66-
policy for a database named "db1" with an endpoint id "1:1" to "All
67-
primary shards" proxy policy.
73+
To change an existing database's proxy policy, you can use an [update database configuration]({{<relref "/operate/rs/references/rest-api/requests/bdbs#put-bdbs">}}) REST API request:
74+
75+
```sh
76+
PUT /v1/bdbs/<database-id>
77+
{ "proxy_policy": "single | all-master-shards | all-nodes" }
78+
```
79+
80+
### Command-line method
81+
82+
You can configure a database's proxy policy using [`rladmin bind`]({{<relref "/operate/rs/references/cli-utilities/rladmin/bind">}}).
83+
84+
The following example changes the bind policy for a database named "db1" with an endpoint ID "1:1" to "All primary shards" proxy policy:
6885
6986
```sh
7087
rladmin bind db db1 endpoint 1:1 policy all-master-shards
7188
```
7289
73-
The next command performs the same task using the database id in place of the name. The id of this database is "1".
90+
The next command performs the same task using the database ID instead of the name. The ID of this database is "1".
7491
7592
```sh
7693
rladmin bind db db:1 endpoint 1:1 policy all-master-shards
7794
```
7895
7996
{{< note >}}
80-
You can find the endpoint id for the endpoint argument by running
81-
*status* command for rladmin. Look for the endpoint id information under
82-
the *ENDPOINT* section of the output.
97+
You can find the endpoint ID for the endpoint argument by running `rladmin status`. Look for the endpoint ID information under
98+
the `ENDPOINT` section of the output.
8399
{{< /note >}}
84100
85101
### Reapply policies after topology changes
@@ -105,44 +121,25 @@ disconnected, and hence might not entirely enforce the policies. In such
105121
cases, you can enforce the policy using the appropriate rladmin
106122
commands.
107123
108-
## About multiple active proxy support
124+
## Multiple active proxies
109125
110-
RS allows multiple databases to be created. Each database gets an
111-
endpoint (a unique URL and port on the FQDN). This endpoint receives all
112-
the traffic for all operations for that database. By default, RS binds
113-
this database endpoint to one of the proxies on a single node in the
114-
cluster. This proxy becomes an active proxy and receives all the
115-
operations for the given database. (note that if the node with the
116-
active proxy fails, a new proxy on another node takes over as part of
117-
the failover process automatically).
126+
Each database you create in a Redis Software cluster has an endpoint, which consists of a unique URL and port on the FQDN. This endpoint receives all the traffic for all operations for that database. By default, Redis Software binds this database endpoint to one of the proxies on a single node in the cluster. This proxy becomes an active proxy and receives all the operations for the given database. If the node with the active proxy fails, a new proxy on another node takes over as part of the failover process automatically.
118127
119128
In most cases, a single proxy can handle a large number of operations
120129
without consuming additional resources. However, under high load,
121-
network bandwidth or a high rate of packets per second (PPS) on the
130+
network bandwidth, or a high rate of packets per second (PPS) on the
122131
single active proxy can become a bottleneck to how fast database
123-
operation can be performed. In such cases, having multiple active
124-
proxies, across multiple nodes, mapped to the same external database
132+
operations can be performed. In such cases, having multiple active proxies across multiple nodes, mapped to the same external database
125133
endpoint, can significantly improve throughput.
126134
127-
With the multiple active proxies capability, RS enables you to configure
128-
a database to have multiple internal proxies in order to improve
129-
performance, in some cases. It is important to note that, even though
130-
multiple active proxies can help improve the throughput of database
135+
You can configure a database to have multiple internal proxies, which can improve performance in some cases.
136+
Even though multiple active proxies can help improve the throughput of database
131137
operations, configuring multiple active proxies may cause additional
132138
latency in operations as the shards and proxies are spread across
133139
multiple nodes in the cluster.
134140
135141
{{< note >}}
136-
When the network on a single active proxy becomes the bottleneck,
137-
you might also look into enabling the multiple NIC support in RS. With
138-
nodes that have multiple physical NICs (Network Interface Cards), you
139-
can configure RS to separate internal and external traffic onto
140-
independent physical NICs. For more details, refer to [Multi-IP &
141-
IPv6]({{< relref "/operate/rs/networking/multi-ip-ipv6.md" >}}).
142+
When the network on a single active proxy becomes the bottleneck, consider enabling multiple NIC support in Redis Software. With nodes that have multiple physical NICs (Network Interface Cards), you can configure Redis Software to separate internal and external traffic onto independent physical NICs. For more details, refer to [Multi-IP & IPv6]({{< relref "/operate/rs/networking/multi-ip-ipv6.md" >}}).
142143
{{< /note >}}
143144
144-
Having multiple proxies for a database can improve RS's ability for fast
145-
failover in case of proxy and/or node failure. With multiple proxies for
146-
a database, there is no need for a client to wait for the cluster
147-
to spin up another proxy and a DNS change in most cases, the client
148-
just uses the next IP in the list to connect to another proxy.
145+
Having multiple proxies for a database can improve Redis Software's ability for fast failover in case of proxy or node failure. With multiple proxies for a database, a client doesn't need to wait for the cluster to spin up another proxy and a DNS change in most cases. Instead, the client uses the next IP address in the list to connect to another proxy.

0 commit comments

Comments
 (0)