-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(router): enable using redis clusters for rate limiting and apq (#…
- Loading branch information
Showing
18 changed files
with
533 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,6 +156,16 @@ jobs: | |
with: | ||
cache-dependency-path: | | ||
router-tests/go.sum | ||
- name: Setup Redis Cluster (for Cluster tests) | ||
uses: vishnudxb/[email protected] | ||
with: | ||
master1-port: 7000 | ||
master2-port: 7001 | ||
master3-port: 7002 | ||
slave1-port: 7003 | ||
slave2-port: 7004 | ||
slave3-port: 7005 | ||
sleep-duration: 5 | ||
- uses: nick-fields/retry@v3 | ||
with: | ||
timeout_minutes: 30 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# wait for the docker-compose depends_on to spin up the redis nodes usually takes this long | ||
sleep 10 | ||
|
||
node_0_ip=$(getent hosts redis-cluster-node-0 | awk '{ print $1 }') | ||
node_1_ip=$(getent hosts redis-cluster-node-1 | awk '{ print $1 }') | ||
node_2_ip=$(getent hosts redis-cluster-node-2 | awk '{ print $1 }') | ||
|
||
|
||
redis-cli --cluster create \ | ||
$node_0_ip:6379 \ | ||
$node_1_ip:6379 \ | ||
$node_2_ip:6379 \ | ||
--cluster-replicas 0 --cluster-yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
cluster-enabled yes | ||
cluster-config-file nodes.conf | ||
cluster-node-timeout 5000 | ||
bind 0.0.0.0 | ||
protected-mode no | ||
maxmemory 100mb | ||
maxmemory-policy noeviction | ||
save 60 1 | ||
appendonly no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.