-
Notifications
You must be signed in to change notification settings - Fork 169
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
哨兵只能一直读写主 #80
Comments
var cli = new RedisClient(redisOption.Connection, redisOption.Sentinels, true); |
把连接串加上配置 idletimeout=20000 |
确定哨兵环境配置正确吗 |
是用jmeter直接跑业务,做压力测试,jmeter的线程组里的线程数是100,循环1次,用户文件里有100个用户,api请求有64条,共计就是6400并发数 |
是不是同一台服务器做的主从不行啊? |
测试了下StackExchange.Redis,可以主写分离,就是从的也有请求,说明哨兵模式没有问题 |
返回的所有信息发出来一下,其实可以根据源码分析: Sentome;Adapter.cs if (_rw_splitting)
{
foreach (var slave in sentinelcli.Salves(_connectionString.Host))
{
ConnectionStringBuilder slaveConnectionString = localTestHost($"{slave.ip}:{slave.port}", RoleType.Slave);
if (slaveConnectionString == null) continue;
}
} |
作者重现这个问题了没? 我配置了哨兵模式,但是和这位老兄一样,读写始终操作的是主。。。 |
看上一楼回复 |
@johnhorse @ming2882 v0.5.5 已修复 |
哨兵只能一直读写主,从的没有请求过,这是正常的吗?然后主就时不时的Unable to read data from the transport connection: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。.
The text was updated successfully, but these errors were encountered: