Skip to content

Connecting to Azure Redis Cluster #1074

Closed
@hsadoyan

Description

@hsadoyan

Hey folks,

We have a rails app we're trying to connect to azure redis. I have a test cluster provisioned, and can connect as a single instance, but trying to connect in clustered mode gives an error: Redis Client could not connect to any cluster nodes

Here's a minimal config:

host = 'hostname'
key = 'password'
port = 6380
database = 0

connection_url = "rediss://:#{CGI.escape(key)}@#{host}:#{port}/#{database}"

client = Redis.new(cluster: [connection_url])

The documentation stated that I can pass in one instance like this and it'll discover the rest of the nodes through the CLUSTER NODES command.

If I switch from cluster to url I can connect to a redis node, but of course half the writes fail with a MOVED message.

I was able to find one SO post of somebody having a similar issue in 2019 that was never resolved, but otherwise no documentation that's redis-rb and Azure Redis specific

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions