Single redis DB for discourse#1431
Closed
yoav-steinberg wants to merge 14 commits intodiscourse:masterfrom
RedisLabs:master
Closed
Single redis DB for discourse#1431yoav-steinberg wants to merge 14 commits intodiscourse:masterfrom RedisLabs:master
yoav-steinberg wants to merge 14 commits intodiscourse:masterfrom
RedisLabs:master
Conversation
|
Thanks for contributing this pull request! Could you please sign our CLA so we can review it? http://www.discourse.org/cla |
Author
|
Signed. |
Member
|
@yoav-steinberg I am fine with this change but can you
|
Author
|
@SamSaffron regarding testing. Can you point me out to how to run the test suite and where I can define a new test? |
Member
|
@yoav-steinberg either |
Member
|
@yoav-steinberg this is a very high risk change, I definitely want to know you are able to run our test suite and contribute tests before pulling anything like this in. |
…obile or desktop view. Mobile device detection needs to be replaced with a better solution.
…ot lose your place
This reverts commit 7ec34b2.
Author
|
Created new pull request with relevant fixes (#1464). |
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
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.
The idea is to remove the use of multiple redis databases (db/cache_db) in discourse. It is generally considered bad design to use multiple redis databases. Instead the use of keyspace prefixes or separate redis instances is preferable.
Keyspace prefixes are good in case you want to be able to run the same app multiple times on the server. It seems like discourse does this to some extent but fails in other cases (such as no use of keyspaces for sidekiq).
Use of separate redise instances is ideal for it enables fine tuning of of data persistence, eviction policy, etc. based on the data requirements.
Ideally everything in discourse will be keyspace prefixed and you'll optionally you could use separate instances for each functionality (cache/job management/messaging/etc...).
With this patch I merely attempt to remove the requirement for multiple databases on the same instance, since it doesn't provide any added benefit (does it?) and therefore ads complexity (and yes, it makes it work with redis-cloud.com).
Let me know what you think.