架構師訓練營 week4 作業
一个典型的大型互联网应用系统使用了哪些技术方案和手段,主要解决什么问题?请列举描述。
The system architecture is continuous improvement, there are different problems and different solutions at different stages.
The technical solutions used are:
Separate the application, database, files in different servers
one server can't afford the loading. we use different servers for different purposes
Use cache to improve performance
cache hot data, then no need to touch the database
Memcached, Redis
Use cluster to improve server performance
multiple servers, we use load-balancer to dispatch request to servers
DB Read and write separation, DB sharding
when one DB can't afford the loading.
Master-Slave
Data sharding to separate big table
CDN and Reverse proxy
for static files cache
Distributed file system
one file system can't afford the loading
NoSql and Search engine
big data data analysis and search
Separate servers by different businesses
if we are in this stage, the team is already big. if all the application codes are still in one repo. it'll slow down the development pace.
so we can separate one big repo into different repoes according to different businesses
we still use some sharing databases in this stage
Distributed system, microservice
each server has its own deployment, database, log, monitor
心得分享:
分佈式系統拆分
在系統演化的過程中,會有非常多不同的挑戰,在不同的時期也是會有不同的解法。
這些過程中,分佈式系統是相當困難的一個挑戰,因為
對於系統程式碼有高度的相關性,如何拆分真的是一個很大的學問。
基礎設施的建設必須相當完善 (ex: CI/CD, Monitor, Dashboard. 等等)
以下這個基本項目也是必須先完成之後,才能再進一步的進行分佈式系統拆分
Performance
High availability
Scalability
沒有這幾項基本的要素之前,分佈式系統可能會有無止盡的問題。
Airbnb Migration (ref: https://myslide.cn/slides/21099)
Why
Survival
Latency
Dev bottleneck
Deployment bottleneck
Performance thread
How
Tools
New service framework
Auto-generate API code and Java/Ruby clients
Templated matrics
Dashboards
Alerts
Learnings
Timing of SOA
they started from 600 engineers
Micro-services is not for everyone
High investment cost
Distributed cost
Complex service orchestration
目前公司的簡易拆分計畫
评论