惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
Security Archives - TechRepublic
Security Archives - TechRepublic
V
Vulnerabilities – Threatpost
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Proofpoint News Feed
G
GRAHAM CLULEY
P
Privacy International News Feed
The Hacker News
The Hacker News
Forbes - Security
Forbes - Security
U
Unit 42
N
News and Events Feed by Topic
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cyber Attacks, Cyber Crime and Cyber Security
C
Cisco Blogs
A
About on SuperTechFans
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
D
Docker
I
Intezer
Spread Privacy
Spread Privacy
The Last Watchdog
The Last Watchdog
V2EX - 技术
V2EX - 技术
S
Security @ Cisco Blogs
F
Full Disclosure
S
Secure Thoughts
M
MIT News - Artificial intelligence
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
W
WeLiveSecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Project Zero
Project Zero
Recorded Future
Recorded Future
Cyberwarzone
Cyberwarzone
S
Security Affairs
AWS News Blog
AWS News Blog
H
Help Net Security
The GitHub Blog
The GitHub Blog
Hacker News: Ask HN
Hacker News: Ask HN
Vercel News
Vercel News
P
Proofpoint News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The Register - Security
The Register - Security
S
Schneier on Security
F
Fortinet All Blogs
C
CERT Recently Published Vulnerability Notes
L
LINUX DO - 最新话题
T
Tor Project blog
T
The Exploit Database - CXSecurity.com
MongoDB | Blog
MongoDB | Blog
Webroot Blog
Webroot Blog

Redis

发现一个支持云同步的 Redis GUI 工具: RedisViewer 阿里云 Redis 命中率计算与监控的问题 - V2EX Redis 运行一段时间后报错导致挂掉,有什么办法解决呢? - V2EX Redis Stream 实现 MQ 的可行性 - V2EX Redis 缓存数据 - V2EX 支持 WinXP/2003 的 Redis 服务端 - V2EX 怎么才能学好 redis,有什么好的教程或者 blog 推荐吗? - V2EX 线上服务 redis 查询超时排查求教 - V2EX 有木有安卓 app 的 client 端呀? - V2EX 除了 Tiny RDM 之外还有什么比较好用的 Redis GUI 工具么? - V2EX Redis 支持 Hash 字段单独设置过期时间 - V2EX Redis 加上密码后,整体性能下降 20%? - V2EX 新学 redis 集群的疑惑 - V2EX Garnet 真比 Redis 快吗? - V2EX 问一下大家 redis 的配置 - V2EX Redis 怎样将字节串传递给 lua 脚本? - V2EX 微软 Garnet 的发展前景如何,有没有可能替代 Redis? - V2EX 业内有没有把 redis 开启 aof=always 当做数据库使用的? - V2EX 有谁试过 redis 的 string 自增性能吗, 我这怎么是个位数? - V2EX 突然想起一个问题,你们用的 redis 有崩过吗?是什么原因崩的? - V2EX 关联表查询结果的 Redis 缓存如何设计 API 请求如何方便的做并发测试? - V2EX 请教兄弟们一个问题, datagrip 连接 redis 如何显示 redis 键的 过期时间呢? 关于 Redis RESP3 的想法 - V2EX 轻便式 Redis Monitor 面向研发人员图形可视化监控平台 Redis 中使用 pipeline 执行命令时,有单次执行数量的限制吗? - V2EX [故障模拟]redis cluster 3 机 3 主 6 从,主节点都转移到了其中一台机器上,然后这台机器宕机 你们现在连接 redis 集群是用的什么工具,可以分享一下下载链接吗? - V2EX 求教一下 Redis 哨兵模式下,主从延迟问题 - V2EX 想问下大佬 40M 的字符串适合放到 redis 缓存吗? - V2EX redis 有时取不到值 - V2EX redis 集群中 执行事务 或者 lua 脚本 涉及到多个 key 时,这些 key 要求在同一个节点还是同一个 slot? - V2EX redis 7 所有命令都是原子的吗? - V2EX Redis 是鸡肋吗? - V2EX Redis 服务挂了,一段时间后又恢复,不会造成缓存与数据库不一致吗? - V2EX 为什么 MySQL 有缓存,还要使用 Redis? - V2EX 关于缓存一致性问题,不知道我这个方案是否可行 - V2EX redis 集群获取不到连接 - V2EX 用 redis 直接替换 app/物联网的 mq 服务器的可行性大吗?怎么对客户端进行限制 - V2EX redis 怎么裁剪 zset 只保留排名前 100 的数据 - V2EX 缓存失效后先返回再触发更新的场景要怎么处理? - V2EX 关于 redis 一个小问题(随机性) - V2EX 求教大佬,线上 redis cluster 中适合使用 redis lua script 吗?以及使用时有什么注意事项? - V2EX 怎么使用命令批量删除匹配的 key 值? - V2EX 对 redis 的 zset 做分片的时候怎么选择分片个数 - V2EX 关于消息推送方案的讨论 - V2EX Redis 的 zset 按 score 排序做分页的时候怎么保证数据不丢失? - V2EX redis 的 zset 如果打散成多个 zset 的话,如果要分页查询怎么处理呢? - V2EX 关于社区场景下,用户已读文章不再推荐这种需求实现方案的探讨 - V2EX 一个 abtest 实验中 redis 设计的思考
Redis 几乎每小时都出现大量超时,求助 - V2EX
drymonfidelia · 2024-04-22 · via Redis

