Redis Cache Connector


#1

I took a look at the Redis cache connector at:

Has anyone used it before, in Lucee 5.x and can mention their experiences with it? Is there any reason for it not to be official? Thanks!


Google Cloud MemoryStore
#2

From the README

The redis driver is based on Jedis. While this is a very robust driver and Redis is amazing this project has to be considered in Beta stage. Feel free to fork it and provide your feedbacks.

As far as I’m aware it is an “official” ie. LAS supported extension, it’s just not considered well enough tested to be recommended for widespread production use.

Your best bet is to give it a whirl and see if it works for you! Let us know if you encounter any problems with your environment and we can look to prioritise a fix.


#3

We are testing it right now in our Google Container Engine (GKE) setup. We are planning to use it in production pretty soon (depending on the test results). I’m talking to @micstriit to get it added to http://stable.lucee.org/download/?type=extensions&beta=true so you can install it within the Lucee admin as well.


#4

Hi modius,

I installed the redis extension and it successfully connected to the external redis server. However, in Java code and the redis cli, we were not able to retrieve the session data which lucee reported in saved to redis.


#5

How do you know it connected successfully? After saving the settings the extension does not really check them. We use this extension to store data in it using the cachePut and cacheGet functions. We see it get stored in the namespace provided when configuring the extension in the Lucee Admin. From within redis commander and also the local redis-cli.

Maybe good to know is that yesterday Micha/Dom added the extension to the http://beta.lucee.org provider. So if you add this provider with the Lucee Admin, you can install the extension from there.

UPDATE: just checking, did you add the following to your Application.cfc:

    this.sessionStorage = "redisCache";
    this.sessionCluster = true;

#6

I used a test CachePut/Get test script, and the sessionCluster = true, etc; No errors.

We’re trying to exchange data with a Spring Java app; we tried memcached, but all the data, whether session or regular cached data are all serialized lucee implementation classes, not raw data. This is causing us real problems, since even adding lucee.jar to the classpath is not completely working.

Lucee-Lucee data sharing is perfect, but lucee-other language app seems to be more difficult. Anyone accomplish this yet using session sharing?


#7

The extension that was added to the beta provider is not the same one from the OP, so I’m having trouble finding documentation for it. In the Lucee admin it asks for a Sentinel connection (port 26379), and I’m just starting out learning Redis through AWS Elasticache so I’m pretty sure the info I’m feeding it is wrong.

Is this Sentinel driver going to be the official one going forward, and is there documentation? Apologies if I’m referring to some things incorrectly, I just started learning Redis yesterday


#8

I’ve tested it using a Redis Sentinel instance, but I’ve read it should work with only a Redis master. Does AWS Elasticache provide a Redis Sentinal option? Redis Sentinel is used for high availability so when one master goes down, it can switch to another.

The Redis extension found on Lucee’s github is the same as the one in the beta channel in the Lucee admin (http://stable.lucee.org/download/?type=extensions&beta=true). The versioning of the GitHub one works differently because it’s based on every run of ant.

As to your question about documentation, we are working on it. Once you have a Redis up-and-running, there are only a few things to configure within Lucee. Maybe this (old) tutorial can help you out:

http://www.dskraus.com/2015/02/11/railo-sessions-redis/

It’s written for Railo, but the steps are almost identical.


#9

AWS Elasticache does not implement Sentinel. Their version of HA/failover is not ideal, considering Sentinel exists, but they’re popular so it might be worth supporting. See the official documentation and this stackoverflow answer for a good description of their setup

I had thought that the beta extension was different because the one on github, and the instructions you linked to for Railo, refer to connecting to a single node at port 6379. The instructions for both ask only for a server, but the beta extension asks for a master name and sentinels, so they don’t appear to be interchangeable. I tried anyway with the beta extension, just putting in a single node address at port 6379 and it failed silently when I used cachePut().


#10

Extension that works without sentinel:

An extension that works without sentinel:

Used in production with ElastiCache.