当前位置:网站首页>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
边栏推荐
- Cornerstone of efficient remote office: effective communication | community essay solicitation
- EasyDSS部署在C盘,录像回看无法正常播放该如何解决?
- (JS) handwriting depth comparison
- (JS) pure function in array
- 期未课程设计:基于SSM的产品销售管理系统
- (JS) array flat
- Mysql查询表字段信息
- Doodle cloud development demo login
- (JS) imitate an instanceof method
- The Chinese Computational Linguistics Conference and the national knowledge atlas and Semantic Computing Conference are in full swing
猜你喜欢

Specific method and example program of Siemens s7-200smart control stepping motor

中国计算语言学大会、全国知识图谱与语义计算大会赛题火热进行中

如何通过WinDbg获取方法参数值

在日本的 IT 公司工作是怎样一番体验?

math_数学表达式&等式方程的变形&组合操作技巧/手段积累

BS-GX-017基于SSM实现的在线考试管理系统

Encore une fois, le chemin de l'amélioration de redis Cloud

中科方德技术专家直播:如何基于 OpenStack、Ceph 构建私有云平台? | 第 27 期

math_ Mathematical expression & deformation of equation equation & accumulation of combined operation skills / means

Modbustcp protocol network learning single channel infrared module (double-layer board)
随机推荐
What is the experience of working in an IT company in Japan?
西门子S7-200SMART控制步进电机的具体方法及示例程序
Take another picture of cloud redis' improvement path
5. migrate uboot set default environment variables, crop, and partition
Modbustcp protocol WiFi wireless learning single channel infrared module (small shell version)
Limit introduction summary
斐波那锲数列与冒泡排序法在C语言中的用法
(JS) imitate an instanceof method
工具箱之 IKVM.NET 项目新进展
(JS) imitate the indexof method to find the position of a character in the string
【各种**问题系列】OLTP和OLAP是啥?
TTL串口学习型红外遥控模块可扩展成网络控制
[digital signal modulation] realize signal modulation and demodulation based on am+fm+dsb+ssb, including Matlab source code
Online text filter less than specified length tool
中国计算语言学大会、全国知识图谱与语义计算大会赛题火热进行中
Pipeline aggregations pipeline aggregation-sibling-1
The use of variables in shell that you have to be familiar with
Using EasyX configuration in clion
ModbusTCP协议网络学习型单路红外模块(双层板)
多线程高并发服务器:3个问题