You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/operate/rs/databases/configure/proxy-policy.md
+66-69Lines changed: 66 additions & 69 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,77 +9,93 @@ description: null
9
9
linktitle: Proxy policy
10
10
weight: 40
11
11
---
12
-
Redis Enterprise Software (RS) provides high-performance data access
12
+
Redis Software provides high-performance data access
13
13
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.
15
15
Each proxy can be active and take incoming traffic or it can be passive
16
16
and wait for failovers.
17
17
18
18
## Proxy policies
19
19
20
-
A database can have one of these proxy policies:
20
+
A database can have one of the following proxy policies:
21
21
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" >}}).|
| 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|
27
27
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
34
29
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.
36
31
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.
45
33
46
34
```sh
47
35
$ rladmin info cluster
48
36
cluster configuration:
49
-
repl_diskless: enabled
37
+
...
50
38
default_non_sharded_proxy_policy: single
51
39
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:
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:
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:
68
85
69
86
```sh
70
87
rladmin bind db db1 endpoint 1:1 policy all-master-shards
71
88
```
72
89
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".
74
91
75
92
```sh
76
93
rladmin bind db db:1 endpoint 1:1 policy all-master-shards
77
94
```
78
95
79
96
{{< 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.
83
99
{{< /note >}}
84
100
85
101
### Reapply policies after topology changes
@@ -105,44 +121,25 @@ disconnected, and hence might not entirely enforce the policies. In such
105
121
cases, you can enforce the policy using the appropriate rladmin
106
122
commands.
107
123
108
-
## About multiple active proxy support
124
+
## Multiple active proxies
109
125
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.
118
127
119
128
In most cases, a single proxy can handle a large number of operations
120
129
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
122
131
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
125
133
endpoint, can significantly improve throughput.
126
134
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
131
137
operations, configuring multiple active proxies may cause additional
132
138
latency in operations as the shards and proxies are spread across
133
139
multiple nodes in the cluster.
134
140
135
141
{{< 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 &
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" >}}).
142
143
{{< /note >}}
143
144
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 forfast failoverincase of proxy or node failure. With multiple proxies fora database, a client doesn't need to wait for the cluster to spin up another proxy and a DNS changein most cases. Instead, the client uses the next IP address in the list to connect to another proxy.
0 commit comments