Skip to content

Added support for Redis Cluster and Redis Sentinel #2961

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 23 commits into from
Sep 14, 2020

Conversation

dmitsh
Copy link
Contributor

@dmitsh dmitsh commented Jul 30, 2020

Signed-off-by: Dmitry Shmulevich dmitry.shmulevich@sysdig.com

What this PR does:
Added support for Redis Cluster and Redis Sentinel

Which issue(s) this PR fixes:
Fixes #2959

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
Copy link
Contributor

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I don't have any Redis knowledge, but the code mostly makes sense to me. I've left few minor comments, if you could please take a look.

@dmitsh dmitsh changed the title Added support for Redis Cluster and Redis Sentinel (#2959) Jul 31, 2020
@dmitsh dmitsh requested a review from pstibrany July 31, 2020 16:36
@dmitsh dmitsh requested a review from pracucci August 6, 2020 02:29
Copy link
Contributor

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work on this PR! I left some small comments about our flag names consistency, but otherwise looks good to me.

Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid work! 👏 I left few comments / questions, but overall looks good. I would appreciate if you could take a look at the comments and address them (unless you have any objection) so that we can move forward merging this. Thanks! 🚀

@dmitsh dmitsh requested a review from pracucci August 13, 2020 00:34
Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dmitsh for addressing my feedback! Much appreciated! Changes LGTM (I left a couple of last minor comments), but I'm still concerned by opening a new TCP connection for every single cache operation when using sentinel. I can understand that the "protocol" requires you to get the master from sentinel each time, but we should probably keep the master clients in a reuseable pool, so that we just reuse an existing client (if any).

@dmitsh
Copy link
Contributor Author

dmitsh commented Aug 28, 2020

@pracucci @pstibrany , I've pushed another update. Please take a look.

Copy link
Contributor

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, and apologies it took so long to review. Updating code to use "Universal Client" makes it so much simpler.

@dmitsh dmitsh requested a review from pstibrany September 7, 2020 15:11
Copy link
Contributor

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for all your work on this PR! I've left one additional comment to fix (and I apologize for missing it before), but other than that I think this is good to go.

@dmitsh dmitsh requested a review from pstibrany September 7, 2020 17:47
Dmitry Shmulevich added 4 commits September 14, 2020 15:16
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Dmitry Shmulevich added 18 commits September 14, 2020 15:16
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@pracucci pracucci merged commit cea6d0f into cortexproject:master Sep 14, 2020
@dmitsh dmitsh deleted the ds-redis-plus branch September 14, 2020 16:08
@kamijin-fanta kamijin-fanta mentioned this pull request Apr 7, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants