resolvewang
V2EX  ›  问与答

celery 如何预防 redis 出现单点故障

  •  
  •   resolvewang · May 26, 2017 · 4831 views
  •   You need to sign in to view this topic
    This topic created in 3457 days ago, the information mentioned may be changed or developed.

    我使用 redis 作为 celery 的 broker 和 backend,但是出现了这么一个问题,当 redis 挂掉之后,celery worker 节点就无法工作了,我在网上也查过 redis 的高可用方案,比如 redis sentinel,但是这种方式好像很难和 celery 结合起来。

    大家有不有啥比较好的方法,求告知

    5 replies  •  2017-06-01 22:30:13 +08:00
    bingxx
    bingxx
    May 27, 2017
    1
    不知道 celery 是否支持 redis cluster。支持的话,可靠性会高很多。
    julyclyde
    julyclyde
    May 27, 2017
    2
    别想太多
    根本犯不上
    resolvewang
    resolvewang
    OP
    May 30, 2017
    3
    @bingxx redis cluster 目前 celery 官方没有支持,ask 在 issue2852 说了( https://github.com/celery/celery/issues/2852)。所以比较困惑
    resolvewang
    resolvewang
    OP
    May 30, 2017
    4
    @julyclyde 此话怎讲啊?我前段时间运行一个 celery 写的分布式爬虫,结果我的 redis 服务器挂了,所有抓取节点就相当于挂掉了。请问有啥方法能提高它的可用性吗?
    julyclyde
    julyclyde
    Jun 1, 2017
    5
    @resolvewang redis 足够简单,以至于很难挂了
    redis cluster 很烂,近几年还是别费劲了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1169 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 17:49 · PVG 01:49 · LAX 09:49 · JFK 12:49
    ♥ Do have faith in what you're doing.