-
Notifications
You must be signed in to change notification settings - Fork 417
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
TONG RDS(国产信创) 哨兵有问题 #493
Comments
我没有你的环境,无法判断修改哪里有效。 后续建议用持续更新新功能的 FreeRedis,是全新重写的,支持更多功能。 |
FreeRedis 的报错是连接超时,你在哨兵执行一下命令:
看看返回什么,是不是可以连接的 IP,我猜返回的是内网IP,导致你的程序无法连接,连接超时。 csredis 的协议处理没有 FreeRedis 先进,对返回内容要求比较严格,我看你的截图返回的格式,应该是 TONG RDS 魔改过。 建议使用 FreeRedis |
已经用FreeRedis, 不过多线程get性能测试慢50%左右 |
把测试代码和测试过程发一下 |
就并行一直读指定数量键值。 using XCRMS.Xcrs.PCL.Core;
using Xunit.Abstractions;
namespace XCRMS.DAL.Test.Cache {
[TestCaseOrderer("XCRMS.DAL.Test.TestCaseOrderer", "XCRMS.DAL.Test")]
public class TestRedis: BaseTest {
public TestRedis(ITestOutputHelper output) : base(output) {
}
[Theory(DisplayName = "01.init")]
[InlineData("aaa","11111")]
public void Test0(string key,string v ) {
RedisUtil.Set(key, v,36000);
// var aa = RedisUtil.Get2(key);
// Assert.Equal(v, aa);
}
[Theory(DisplayName = "02_02.getPerformace")]
[InlineData("aaa", 100)]
public void Test1_1(string key, int count) {
RedisUtil.Get<string>(key);
Parallel.For(0, count, i => {
var aa = RedisUtil.Get<string>(key);
if (aa != "11111") {
Output.WriteLine(aa);
}
}
);
}
}
} RedisUtil 以前
} 用FreeRedis
之前也测试了,StackExchange.Redis |
请提供一个可以直接运行测试的 console app |
换freeRedis或StackExchange.Redis可以
csredis连redis哨兵也是没有问题,国产信创有没有办法
换框架改动比较大,项目已经上线。
The text was updated successfully, but these errors were encountered: