注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号
x
找工作断断续续持续了快一年时间。有点拖拉。但是最终还是修成正果。拿到了狗脸软亚的offer。准备去脸家。
面完了自己也想写一个系统设计的总结,一来将来在找工作的时候有点参考,二来希望能帮到其他人。
貌似地里格式搞起来比较麻烦?我自己有一个文档。有时间我会慢慢优化,加一些东西。很多地方都写的比较简单。稍微搞好一点有机会在发出来让大家下载……
写的比较乱,有些描述也不见得准确。还有很多语法错误。请大家指正……谢谢
Overview: System
Typically, the system design question is backend focused. That means the candidate does not need to consider the front-end structure. For backend, a system typically has:
1. A or a set of services, that provide required functions.
2. A or a set of data stores, that host the static information.
3. A or a set of cache, either sit in the service or as a centralized cache, that speed up the system.
In addition to the 3 parts, we typically have one or a set of load balancers to distribute the load to multiple servers.
All these pieces combine together and form a system. System design questions test candidates’ understanding of all these pieces and the capability to use them.
Part 0: Collect Requirements
1. System functional requirements
2. Traffic size
3. Data size
Part 4: Datastore
First of all, discuss the table structure. Table name, columns, info etc.
Second, discuss the data volume. How many data points, size of the data, how long to keep the data.
Third, which database to use?
Relational Database (MySQL, Oracle):
Relational Database will be suitable for small projects, or locations that require 100% CAP…
Cassandra:
Cassandra has quite a few benefits: a) no single point of failure. B) read fast.
Potential issue: a) update/delete a little slow as it needs to update/delete information from multiple nodes. B) low consistency.
H-Base:
H-Base is backed by Hadoop.
Benefits: a) Consistency is high (it is a master-slave structure) b) fast read, especially when fetching a handful records from a large quantity of data.
Potential issue: a) needs a lot of expertise, including Hadoop, zookeeper (for service discovery), Hive (For query) etc. It is not a simple system.
HDFS (Hadoop distributed file system):
It is used widely to store static data, such as pictures and videos.
补充内容 (2019-9-22 07:48):
发现有一个系统设计专区……管理员可不可以帮忙移过去?
谢谢 |