当前位置:网站首页>Cache architecture scheme of ten million level shopping cart system
Cache architecture scheme of ten million level shopping cart system
2022-06-25 16:43:00 【Hua Weiyun】
Author's brief introduction : Xiaoming Java Asking the way , Senior R & D Engineer of a large financial Internet company , Good at orders / High security in the trading field / You can use / Concurrent / Performance architecture design and implementation , Focus on the research of computer and financial technology
If this article is good , Please pay attention. 、 give the thumbs-up 、 Collect three companies to support bloggers
Introduction to this article : This paper mainly introduces redis Design architecture scheme in ten million level system , Including the main architecture design 、 Cache consistency scheme 、 Big value Treatment plan and redis Current limiting and fault recovery degradation scheme
Cache architecture main frame composition :
The main architecture includes cache clusters 、 Cache current limiting 、 Cache size value Handle 、HotKey Detection system 、redis Failback degradation and redis-mysql Data synchronization
Cache consistency solution :
One 、 For all DB Operations do not add specific operations to delete the cache , But through canal monitor binlog The way
Two 、 After the data is confirmed to have been submitted to the database , Change through monitoring , After parsing the corresponding data , Filter out those that are not added, deleted or modified
binlog
3、 ... and 、 Then, the related tables, key fields and cache prefixes that need to handle data consistency are configured through constant classes key, Assemble the cache to be deleted key. And through mq Of ack Mechanism to ensure that the cache will be deleted .
Cache throttling solution :
prevent redis After the crash , The system is not working properly , So we need to do a downgrade .
system operation redis In general, all the methods of RedisCache and Redislock Two classes to handle , So we went through AOP Cut the way , Make an aspect of all the methods in these two classes , If you execute here redis During operation ,redis Hang up , Connection failed , Then the method will throw exceptions , We are on the method of section processing , The catching , Then record it as redis Hang up is still a temporary fluctuation of the network
Big Value Treatment scheme :
One 、 Built redis colony
Two 、 stay canal Monitoring has been created in , Store in mysql in redis_large_key_log Tabular canal instance
3、 ... and 、 In the early hours of every day 3 spot , Will Redis The big of the middle key(value) data , adopt canal instance Send to MQ
Four 、 consumption redis_large_key_log Tabular binlog data , The data contains Redis The big key(value) Information
5、 ... and 、 Will be big value Cut into several key, When returning, splice and assemble
边栏推荐
猜你喜欢
随机推荐
【 apprentissage automatique】 cas de prévision et d'analyse de l'examen d'entrée à l'Université basé sur des séries chronologiques multiples
DDD概念复杂难懂,实际落地如何设计代码实现模型?
Multiple decorators decorate a function
Read mysql45 the next day
What can one line of code do?
Navicat Premium 15 for Mac(数据库开发工具)中文版
uniapp实现图片(单张/多张)预览
什么是骨干网
【蓝桥杯集训100题】scratch指令移动 蓝桥杯scratch比赛专项预测编程题 集训模拟练习题第14题
The textfield is encapsulated by the flutter itself, which causes the data display to be disordered when the data in the list is updated.
First knowledge of database
Reverse series to obtain any wechat applet code
Nsurlsession learning notes (III) download task
Day_ eleven
Resolve the format conflict between formatted document and eslint
Read AFN through - from the creation of manager to the completion of data parsing
从业一年,我是如何涨薪13K+?
Function and implementation of closures
cmd。。。。。。
软件测试面试如何正确谈薪