Redis集群就绪客户端(Redis cluster ready client)
最近我开始学习Redis,并且能够从32位Windows的学习方面做所有事情。 我是一名.net开发人员,并使用Redis在Web API设置中使用ServiceStack客户端进行缓存。 我已经能够成功运行一个由4个主服务器和4个从服务器组成的Redis集群,并且想知道如何与ServiceStack客户端一起完成这项工作。
我主要担心的是,如果我连接我的客户端的主设备发生故障,那么客户端如何自动连接到接管的其他可用从设备,因为该从设备的端口将会不同。 因此,故障转移正在Redis级别,但客户端如何处理它?
我使用Redis命令行界面重新创建了上面提到的场景,但是当我关闭主机时,界面刚刚停止响应,因为一切都只是在黑洞中。 因此,根据我的经验,cli不会自动处理作为客户端的故障转移。
我已经开始研究StackExchange的客户端到 Redis,但仍然有同样的问题。
我正在使用微软提供的Redis发行版,用于Github提供的学习目的(对不起,我不能提供链接,因为我是新来的,没有足够的声誉点)。
Recently I started learning Redis and have been able to do everything from learning aspect in 32 bit Windows. I am a .net developer and made caching available using Redis using ServiceStack client in a Web API setup. I have been able to successfully run a Redis cluster of 4 masters and 4 slaves, and was wondering how can I make that work in conjunction with the ServiceStack client.
My main concern is that if the master that I connect my client to, goes down, then how can the client automatically connect to some other available slave that takes over, as the port of that slave is going to be different. So failover is working at Redis level, but how the client handles it?
I recreated the mentioned scenario, using Redis Command Line Interface, but when I took the master down, the interface just stopped responding, as in everything was just going in a blackhole. So, per my experience, the cli does not automatically handles failover as a client.
I have started studying StackExchange's client to Redis, but still have the same question.
I am using Redis distribution given by Microsoft for learning purposes available at Github (Sorry, cannot provide link as I am new here and do not have sufficient reputation points).
原文:https://stackoverflow.com/questions/35126196