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

推荐订阅源

P
Proofpoint News Feed
博客园 - 聂微东
博客园 - 叶小钗
量子位
Google DeepMind News
Google DeepMind News
Cyberwarzone
Cyberwarzone
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
P
Privacy & Cybersecurity Law Blog
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
雷峰网
雷峰网
C
Cybersecurity and Infrastructure Security Agency CISA
Schneier on Security
Schneier on Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
美团技术团队
T
Tenable Blog
T
Threatpost
S
Security Affairs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
Cisco Blogs
The Last Watchdog
The Last Watchdog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
A
Arctic Wolf
Attack and Defense Labs
Attack and Defense Labs
AWS News Blog
AWS News Blog
AI
AI
W
WeLiveSecurity
H
Help Net Security
G
Google Developers Blog
PCI Perspectives
PCI Perspectives
博客园_首页
S
Securelist
B
Blog RSS Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Forbes - Security
Forbes - Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
L
Lohrmann on Cybersecurity
云风的 BLOG
云风的 BLOG
Martin Fowler
Martin Fowler
C
CERT Recently Published Vulnerability Notes
H
Hacker News: Front Page
The GitHub Blog
The GitHub Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Spread Privacy
Spread Privacy
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
博客园 - 司徒正美
Google Online Security Blog
Google Online Security Blog
T
The Blog of Author Tim Ferriss

博客园 - 陈惟鲜的博客

win11安装mysql8 AI软件修改脚本与代码,还真不敢完全操作 linux 磁盘满了,排查 Ecelipse 安装 MAT linux 增加新磁盘 redis自身查询很慢 排查redis-benchmark prometheus监控mysql数据库 prometheus监控springboot项目配置 监控工具prometheus配置-docker版 linux 文件属性被替换修改查询并修改 ----i----------- ZonedDateTime 转为 java.util.Date docker 容器查看jvm参数配置 redis 事务处理,一旦异常,则回滚 linux 下安装使用jmeter 执行压测 eclipse 合并错分支代码还原,合并到本分支但未push到库上 mysql 查询jason格式数据 maven打包慢,使用maven-mvnd 打包可以快一半 postman 参数化构建 批量测试 postman 常用参数例子 使用AOP实现+自定义注解 实现 缓存 如何判断redis慢了
大批量订单来了由于入库慢,先缓存后通知入库
陈惟鲜的博客 · 2023-08-22 · via 博客园 - 陈惟鲜的博客

请求小,订单少时,订单可以先入db,再刷到缓存。其他地方需要查询订单时,直接到缓存中查询,但当大批量订单来临,每个订单入库就变得慢了。

很奇怪的是,订单少时,每个订单(100多个字段)入库时间在2ms左右,当订单大量来临,订单入库时间到了两位数的ms。从而导致订单排队,影响交易。

为了效率,我想可以修改成这样。

这意味着,完全相信缓存中的订单是最新的。

先入redis,然后通过mq或者线程池或者其他方式异步入库订单,从而可以不用关心订单的入库效率。甚至可以开启定时任务批量订单入库与更新。但订单更新有先后。所以还是通过有序mq通知更新比较可靠。

我想,必定可行,当然,存在的风险就是缓存redis慢了,怎么办。