报错信息是 Timeout awaiting response (outbound=1KiB, inbound=0KiB, 5728ms elapsed, timeout is 5000ms), command=SET, next: EVAL, inst: 0, qu: 0, qs: 15, aw: False, bw: SpinningDown, rs: ReadAsync, ws: Idle, in: 76, in-pipe: 0, out-pipe: 0, serverEndpoint: 127.0.0.1:6379, mc: 1/1/0, mgr: 10 of 10 available, clientName: AppProductionEnvServer1(SE.Redis- v2.5.43.42402), IOCP: (Busy=0,Free=10000,Min=9000,Max=10000), WORKER: (Busy=236,Free=32531,Min=10000,Max=32767), POOL: (Threads=236,Queueditems=50,Completeditems=8751117254), v: 2.5.43.42402 (Please take a look at this article for some common client-side issues that can cause timeouts: https://stackexchange.github.io/StackExchange.Redis/Timeouts)

出错的时候看了下也就三百多并发,比较怀疑是下面这段代码引起的:

   while (!await redis.GetDatabase().LockTakeAsync($"PlaceOrder:{user.UserId}", "1", TimeSpan.FromSeconds(180)))
        {
            await Task.Delay(1);
        }

作用是确保同一用户只有一个订单未写入数据库(系统下单逻辑涉及几十个函数,全是一些莫名奇妙的判断逻辑,混淆后可读性大幅提升的那种(当然是开玩笑的)),屎山作者已经跑路了,没人能看懂他代码,一个用户下多个订单数据会混乱。更牛逼的这套系统除了性能极差,运行 3 年没出错一次。一次调用 API 只能下一单,客户端随硬件交付,已经写死了,不能更新,然后客户端一次多少个订单就多少并发调用 API 提交,没有队列功能。目前要求 500 订单 10 秒内全部下单完成返回订单号(单独提交的话每个订单 0.01 秒左右能写入完数据拿到订单号)。

预分配订单号行不通,不运行一遍这部分屎山代码不能确定这个订单能不能提交,返回订单号就代表这个订单提交成功了,不能取消。目前打算改造成 Sub/Pub ,不知道能不能提升性能,或者 V 友有没有更好的改造方案?只要能让这屎山跑起来就行,代码多脏都没关系,改动需要尽可能小,不能把系统改炸。目前加硬件到 256GB 内存都没解决。