-
Notifications
You must be signed in to change notification settings - Fork 196
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
Add service discovery and connection caching to Sentinel, and make send/receive more deterministic #43
Merged
Conversation
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
…vided, and provide an option to refresh masters on a cooldown rather than on every request
…4 is still getting installation failures
…l available masters when trying to get a response. This is contingent on asgiref changes
…ar channels, but it ain't pretty
… actually try all index:channels pairs
… don't look bad in Github diff view
Looks like I need to make some changes to the tests that they work both in Travis and in Docker. |
…s the Redis hosts
…ed it does not try to make a channel layer
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
There are several large changes here. The primary purpose is to add some key capabilities to the Sentinel channel layer. In the process, I've made some improvements to the core Redis channel layer and added a Docker-based testing environment.
docker-compose
. Provides two Redis masters, two slaves, and one Sentinel server. The Redis servers are configured to not persist data to disk.receive()
no more than once for each connection. This makes the channel layer behavior more predictable without compromising performance, and makes it possible to test channel layers with multiple connections.sentinel_refresh_interval
. This will cause the channel layer to cache its master connections and only refresh them when a connection is requested and the refresh interval has passed since the last refresh.services
is empty. The channel layer calls out to its Sentinel hosts to get all service names tracked by Sentinel, and uses that information to build its service list.