模块二作业:微信朋友圈高性能复杂度架构设计
1)高性能复杂度分析
2021 年 1 月 19 日,微信之夜,张小龙公布,每天有 10.9 亿人打开微信,7.8 亿人进入朋友圈,1.2 亿用户发表朋友圈,其中照片 6.7 亿张,短视频 1 亿条。

2)架构设计
2.1)整体业务架构

2.2)单机房架构设计

3)设计理由
朋友圈主要内容为图片和视频,可用选择基于文档类型的 MongoDB 来存储。评论主要是文字,可用使用关系型数据库,并使用分库分表来提升存储性能。
为了应对 500 万 QPS 的看朋友圈高性能,增加了 Redis Cluster 缓存集群。缓存集群只需要使用 Cache aside 方式将热门的朋友圈和评论保存起来即可。
评论