Skip to content

Add Redis Cluster Support #9

@andrew-dixon

Description

@andrew-dixon

We have set up and configured a Redis cluster that is working, however, the Lucee Redis extension does not appear to support the "MOVED" response and is instead returning null. As a simple example, using the redis-cli:

[root]# redis-cli -h localhost -p 6379 -c set foo bar
OK
[root]# redis-cli -h localhost -p 6379 get foo
"bar"
[root]# redis-cli -h localhost -p 6382 get foo
(error) MOVED 12182 localhost:6379

If we then add the -c option (cluster mode) we get:

[root]# redis-cli -h localhost -p 6382 -c get foo
"bar"

As expected as the -c option Enable cluster mode (follow -ASK and -MOVED redirections)., however, with Lucee, if I configure two Redis caches, using the above host and ports and do:

<cfscript>
        cacheput('foo', 'bar', createTimespan(0,0,0,30), createTimespan(0,0,0,30), 'test-redis');
        dump(cacheget('foo', false, 'test-redis'));
        dump(cacheget('foo', false, 'test-redis-2'));
</cfscript>

The response I get is:

string	bar
Empty:null

So, clearly, the Lucee Redis extension is not following the "MOVED" response from the cluster and retrieving the key value from the location given.

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