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

Support for Cluster Mode? #90

Open
dkolas opened this issue Sep 13, 2023 · 4 comments
Open

Support for Cluster Mode? #90

dkolas opened this issue Sep 13, 2023 · 4 comments
Assignees

Comments

@dkolas
Copy link

dkolas commented Sep 13, 2023

Hi there,

When connected to our Redis Cluster, we're getting a lot of errors of the form:

MOVED 12858 <internal-ip>:6379

From looking at the post here: https://forums.swift.org/t/redistack-future-plans/65703
and the fact that there isn't a RedisClusterClient yet, my understanding is that this client doesn't yet support cluster mode, and my best option is to reduce it to a single shard/replica for now. Is that correct?

@fabianfett
Copy link
Member

Hi @dkolas,

thanks for bringing this up. I have a cluster implementation that I need to start to upstream.

my best option is to reduce it to a single shard/replica for now. Is that correct?

That is correct!

@fabianfett fabianfett self-assigned this Sep 14, 2023
@dkolas
Copy link
Author

dkolas commented Sep 14, 2023

@fabianfett Thanks for the quick response.

Everything appears to be working smoothly now with a non-clustered deployment. I'll keep an eye out for the changes!

@fabianfett
Copy link
Member

fabianfett commented Sep 18, 2023

You can track progress here:
Milestone: Redis Cluster support

@Jinxiansen
Copy link

Jinxiansen commented Feb 28, 2024

@fabianfett
Hi Fabian
Do we already support Cluster? I tried to get some Redis IP list through the internal URL, but got this error:

[ ERROR ] command failed [error: (Redis) CROSSSLOT Keys in request don't hash to the same slot, rdstk_conn_id: 85C7A6C1-EAB9-4E80-B845-BD34ECCF0486, rdstk_conpool_id: 284305BD-D3AC-4423-B13E-DB792CC9FA91]
[ ERROR ] Job run failed: RedisError(message: "(Redis) CROSSSLOT Keys in request don\'t hash to the same slot")

Used in Vapor:

let pool = RedisConfiguration.PoolOptions(maximumConnectionCount: .maximumActiveConnections(2),
                                                  minimumConnectionCount: 0,
                                                  connectionBackoffFactor: 2,
                                                  initialConnectionBackoffDelay: .milliseconds(100),
                                                  connectionRetryTimeout: config.redisConnectionTimeout)
let redisConfig = try RedisConfiguration(serverAddresses: redisAddresses,
                                                 password: config.redisPassword,
                                                 pool: pool)
        
app.queues.use(.redis(redisConfig))

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

No branches or pull requests

3 participants