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

Problem connecting with Redis Cluster #39

Closed
carlogilmar opened this issue Jan 30, 2023 · 8 comments
Closed

Problem connecting with Redis Cluster #39

carlogilmar opened this issue Jan 30, 2023 · 8 comments
Assignees
Labels

Comments

@carlogilmar
Copy link

Describe the bug

Recently we're trying to connect a redis cluster for use with Hammer, but we got an error that comes from Redix:

image

Following this: whatyouhide/redix#240, looks like this error comes from Redix that doesn't have support for the redis cluster moved errors.

Not sure what is the best way to handle this, I think we can handle the errors coming from Redix and create a new connection for the correct node and using redix we can send and get the data.

@epinault
Copy link
Contributor

oh interesting. I did not know also that was a thing .Thanks for linking the original issue. So what fixes it? I am unclear what moves does? seems that we would need to restart the pool to fix it?

@carlogilmar
Copy link
Author

I'm not sure how a redis cluster works, but looks like when you add a new record, it will stored in a certain connection, and if you need a record stored there, you need to execute the command in that particular connection:

image

But, nevermind, I'm still looking into this 👀

@carlogilmar
Copy link
Author

But if I added the records using the redis-cli, looks like you can add and get the data from any part of the cluster 🤔
image

@carlogilmar
Copy link
Author

Happy to help to add changes for this @epinault 😁

I added some changes here: #40

@epinault
Copy link
Contributor

epinault commented Feb 4, 2023

left some question in the MR. Happy to look at it more next week.

@sonic182
Copy link

@epinault I think it is easier if eredis_cluster can be used for redis_cluster case

and for normal redis, the eredis package

Basically, to change the Redix dependency to eredis + eredis_cluster in favor of more features

@epinault
Copy link
Contributor

epinault commented Dec 7, 2024

yea but that package is not getting a lot maintenance. I dont see any releases in 2 years but did notice a merge like 7 months ago. So I am worried about how maintained that library is. But we could create a configurable backend maybe so you can pick between the best of both world when needed? Redix, Eredis or Eredis cluster as possible backend? Though I am not sure how the eredis cluster works to be honest and would need to see how it fits . Otherwise we could create a special backend in a different package

@epinault
Copy link
Contributor

epinault commented Feb 6, 2025

i have release 7.x that has much better performances at this time compare to the old release.

@epinault epinault closed this as completed Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants