Skip to content
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

Redis 4 1 3 #8204

Merged
merged 3 commits into from Oct 20, 2019
Merged

Redis 4 1 3 #8204

merged 3 commits into from Oct 20, 2019

Conversation

lis2
Copy link
Contributor

@lis2 lis2 commented Oct 17, 2019

Problem is that the original Redis gem is removing :connector option (https://github.com/redis/redis-rb/blob/master/lib/redis/client.rb#L95)
We are passing that options around between retries and removing that on our end.

I created a PR for MessageBus to fix that problem (https://github.com/SamSaffron/message_bus/pull/214/files) and for now we need freedom_patch

I checked on my local machine that with new freedom patch it is still working.
Testing steps.

  1. run 2 instances of Redis with different ports
  2. stopped first Redis server
  • ensured that the site is still working
  • ensured we got periodic checks DiscourseRedis::FallbackHandler: Checking connection to master server...
  1. Started server again
  • ensured we got DiscourseRedis::FallbackHandler: Master server is active, killing all connections to slave...

I run our benchmark on commit with hiredis and redis-4.1.3

Results:
type | hidredis | redis 4.1.3 | percent
--- | --- | --- | ---
Categories-50 | 49 | 50 | 102.04%
Categories-75 | 51 | 51 | 100.00%
Categories-90 | 63 | 64 | 101.59%
Categories-99 | 86 | 85 | 98.84%
Home-50 | 55 | 55 | 100.00%
Home-75 | 56 | 57 | 101.79%
Home-90 | 68 | 69 | 101.47%
Home-99 | 102 | 104 | 101.96%
Topic-50 | 36 | 37 | 102.78%
Topic-75 | 37 | 37 | 100.00%
Topic-90 | 47 | 48 | 102.13%
Topic-99 | 60 | 61 | 101.67%
Categories-admin-50 | 124 | 117 | 94.35%
Categories-admin-75 | 130 | 129 | 99.23%
Categories-admin-90 | 147 | 143 | 97.28%
Categories-admin-99 | 204 | 199 | 97.55%
Home-admin-50 | 146 | 148 | 101.37%
Home-admin-75 | 150 | 152 | 101.33%
Home-admin-90 | 169 | 168 | 99.41%
Home-admin-99 | 232 | 223 | 96.12%
Topic-admin-50 | 60 | 61 | 101.67%
Topic-admin-75 | 64 | 63 | 98.44%
Topic-admin-90 | 76 | 73 | 96.05%
Topic-admin-99 | 124 | 94 | 75.81%
Load rails | 2412 | 2360 | 97.84%
rss | 290204 | 295828 | 101.94%
pss | 277948 | 283624 | 102.04%
@discoursebot
Copy link

You've signed the CLA, lis2. Thank you! This pull request is ready for review.

@lis2 lis2 closed this Oct 17, 2019
@lis2 lis2 reopened this Oct 17, 2019
@discoursebot
Copy link

You've signed the CLA, lis2. Thank you! This pull request is ready for review.

@lis2 lis2 changed the title Redis 4 1 3 WIP: Redis 4 1 3 Oct 17, 2019
Redis gem is manipulating Redis config https://github.com/redis/redis-rb/blob/master/lib/redis/client.rb#L95
therefore we cannot pass the frozen config object.

Pass of the copy of the object is protecting original config
@lis2 lis2 changed the title WIP: Redis 4 1 3 Redis 4 1 3 Oct 20, 2019
@lis2 lis2 merged commit 858cf58 into discourse:master Oct 20, 2019
@lis2 lis2 deleted the redis-4-1-3 branch October 20, 2019 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants