-
Notifications
You must be signed in to change notification settings - Fork 328
feat: use Redis read replicas #8405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
84 commits
Select commit
Hold shift + click to select a range
c0149df
feat(redis): use replica client if in cluster
aaronArinder 4d68cc4
fix(redis): replicas() for read commands
aaronArinder e005c17
squash me
aaronArinder eb4e1d8
Merge branch 'dev' into caroline/redis-replicas
carodewig c910212
fix: scheme should be checked regardless of url list length
carodewig c7e4c2e
chore: rely on fred's parsed config to tell if in clustered mode
carodewig 909c0c7
refactor: simplify client access
carodewig cd8e1fe
chore: must flushall for retriggering 'startup' container to work
carodewig 2ac4d7b
tmp: see if syncing cluster state manually improves performance
carodewig a2429ff
tmp: don't check mocks in release
carodewig 055ea1f
Revert "tmp: don't check mocks in release"
carodewig 9e02bd9
Revert "tmp: see if syncing cluster state manually improves performance"
carodewig 8db018c
tmp: disable lazy connections to see fi that fixes it
carodewig c950c43
Merge branch 'dev' into caroline/redis-replicas
carodewig 588b5af
refactor: fix lint
carodewig 3adff2c
config: make lazy_replica_connections configurable for testing
carodewig e2fa3b3
test: refactor for linting
carodewig 00fec67
refactor: misc test cleanup
carodewig 4b2dae0
Merge branch 'dev' into caroline/redis-replicas
carodewig 9bec14b
chore: mention sentinel
carodewig 775adca
wip: save in case of crash
carodewig 425f57c
wip
carodewig b304a6b
dedupe fns
carodewig e75380a
test: functional redis monitor
carodewig b5ec16f
test: fix several tests
carodewig 3e627f5
test: remove need to specify redis_urls
carodewig 7c660eb
test: remove duplicated test
carodewig 25dc0c2
get compilation working
carodewig 522fe7d
dedupe some of the repeated connection info
carodewig 0e4cd5a
test: simplify nested access
carodewig 2331316
test: use pointer for serde manipulation
carodewig 91e871b
test: simplify namespace wrangling
carodewig eed443a
test: dedupe scan
carodewig 112017e
test: combine modules
carodewig 814780e
lint: fix tests
carodewig 98382de
test: refactor and document
carodewig 97ecc6b
test: add redis-cli to mise
carodewig 408fbc9
refactor: use rstest for preprocess_urls tests
carodewig d606aba
test: only put redis-cli on the CI config
carodewig c2e6344
test: update config snap
carodewig 7a94d52
test: reduce number of clients
carodewig 26a11cb
test: sleep longer to improve test rerunnability
carodewig 925f68b
test: always set 'required_to_start' to improve test predictability
carodewig 0a50b2a
test: try using redis-cli 7 instead
carodewig 8cf2be0
test: use redis rather than redis-cli for pkg isntal
carodewig 1eba9d9
ci: remove --raw
carodewig 7e131df
test: space out queries so make sure there's time for them to hit the…
carodewig 0e50685
Revert "test: space out queries so make sure there's time for them to…
carodewig a9e72e8
test: in memory cache needs to be small
carodewig 13a6bfc
test: send more queries, add debugging info
carodewig ba754f1
lint fix
carodewig cf942b0
test: increase sleep time
carodewig ef0f664
test: increase ttl so we actually get a cache hit RIP
carodewig c48988b
Revert "test: increase sleep time"
carodewig 16f9699
Revert "lint fix"
carodewig af5b10e
Revert "test: send more queries, add debugging info"
carodewig 7142de0
test: limit redis concurrency
carodewig a05e5cc
Reapply "test: increase sleep time"
carodewig 66114eb
Reapply "test: send more queries, add debugging info"
carodewig 97f8782
test: remove unhelpful debug
carodewig 790a9c5
test: send queries sequentially
carodewig f0eb102
Merge branch 'dev' into caroline/redis-replicas
carodewig 2a415f8
fmt: fix format
carodewig f3e6646
test: debug these absurd tests
carodewig 96463c1
test: remove super inconsistent test
carodewig 6d3defb
fix: disable lazy connections
carodewig edbb1a8
feat: remove lazy connections config
carodewig dafbe85
test: remove lazy connections from test snap
carodewig b81fb29
chore: prevent local mise toml
carodewig 1b32b07
doc: better doc line for redis nextest override
carodewig fce3a9a
lint: misc cleanup
carodewig 535d05d
doc: improve comments
carodewig fbbbd87
test: increase channel size
carodewig c3fedc4
Revert "test: remove super inconsistent test"
carodewig 9fa81a1
improve comments
carodewig 54fbe20
test: use unbounded channel rather than v large
carodewig 79c1a0d
lint: fix fmt
carodewig 9547318
Merge branch 'dev' into caroline/redis-replicas
carodewig c3a3e1b
Create feat_caroline_redis_replicas.md
carodewig 88d81b5
test: use channel for initialization rather than sleep
carodewig 11b4f42
doc: update DEVELOPMENT with redis-cli info
carodewig dc07776
test: check function of cluster, wait for containers
carodewig 0c6d739
Merge branch 'dev' into caroline/redis-replicas
carodewig cb4f7c2
test: suppress mise 'keep alive' output
carodewig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,8 @@ | ||
| [test-groups] | ||
| redis = { max-threads = 6 } | ||
|
|
||
| [[profile.default.overrides]] | ||
| # number of tests running with 'redis' in the name should be up to 6 at any given time to prevent | ||
| # overloading the redis instances | ||
| test-group = "redis" | ||
| filter = "test(redis)" |
This file contains hidden or 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,8 @@ | ||
| ### Support Redis read replicas ([PR #8405](https://github.com/apollographql/router/pull/8405)) | ||
|
|
||
| Read-only queries will now be sent to replica nodes when using clustered Redis. Previously, all commands would be sent | ||
| to the master nodes. | ||
|
|
||
| This change applies to all Redis caches, including the query plan cache and the response cache. | ||
|
|
||
| By [@carodewig](https://github.com/carodewig) in https://github.com/apollographql/router/pull/8405 |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -17,3 +17,4 @@ helm = "3.19.2" | |
| helm-docs = "1.14.2" | ||
| yq = "4.48.2" | ||
| jq = "1.8.1" | ||
| redis = "7.4.7" | ||
This file contains hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.