当前位置:网站首页>01 distributed system overview
01 distributed system overview
2022-06-28 09:16:00 【& goodbye firefly &】
Catalog
One , What is a distributed system
The content of the article comes from : Nanjing University / Star ring technology course , Big data theory and practice course Ⅰ
One , What is a distributed system
1, Concept
Hardware or software components ( service ) Distributed on different network computers , adopt The messaging Communicate and coordinate .
2, characteristic
Distribution
Equivalence
- equality : There is no subject or subordinate
- Independent : Own your own CPU And memory , Process data independently
concurrency
- external : Hosting concurrent access from multiple clients
- Inside : Homework (Job) Broken down into multiple tasks (Task), Running concurrently on different nodes
Fault independence
- The failure of some nodes does not affect the normal use of the whole system
3, Typical problems
Abnormal communication
Network partition ( Split brain )
- The system is split into two or more local clusters ( Partition )
- Each partition operates independently , Simultaneous provision of services , Which leads to chaos
Node failure
- Down or dead
Tristate
- success 、 Failure and Overtime
Two ,CAP Theorem
1,C、A、P
C(Consistency, Uniformity )
- meaning : At the same time , The data is in Whether multiple copies of different nodes have identical values
- Strong consistency : After data update , At the same time , Different read operations can get the latest value
- Weak consistency : After data update , At the same time , Different read operations may not always get the latest value , There is no guarantee how long it will take to get the latest value
A(Availability, Usability )
- meaning : For each request , Whether the system can be in a limited ( Appoint ) To respond in a timely manner
P(Partition Tolerance, Partition tolerance )
- meaning : When a network partition occurs , The system can still provide external services to meet the consistency C And usability A Service for
2,CAP Theorem
describe : Distributed systems in the same time segment , It's impossible to meet consistency at the same time C、 Usability A And partition fault tolerance P, Only two of them... Can be satisfied at most .
For distributed systems , Network partitioning cannot be avoided , Satisfy P The premise is the premise , So it is impossible to choose CA framework , Can only choose CP or AP framework .
for example : When a network partition occurs , A node is writing
(1) If in order to guarantee C, Read and write operations on other nodes must be disabled , Then with A The conflict
(2) If in order to guarantee A, Other nodes can read and write normally , Then with C The conflict
choice CP or AP framework , The key is the business scenario . for example : For banking businesses that must ensure strong consistency , Can only choose CP
3、 ... and ,BASE theory
1,BA、S、EC
BA(Basically Availability, Basic usability )
- When the system fails , Ensure that the core functions and indicators are effective in advance , Partial loss of availability is allowed , Including the loss of response time 、 Loss of non core functions, etc
S(Soft State, Soft state )
- Allow data to have intermediate states ( Not updated temporarily ), And this status will not affect the overall availability
- Allow a certain delay in the synchronization of data copies on different nodes
EC(Eventually Consistency, Final consistency )
- Copies of data distributed on different nodes , After a certain time of synchronization , To reach a consensus . for example :Zookeeper、HDFS QJM Write more than half of the transaction strategy
- An upgraded version of weak consistency
Two ,BASE theory
describe : The distributed system satisfies the partition fault tolerance P At the same time , Allow data soft state S The existence of , And implement basic Usability BA and Final Uniformity EC.
That is to satisfy P Under the premise of , Yes CAP Strong consistency in A And absolute availability C Make moderate compromises :A-》BA、C-》EC
By tolerating temporary inconsistencies in some data ( Soft state ), That is, sacrificing the strong consistency of data ( Ensure final consistency ), To ensure that the core functions and indicators of the system are effective ( Basic available )
BASE Theory is a summary of the distributed practice of large-scale Internet systems , It's right CAP The result of a trade-off between consistency and availability in .
边栏推荐
- SQL optimization experience: from 30248 seconds to 0.001 seconds
- temple
- 手机买同业存单基金开户选哪家证券公司比较好,比较安全呢
- P2394 yyy loves Chemistry I
- Screen settings in the source code of OBS Live Room
- I want to register my stock account online. How do I do it? Is online account opening safe?
- 怎样在手机上开户?现在网上开户安全么?
- How to solve the problem of high concurrency and seckill
- Basic knowledge of hard disk (head, track, sector, cylinder)
- Common test method used by testers --- orthogonal method
猜你喜欢

Matlab tips (20) matrix analysis -- principal component regression

It only takes two steps to find the right PMP organization, one check and two questions

SQL optimization experience: from 30248 seconds to 0.001 seconds

图解MySQL的binlog、redo log和undo log

Application of current limiting protector in preventing electrical fire in shopping malls

How to reduce the risk of project communication?

Protection range and optimization of motor protector for hoist equipment

Discussion on safety management of centralized maintenance construction site of substation under the mode of operation and maintenance

SQL injection file read / write

買賣股票費用計算
随机推荐
Common faults and solutions of Substation
自动转换之-面试题
什么是在线开户?现在网上开户安全么?
Data mining modeling practice
Rman Backup Report Ora - 19809 Ora - 19804
中金财富开户安全吗?怎么收费?
Quickly understand JVM structure and working principle
Batch modify tables and sorting rules for fields in tables
批量修改表和表中字段排序规则
在本类私有属性直接使用?new()在使用!!!
Basic content learning of software testing (I)
Protection range and optimization of motor protector for hoist equipment
Prototype chain JS
Container adapter - stack: stack queue: queue priority_ Queue: priority queue
STL -- binder
股票 停牌
APICloud携手三六零天御,助力企业守好App安全“第一关”
P2394 yyy loves Chemistry I
Application of energy management system in iron and steel enterprises
[big case] Xuecheng online website