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

Maintain user mapping in Redis to speed up presence stats significantly #343

Merged
merged 9 commits into from
Jan 2, 2024

Conversation

FZambia
Copy link
Member

@FZambia FZambia commented Dec 28, 2023

Related centrifugal/centrifugo#750

For channel with 100k subscribers this changes the performance of presence stats from 15 ops/sec to 200000 ops/sec on my local machine.

Using a separate option here (EnableUserMapping in RedisPresenceManagerConfig) since storing user info in Redis means using additional structures => increases memory usage on Redis side.

Copy link

codecov bot commented Dec 28, 2023

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (e882051) 83.62% compared to head (b30755a) 83.66%.

Files Patch % Lines
presence_redis.go 81.70% 10 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #343      +/-   ##
==========================================
+ Coverage   83.62%   83.66%   +0.03%     
==========================================
  Files          38       38              
  Lines        7603     7669      +66     
==========================================
+ Hits         6358     6416      +58     
- Misses        923      927       +4     
- Partials      322      326       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@FZambia FZambia merged commit 01e8636 into master Jan 2, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant