In case you are facing this issue while using Celery
with ElastiCache Redis
in Cluster mode
, then here maybe the answer you looking for:
So far, the Celery
doesn't support for ElastiCache Redis
in Cluster mode
, so either disable it or change to some other supported message broker such as RabbitMQ
or AWS SQS
.
And because in the production environment, Cluster mode
is highly recommended because it could keep the High Availability
for the site, so it better to not turn it off but switch to other message brokers.
I've tried to make it work by customizing Celery
worker based on this package, but not working:
https://github.com/hbasria/celery-redis-cluster-backend
Here's the repo that I've tried to apply the above package:
https://github.com/congson95dev/celery-tutorial/tree/celery-redis-cluster-mode
It end up with dead end with these errors:
ResponseError('CLUSTERDOWN The cluster is down')
or redis.exceptions.ResponseError: MOVED 192.168.80.7:6379
=> So to conclude, please change to some other supported message broker such as RabbitMQ
or AWS SQS
Here's the example of how to setup Celery
using AWS SQS
:
https://github.com/congson95dev/celery-tutorial/tree/celery-sqs