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
This will start a Proxy instance (ports 6379, 6380 and 6381 for proxying and 4000 for the REST API).
32
+
The proxy will simulate a cluster with 3 nodes running on ports 6379, 6479 and 6579 by intercepting the `cluster slots` command and returning a fake response.
33
+
34
+
## Step 2: Check if `cluster slots` reports correctly
35
+
36
+
Open a separate terminal
37
+
38
+
```bash
39
+
redis-cli cluster slots
40
+
```
41
+
42
+
Response should be similar to the following, where the ports are the proxy listen ports ( 6379, 6479 and 6579 ):
curl -X POST "http://localhost:4000/send-to-all-clients?encoding=base64" -d "PjMNCiQ3DQptZXNzYWdlDQokMw0KZm9vDQokNA0KZWVlZQ0K"
74
+
```
75
+
76
+
You should see the following message in the `redis-cli subscribe` terminal:
77
+
```
78
+
1) "message"
79
+
2) "foo"
80
+
3) "eeee"
81
+
```
82
+
83
+
### Step 4: Test topology change
84
+
85
+
Changing cluster topology is done by adding an interceptor that will catch the `cluster slots` command and return a different response. In this case we swapped the ports of node 2 and node 3.
0 commit comments