ã·ã¹ãã å¶åŸ¡ãŸãšã
ä¿¡é Œæ§ã«é¢ããèšèšãã¿ãŒã³ãŸãšã.
ãããããã€ãŠðã¹ãã¬ãŒãžã·ã¹ãã ã®ã·ã¹ãã å¶åŸ¡ããŒã ãšããŠåœãè³ãã(= çæ»)é å.
ðãšã©ãŒãªã«ããªãŒ
ãããããæ±çšçãªå称ãããã®ãããããªãã, ç°åžžçºçãšãã®åŸ©æ§ã«ã€ããŠ.
ç°åžžæ€åºãã¿ãŒã³
åºæ¬çã«ã¯ïŒã€ã®ãã¿ãŒã³.
- Periodic Polling(ç£èŠ)
- åžžé§ããã»ã¹ããç¶æ ããã§ãã¯ãã.
- ãã°ãã°heartbeat, sanity check, æ»æŽ»ç£èŠãªã©ãªã©.
- ãœãããŠã§ã¢ã®åŠçã ãã§å®è£ ã§ãã.
- å²ã蟌ã¿ãçºçã§ããªãã€ãã³ããç£èŠã§ãã.
- Interrupt pattern(éç¥)
- å¥ã®ããã»ã¹/ã¹ã¬ããããã®éç¥ãåãã.
- ãã°ãã°watchdog timeoutãªã©.
- ãªã¢ã«ã¿ã€ã ã«ç°åžžãåŠçã§ãã.
- ããŒããŠã§ã¢ã OS ã«äŸåãã.
åŸ ã€ãåãã«è¡ãã. ãªã¢ã«ã¿ã€ã æ§ãå¿ èŠãªãã°ããªã¬ãŒãã¿ãŒã³.
ðRAS
Reliability, Availability, Serviceabilityã®ç¥.
ä¿¡é Œæ§ã«é¢ããã¹ããŒã¬ã³çãªãã®.
- links.
- refs.
cf. ð§ 網æ§äœè³ŠæŽ»ç³»(RAS)ãäžéçã«ã¯ãã£ã¡ã®ã»ãç¥å床ããïŒ
Related
Fault tolerant
ãã©ãŒã«ããã¬ã©ã³ã.
æ§æéšåã®äžéšãæ éããŠãæ£åžžã«åŠçãç¶è¡ããããš.
Fault tolerant ã®æ¡ä»¶
Wikipedia ãã.
1 åäžé害ç¹ããªãããš (é害ã«å¯ŸããŠå šäœã®é害ãšãªããªããã察çãæœãããŠããããš)) 2 åäžæ éç¹ããªãããš (ããŒããŠã§ã¢æ éã«ã€ããŠãåæ§) 3 é害éšåã®éé¢ãã§ããããš (éšåçž®é) 4 é害ã®äŒæãé²ãããš 5 代æ¿ã¢ãŒããããããš
dependable system
é«ä¿¡é Œã·ã¹ãã . 以äžã®èŠæ±ãæºãã.
- å¯çšæ§ ⊠ã·ã¹ãã ãããã«äœ¿ããããã«ãªããšããæ§è³ª.
- ä¿¡é Œæ§ âŠ ã·ã¹ãã ãé害ããããããšãªãå®è¡ãã€ã¥ããæ§è³ª.
- å®å šæ§ ⊠ã·ã¹ãã ãäžæçã«æ£åžžã«ã©ããããªãç¶æ³ã§ã, é倧ãªåé¡ãçããªãããš
- ä¿å®æ§ ⊠ã·ã¹ãã ã容æã«å埩ã§ããããš.
ã·ã¹ãã ã®ç¶æ ã«ã€ããŠ
- æ é (fail): ã·ã¹ãã ãäºå®ããè¡åããšããªããªã£ãå Žå
- ãšã©ãŒ (error): é害ãåŒãèµ·ãããããããªãç¶æ . ãšã©ãŒã®èŠå ãé害 (fault) ãšãã.
ã·ã¹ãã å¶åŸ¡ãšã¯, 以äžããã.
- é害ãé²ã
- é害ãé€å»ãã
- é害ãäºæž¬ãã
é害ã¯ä»¥äžã«åé¡ããã
- éæž¡é害 ⊠äžåºŠã ãçºçããŠæ¶æ» ãããã®
- éæ¬ é害 ⊠ãã°ãã°çºçãããã®
- æ°žä¹ é害 âŠ æ¬ é¥ãé€å»ããããŸã§ç¹°ãè¿ãååšãç¶ãããã®
single point of failure
åäžé害ç¹. åé·åããããŠããªãéšå.
åé·å
- ã¬ããªã±ãŒã·ã§ã³
åãã·ã¹ãã ã®è€è£œãè€æ°çšæã, ãããå šéšã«åãåŠçã䞊åã«å®è¡ãã, å®è¶³æ°ãæºè¶³ããçµæãæ£ããçµæãšããŠæ¡çšãã.
- åé·æ§
åãã·ã¹ãã ã®è€è£œãè€æ°çšæã, é害ãçºçãããäºåã®ã·ã¹ãã ã«åãæ¿ãã.
- å€æ§æ§
åãä»æ§ã®ç°ãªãå®è£ ã®ã·ã¹ãã ãè€æ°çšæã, ã¬ããªã±ãŒã·ã§ã³ã®ããã«ãããéçšãã. ãã®å Žå, åã·ã¹ãã ãåãé害ãçºçããããšããªããšèãããã.
Communication Protocol Styles
Multicast
決ããããè€æ°ã®ãããã¯ãŒã¯ç«¯æ« (ããŒã) ã«å¯ŸããŠ, åæã«ãã±ãã (ããŒã¿) ãéä¿¡ããäº.
ãã«ããã£ã¹ã㯠UDP ã䜿çšãã. ä¿¡é Œæ§ãæ±ããããæ å ±éä¿¡ã«ã¯åããªã.
Tree-Based Multicast ãšçµã¿åãããããšã. æå°æ¢çŽ¢æšãäœæããŠ, Multicast.
Ordering
é åºæ§ãä¿èšŒããããã« 3 ã€ã®ä»£è¡šçãªã¢ã«ãŽãªãºã ããã.
- FIFO ordering
Multicasts from each sender are received in the order they are sent, at all receivers.
- casual ordering
Multicasts whose send events are causally related, must be received in the same causality-obeying order at all receivers.
- Total ordering
é«ä¿¡é Œã¯ã©ã€ã¢ã³ããµãŒãééä¿¡
RPC ãšã©ãŒã®ãªã«ããªæ¹æ³ã®ãŸãšã. (åæ£ã·ã¹ãã p340)
-
ã¯ã©ã€ã¢ã³ããããµãŒãã®äœçœ®ãç¹å®ã§ããªãå Žå
-
ã¯ã©ã€ã¢ã³ããããµãŒããžã®èŠæ±ã¡ãã»ãŒãžãåªå€±ããå Žå
-
ãµãŒããèŠæ±ãåããããšã«ã¯ã©ãã·ã¥ããå Žåã¯ã©ã€ã¢ã³ãã¯ã¿ã€ã ã¢ãŠãã«ããã¿ããªã. 察åŠã¯ 3 ã€ãã.
- at-least-once semantics æäœäžåãªãã©ã€ãã
- at-most-once semantics ãªãã©ã€ããã«ç°åžžãéç¥
- ãªã«ãããªã. ç°åžžãç¡èŠ.
-
ãµãŒãããã¯ã©ã€ã¢ã³ããžã®èŠæ±ã¡ãã»ãŒãžãåªå€±ããå Žå
-
ã¯ã©ã€ã¢ã³ãã§èŠæ±ã¡ãã»ãŒãžãéä¿¡åŸã«é害ãèµ·ããå Žå
é«ä¿¡é Œã°ã«ãŒãééä¿¡
Reliable Multicalsing (åæ£ã·ã¹ãã p346).
Make sure that all of them receive the same updates in the same order as each other.
- ä»®æ³åæ (Virtual Synchrony)
Gossip (Epidemic)-Style Multicast (Protocol)
Gossip ã¯ãããã®ããš. 人ã®ãããããã£ãšããéã«åºãŸãã®ã«ã¯çè«çæ ¹æ ããã£ã.
Multicast ã«ã¯ä»¥äžã®èª²é¡ããã
- Nodes may crash
- Packets may be dropped
- 1000âs of nodes
Multicast éä¿¡ã§, ç¹å®ã®ã°ã«ãŒãã«æ å ±ãäŒéããããã®ããæ段.
- epidemics ãšãåŒã°ããŠãã.
- éã, ä¿¡é Œæ§ããã, ã¹ã±ãŒã©ãã«.
- Amazon EC2, S3
- Cassendra
- NNTP
ããããŒããéä¿¡ãåä¿¡ãããš, ã©ã³ãã ã«éžãã n ã€ã®ããŒãã«ã¡ãã»ãŒãžãéä¿¡ãã.
ãŠã¯ãµãäŒæç ãåºãŸãããã«, æ å ±ãäŒéããŠãã.
Unicast
ãŠããã£ã¹ã.åäžã®éä¿¡çžæãæå®ããŠ, ããŒã¿ãéä¿¡ãã. TCP ãå©çšããããšãå€ã.
Broadcast
äžç¹å®å€æ°ã®ããŒãã«, åæã«ãã±ãããéä¿¡ããããš.
é«ã³ã¹ã.
Leader Election
éžä»»ã¢ã«ãŽãªãºã .
éåžž, åæ£ã·ã¹ãã ã§ã¯, Coordinator ãååšãã. Coordinator ã§ç°åžžãçºçãããã, 次㮠Coordinator ã決å®ããå¿ èŠããã.
ãŸã, ç°åžžãª Coordinator ã埩æ§ãããšãã« Coordinator ãæ»ãå¿ èŠããã.
å€å žç㪠Coordinator ã決å®ããããã®ã¢ã«ãŽãªãºã ã¯ä»¥äž.
- Bully algorithm
- Ring algorithm
å®éã®å®è£ äŸ.
- Google Chubby
- Apatch ZooKeeper
Bully Algorithm
Bully (ã¬ã倧å°) ã¢ã«ãŽãªãºã . ã€ãããã®ãåã€ãšãããã®.
- CS 551: Synchronization, Bully Election Algorithm Example
- Bully algorithm - Wikipedia, the free encyclopedia
3 çš®é¡ã®ã¡ãã»ãŒãžããã.
- Election Message: Sent to announce faster election
- Answer Message: Respond to the election message
- Coordinator message: Sent to announce the identity of the elected process
æé ã¯ä»¥äž
- ããããŒãã Master ã®ç°åžžãæ€åºãããšã, Election ãéå¬ãã. Master ãç°åžžç¶æ ãã埩æ§ãããšãã, Election ãéå¬ãã.
- ããããŒãã¯èªèº«ãããé«ã ID ããã€ããŒãã«ããããŠ, Election Message ãããã. (çå宣èš)
- Election Message ããããšã£ãããŒãã¯, Answer Message ãããã. ãããŠ, èªèº«ãããé«ã ID ããã€ããŒãã«ããããŠ, Election Message ãããã.
- 2, 3 ãç¶ããçµæ, ã©ã®ããŒããããå¿çããªã, éä¿¡ããããŒãããªãå Žåã«, ãã®ããŒãã Master ãšãªã. Master 㯠Coordinator messag ãããã.
Ring Algorithm
ãªã³ã°äžã«ããŒãã® ID ãå²ãæ¯ããã. ããããŒãã¯èªèº«ã®ãšãªãã«ãªãã¶ããŒãã«ã¡ãã»ãŒãžãéã.
ãšãªããšãªãã«ã¡ãã»ãŒãžããããããšã§, ãªã³ã°ãäžåšããã, ãªã³ã°ãæ§æããããŒãã®çå確èªããšããã®ã§, ãã£ãšãé«ã ID ããã€ããŒãã Master ã«ãªã.
Bookmarks
- Distributed Algorithms
- http://www.hpcs.cs.tsukuba.ac.jp/~msato/lecture-note/dsys-2014/lecture-dist-mutex.pdf
Failure detector
åæ£ã·ã¹ãã ã®ããŒãã®äžã§, ç°åžžæ€åºãæ ããã®.
In distributed computing, a failure detector is an application or a subsystem that is responsible for detection of node failures or crashes in a distributed system.
以äžã®è«æã§æåºãããæŠå¿µ.
- Unreliable failure detectors for reliable distributed systems
- Chandra â Toueg consensus algorithm - Wikipedia, the free encyclopedia
Failure Detector ã®è§£èª¬ãåã¿ç ããŠæžããŠãã.
Failure Detector ã®ç°åžžæ€åºæ¹æ³
2 çš®é¡ã®ãã¿ãŒã³ãããªã.
Alive - Suspected - Failed ãšãã 3 ã€ã®ç¶æ é·ç§»ããã.
æ éãããã確èªããã®ã«, ã¿ã€ã ã¢ãŠãã®ä»çµã¿ã䜿ãããšãå€ã
Ack-Ping Protocol
èœåçã«ããã»ã¹ããäºãã«âçããŠãŸããâãšããæšã®ã¡ãã»ãŒãžãéä¿¡ããã.
- A 㯠B ã« T ç§ããšã« ping ãæãã.
- B 㯠A ã« ack ãå¿çãã.
- A 㯠B ããã®å¿çã 2T ç§ ä»¥å ãåž°ã£ãŠããªããã° B ãç°åžžãšå€æ. ã¿ã€ã ã¢ãŠã㯠2T 以å .
Heartbeating Protocol
ååçã«çžæããã®éä¿¡ããŸã€.
- B -> A ãž T ç§ããšã« heartbeat ãæãã.
- A 㯠T ç§ããšã« heartbeat ãåä¿¡ãã.
- A 㯠B ããã® heartbeat ã 3T ç§éãªããã°, A 㯠B ãç°åžžãšå€æ.
Faulure Detector ã®ç¹åŸŽ
Property | Description |
---|---|
Completeness | each failure is detected. |
Accuracy | there is no mistaken detection. |
Speed | Time to first detction of a failure. |
Scale | Equal Load on each member/ Network Message Load. |
(No bottlenecks, single failure point) |
ðããŒãããŒã
HeartBeating
ãããã¯ãŒã¯äžã§, ã³ã³ãã¥ãŒã¿ããããã¯ãŒã¯æ©åšãèªèº«ãæ£åžžã«çšŒåããŠããããšãå€éšã«ç¥ãããããã«éãä¿¡å·.
Keep-Alive ãšããã.
å®æœæ¹æ³ã¯, ãããã.
- Centralized Heartbeating
- Ring Heartbeating
- All-to-all Heartbeating
- Gossip-Style Heartbeating
- All-to-all ãããå¹çç.
- Gossip-Style Heartbeating
Membership protocols
ã¡ã³ããªã¹ããäºãã«éä¿¡ããã£ãŠ, åæãããæ¹åŒ.
- Gossip-style
- SWIM
ðGossip Protocol
Gosship-Style heartbeating. Better All-to-all Heartbeating. Probabilistic Failure Detector.
Multicast éä¿¡ã§, ç¹å®ã®ã°ã«ãŒãã«æ å ±ãäŒéããããã®ããæ段.
- epidemics ãšãåŒã°ããŠãã.
- éã, ä¿¡é Œæ§ããã, ã¹ã±ãŒã©ãã«.
ãã¹ãŠã®ããŒãã« heartbeat ãããã®ã§ã¯ãªã, ã©ã³ãã ã«éžåºããããŒãã«å¯Ÿã㊠heartbeat ãå®æœãã.
Load (è² è·) 㯠N ã«æ¯äŸããªããšããç¹åŸŽããã. ã€ãŸã, ãããã§ãããŒããåçã«æ¡åŒµã§ãããšããããš.
Gossip ã¯ãããã®ããš. 人ã®ãããããã£ãšããéã«åºãŸãã®ã«ã¯çè«çæ ¹æ ããã£ã.
ããããŒããéä¿¡ãåä¿¡ãããš, ã©ã³ãã ã«éžãã n ã€ã®ããŒãã«ã¡ãã»ãŒãžãéä¿¡ãã.
ãŠã¯ãµãäŒæç ãåºãŸãããã«, æ å ±ãäŒéããŠãã.
Amazon EC2/S3 ã§å©çšãããŠãã.
SWIM Membership Protocols
SWIM (ã¹ã±ãŒã©ãã«, 匱äžè²«æ§ã®ããããã»ã¹Â·ã°ã«ãŒã·ã¡ã³ããŒã·ãã·ãããã³ã«)
direct-ping ãš indirect-ping ã®äž¡æ¹ãå©çšãã.
ping-ack ããŒã¹ã®ãããã³ã«.
- first detection time ã äžå®.
- process load ãäžå® (Scalable)
ã ããããã®åèš³.
Bookmarks
ãªãã, MOOC ãšåãçµµãèŒã£ãŠããã¹ã©ã€ãèŠã€ãã.
Outage (åé»)
以äžã®èŠå ã§åé»ã«ãã. 70%ã¯äººéã®ãã¹ã§çºçãã.
- Power outage
- Over-heating
- Human error
- Fire
- DOS Attack
References
Fault-tolerant Patterns
Fault-tolerant ã§å©çšãããæŠå¿µãã³ã³ãã¯ãã«ãŸãšãŸã£ãŠãã.
Fault-tolerant ã®ãã¿ãŒã³. POSA ãšåãåºç瀟.
äžã®æ¬ã®æžè©
Pattern ã«ã€ããŠãŸãšãŸã£ã PDF.