GitHub的Redis和Resque失败行为? [英] GitHub's Redis and Resque failure behavior?

查看:122
本文介绍了GitHub的Redis和Resque失败行为?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都对GitHub在使用Resque时如何处理Redis服务器潜在故障或暂时不可用的情况有所了解?

还有其他一些似乎已经放在一起的其他人半复杂的解决方案作为使用zookeeper的redis集群保留(参见 https://github.com/ryanlecompte/redis_failover 恢复故障恢复的解决方案)。其他人似乎有'穷人故障转移',在没有redis客户端之间协调的情况下,首先看到连接问题,从而将从服务器切换到主服务器(但在临时不可用情况下,这似乎有问题)。

问题:Defunkt曾经讨论过GitHub如何处理Redis失败?是否有一个不涉及zookeeper的故障转移的最佳做法?



在resque上的原始帖子是选择Redis的理由之一,是主 - 从能力但是这篇文章并没有描述GitHub如何利用它,因为所有的工作人员都需要对Redis进行读写访问(参见 https://github.com/blog/542-introducing-resque )。

解决方案

基地Resque库不处理故障。如果一个盒子在弹出消息后立即死亡,则该消息将永远消失。你必须编写你自己的代码来处理失败,这是非常棘手的。

https://github.com/resque/resque/issues/93


Anyone have any insight into how GitHub deals with the potential failure or temporary unavailability of a Redis server when using Resque?

There are others that seem to have put together semi-complicated solutions as a holdover for redis-cluster using zookeeper (see https://github.com/ryanlecompte/redis_failover and Solutions for resque failover redis). Others seem to have 'poor mans failover' that switches the slave to the master on first sight of connectivity issues without coordination between redis clients (but this seems problematic in the temporary unavailability scenario).

The question: Has Defunkt ever talked about how GitHub handles Redis failure? Is there a best practice for failover that doesn't involve zookeeper?

The original post on resque states part of the rational for the selection of Redis was the master-slave capability of redis, but the post doesn't describe how GitHub leverages this since all workers need both read+write access to Redis (see https://github.com/blog/542-introducing-resque).

解决方案

The base Resque library does not handle failures. If a box dies immediately after poping off a message, the message is gone forever. You'll have to write your own code to handle failures, which is quite tricky.

https://github.com/resque/resque/issues/93

这篇关于GitHub的Redis和Resque失败行为?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