Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于redis的单点故障问题 #43

Closed
ResolveWang opened this issue Sep 2, 2017 · 0 comments
Closed

关于redis的单点故障问题 #43

ResolveWang opened this issue Sep 2, 2017 · 0 comments

Comments

@ResolveWang
Copy link
Member

存储后端MySQL相对于消息队列redis更容易做容灾,而Redis是和Celery耦合在一起的,所以需要Celery官方支持的方案,才更容易也更稳定地解决broker的单点故障问题。

这里项目采用的方式是使用Redis Sentinel的方案,这种方案在Celery4.0以后就由官方支持了,所以如果有用户需要将本项目用于生产环境,可以做一下高可用。主要过程我已经写在了这篇文章中。

如果使用Redis Sentinel,那么配置文件中的 redis单机配置参数:redis->host和redis->port就可以直接不用修改,需要将redis->password修改成连接sentinel的password,把sentinel集群的参数写到 redis-sentinel这个域中。

如果用户不需要做高可用,那么直接在redis域设置sentinel: ''即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant