如何测试redis集群(how to test redis cluster)
我有一个Redis集群,有3个主人。 我对数据持久性不感兴趣,因为这是一个缓存解决方案。 我在Windows上运行v3.2。 当我手动停止其中一个服务器以查看我是否仍然可以访问数据库时,我得到'CLUSTERDOWN集群出现故障'。 即使这样做,我也必须连接到仍在工作的其中一个实例。 我不知道这是如何实现高可用性的解决方案。 我希望我错过了一些东西。 当其中一个节点关闭时我无法访问群集的任何想法? 谢谢。
群集创建命令:ruby.exe redis-trib.rb create 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002
I have a Redis cluster with 3 masters. I am not interested in data persistence since this is a caching solution. I am running v3.2 on Windows. When I stop one of the servers manually to see if I can still access the db, I get 'CLUSTERDOWN The cluster is down error'. And even to do that, I have to connect to one of the instances that is still working. I don't see how this is a solution for high availability. I hope that I am missing something. Any ideas why I can't access the cluster when one of the nodes is down? Thank you.
Cluster create command:ruby.exe redis-trib.rb create 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002
原文:https://stackoverflow.com/questions/45806296
最满意答案
相关问答
更多-
TCP/IP模型是一个________。[2023-05-19]
a -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
Backbone.js集合选项(Backbone.js collection options)[2023-01-02]
@ Paul的答案是好的,但也值得注意的是, url属性可以是一个函数。 在我看来(这只是意见,因为最终的结果是一样的),代码更清晰,如果更详细,如果你设置id在initialize和引用它在一个函数: var Messages = Backbone.Collection.extend({ initialize: function(models, options) { this.id = options.id; }, url: function() { return '/mess ... -
Backbone.js集合(Backbone.js Collection)[2022-01-28]
我能够找出问题,并决定在这里张贴,这样另一个人就不必像我一样继续抨击他们的头脑了。 在PostView视图类中,我必须在collection.fetch()中包装下划线.each我注意到模型是在集合回调属性中返回的。 所以我做的是添加以下内容; render:function () { this.$el.html(''); this.$el.append(this.template(this)); that = this; this.collection.fetch({s ... -
backbone.js:视图中的按钮,它影响集合中的不同模型(backbone.js: Button in view that affects a different model in collection)[2023-11-22]
var col = this.model.collection; var nextModel = col.at( col.indexOf(this.model) + 1) if(nextModel) nextModel.set({whatevar}); 您不需要跟踪父集合,骨干就是为您做的。 你应该检查你是否也在集合的末尾。 var col = this.model.collection; var nextModel = col.at( col.indexOf(this.model) + 1) if(ne ... -
这个问题没有真正正确的答案。 肯定有不止一种方法可以使它工作,这是关于Backbonejs的好东西之一:它非常灵活,并且不会对你施加太多的设计选择。 如果我要开始构建你所描述的内容,我肯定会: Question模型 Questions集 用于呈现单个问题的QuestionView 用于显示问题列表的QuestionsIndexView 在那之后,事情变得有点模糊,这取决于您对应用程序的要求。 如果您希望状态像传统网站一样存储,您可以使用路由器并执行类似下面的操作: ApplicationRouter = ...
-
Backbone.js集合url(Backbone.js collection url)[2021-11-02]
我将假设您并不是指路由器中的new AuthorList ,而是new AvailableBookList 。 您的收藏中有两个问题: 在您的网址定义中, this指的是window对象。 您在构造函数中传递的id参数未应用于您的集合实例。 它仅适用于视图(不适用于模型或集合)。 要解决第一个问题,您可以使用函数来定义集合URL,这将使您进入正确的范围: AvailableBookList = Backbone.Collection.extend({ model: AvailableBook, ur ... -
无法从模板中访问Backbone.js集合/模型(Cannot access Backbone.js collection / models from with in template)[2022-08-08]
如果你的代码真的如你的问题所示,问题是你在fetch返回之前呈现视图,这就是你的集合为空的原因。 fetch需要一些时间才能返回,但是你在调用fetch后立即调用render 。 在fetch函数的成功处理程序中调用render ,或将render绑定到集合的reset事件。 If your code is truly as shown in your question, the issue is that you are rendering the view before the fetch has re ... -
Backbone.js,underscore.js和jQuery(它们都是相互依赖的)是一个实用的抽象层和javascript工具集,允许您组织业务逻辑,模板和模型。 这样做的主要好处是代码可读性(适用于具有多个成员的长期项目/项目),围绕离散部件组织的一般良好实践(例如,保持HTML不受业务逻辑影响),提供时间来处理硬件/项目的有趣部分,而不是重新发明不同的浏览器兼容性问题,以及(在下划线的情况下)一个伟大的工具集,以帮助您管理javascript对象,数组,函数等安全和理智的编程。 基本上,如果您选择不 ...
-
是的,你可以简单地传递它: new view({model: m, collection: c}); 在视图中,你可以访问: this.model this.collection 例如, jsfiddle Yes, you can pass it in as simply as: new view({model: m, collection: c}); and inside the view you can access both with: this.model this.collection j ...