Drone HA and AWS redis

Hi, I’m trying to set drone up with HA in a kubernetes cluster, i.e. running 2 pods with the config set to an AWS elasticache redis instance. However I can’t get it to work.

Pods can definitely connect to redis (confirmed via redis-cli from the drone pod) and there are no error messages in the logs (debug logs are turned on) but no data is being written to redis - though the AWS end is showing some connections.

I’ve tried setting DRONE_REDIS_CONNECTION and the alternative DRONE_REDIS_ADDR/DRONE_REDIS_PASSWORD/DRONE_REDIS_DB but neither seems to work.
The AWS redis version is 6.2.5, no password set, no encryption in transit (i.e. not using rediss)

Any help gratefully appreciated.

Drone only uses Redis to live stream logs for running pipelines. So if Redis is not working it would mean that live log streams in the user interface would not be working (meaning the log section would be empty for running pipeline steps). Have you attempted to execute a pipeline and is this the behavior you are experiencing?

Hi, thanks for the reply.

I thought that with 2 UI pods running drone would be using redis for storing session information. So I was expecting it not to require logging into if one of the pods was restarted, but maybe I’m not understanding how high availability is supposed to work?

I haven’t tried running a pipeline with this setup as I couldn’t get past my expectations of session persistence.

I thought that with 2 UI pods running drone would be using redis for storing session information

Sessions are signed using a key that is, by default, randomly generated by the server on startup. This is problematic when running multiple servers because they would each have separate sessions keys. This can be solved by generating a key and providing both instances of the server with the same key, using the following instructions:
https://docs.drone.io/server/cookie/

Ahh, thanks, completely missed that in the documentation - I’ll try that.

Many thanks!