当前位置:网站首页>Micro blog comment architecture design
Micro blog comment architecture design
2022-06-29 11:26:00 【InfoQ】
1. Business background
- The user writes a comment and clicks the send Comment button
- Comments are posted to the Weibo article comment area
- Some comments will be displayed when viewing Weibo
- After the user clicks on more comments , The comments area shows more comments
2. Constraints and restrictions
3. Overall computing architecture
3.1 Analyze and evaluate
3.1.1 Performance requirements
3.1.2 High availability
3.2 Microblogging comments on the design of high-performance computing architecture


3.2.1 Non hot event high performance design
- Use buffering in case of irregular refresh , Add expiration time to the passive cache , Read cache from database again after invalidation . Multiple caches have different expiration times .
- Due to the increasing number of comments , It can refresh regularly , Active update strategy can also be adopted , Let the daemon update comments .
- If you can't handle the comment request , Can be discarded directly , It can be processed when the user requests again .
3.2.2 Hot event high performance design
- Increase the comment queue length
- Increase the number of comment servers
- Add multiple cache servers , And set different expiration time
- If you can't handle it, just discard it
3.2.3 Hot event high availability design
- Current limiting: Control the number of comments .clientSet the clock , Only after the countdown is completed can you post comments , And explain that only limited comments are allowed within the specified time . It can also be inThe service gatewayDirectly reject the comment request in . When the number of microblog comments received is greater thanApplication service queuewhen , Discard comments directly , And prompt the user that they cannot comment .
- Fuse: You can temporarily turn off some user comments , If users make too many comments in a short time , Just temporarily remind the user that they can't comment again for a period of time .
- Downgrade: Observation hotspot , When the system is overloaded , You can manually turn off the comment function temporarily .
4. Detailed design
4.1 Core functions
4.1.1 Comment on

- As long as the queue is not satisfied , After writing a comment request , You can return success to the client
- If the queue is full , Discard the write comment request , Return failed to client
4.1.2 Read comments

4.2 Key design
4.3 design code
5. Quality design
6. Evolution planning
边栏推荐
- Bs-gx-017 online examination management system based on SSM
- 如何识别出轮廓准确的长和宽
- Creating postgre enterprise database by ArcGIS
- Xuetong denies that the theft of QQ number is related to it: it has been reported; IPhone 14 is ready for mass production: four models are launched simultaneously; Simple and elegant software has long
- LeetCode 535 TinyURL的加密与解密[map] HERODING的LeetCode之路
- 5.移植uboot-设置默认环境变量,裁剪,并分区
- 在线文本过滤小于指定长度工具
- Encore une fois, le chemin de l'amélioration de redis Cloud
- Using EasyX configuration in clion
- (JS) imitate an instanceof method
猜你喜欢

Necessary for cloud native development: the first common codeless development platform IVX editor

期未课程设计:基于SSM的产品销售管理系统

BS-GX-017基于SSM实现的在线考试管理系统
![[daily 3 questions (1)] judge the color of a grid on the chess board](/img/bd/064058f917554237b741795d405189.png)
[daily 3 questions (1)] judge the color of a grid on the chess board

How to test the performance of container platform, including stability, expansion efficiency and component performance

Hit the industry directly! The first model selection tool in the industry was launched by the flying propeller

第12周实验---基于FPGA的VGA协议实现
![[various * * question series] what are OLTP and OLAP?](/img/3f/48b4108d14d40212f678971c1b62bb.png)
[various * * question series] what are OLTP and OLAP?

如何识别出轮廓准确的长和宽

BS-GX-018 基于SSM实现在校学生考试系统
随机推荐
(JS) responsibility chain mode
在编写shell脚本时如何正确姿势地管理临时文件
NUC980开源项目16-从SPI FLASH(W25Q128)启动
彻头彻尾理解JVM系列之七:对象在分代模型中的流转过程是怎样的?
ModbusTCP协议WIFI无线学习型单路红外模块(圆壳版)
The Chinese Computational Linguistics Conference and the national knowledge atlas and Semantic Computing Conference are in full swing
中科方德技术专家直播:如何基于 OpenStack、Ceph 构建私有云平台? | 第 27 期
(JS) handwriting depth comparison
NUC980开源项目16-从SPI FLASH(W25Q128)启动
[3 questions per day (2)] minimum operand for generating alternate binary strings
rxjs Observable 设计原理背后的 Pull 和 Push 思路
When the "Ai x scientific computing" is in progress, Huawei's mindspore competition question is hot, waiting for you!
By asp Net core downloading files according to the path
[digital signal modulation] realize signal modulation and demodulation based on am+fm+dsb+ssb, including Matlab source code
关于IP定位查询接口的测评Ⅱ
nuc980 已成功启动
Nuc980 open source project 16- start from SPI flash (w25q128)
Creating postgre enterprise database by ArcGIS
专访 SUSS NiFT 负责人:Web3 的未来离不开“人人为我,我为人人”的治理
中国计算语言学大会、全国知识图谱与语义计算大会赛题火热进行中