virtual synchrony - cs.cornell.eduthe process group approach to reliable distributed compung • ken...

48
Virtual Synchrony Jared Cantwell

Upload: others

Post on 05-Oct-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

VirtualSynchrony

JaredCantwell

Page 2: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Review

•  Mul7cast•  Causalandtotalordering•  ConsistentCuts•  Synchronizedclocks•  Impossibilityofconsensus

•  Distributedfilesystems

Page 3: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Goal

•  Distributedprogrammingishard•  Whattoolscanmakeiteasier?

•  Whatassump3onscanmakeiteasier?

Distributedprogrammingishard!Let’sgoshopping!!!

AccordingtohHp://en.wikipedia.org/wiki/Barbie,Barbieoncesaid“Mathishard!”(misquoted).

Page 4: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

TheProcessGroupApproachtoReliableDistributedCompu7ng

•  KenBirman– Professor,CornellUniversity

•  ISIS– “toolkitmechanismfordistributedprogramming”– Financialtradingfloors– Telecommunica7onsswitching

Page 5: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

VirtualSynchrony

•  Simplifydistributedsystemsprogrammingbyassumingasynchronousenvironment

•  Features:– ProcessGroups– ReliableMul7cast

– FaultTolerance

– Performance

Page 6: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Outline

•  Problem/Mo7va7on•  Solu7on(VirtualSynchrony)– Assump7ons

– CloseSynchrony– VirtualSynchrony

Page 7: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Outline

•  Problem/Mo7va7on•  Solu7on(VirtualSynchrony)– Assump7ons

– CloseSynchrony– VirtualSynchrony

Page 8: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Mo7va7on

•  DistributedProgrammingishard

Page 9: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Difficul7es

•  Noreliablemul7cast•  Membershipchurn

•  Messageordering

•  Statetransfers•  Failureatomicity

Page 10: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

NoReliableMul7cast

p

q

r

Ideal Reality

•  UDP,TCP,Mul7castnotgoodenough•  Whatisthecorrectwaytorecover?

Page 11: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

MembershipChurn

p

q

r

Receivesnewmembership

Neversent

•  Membershipchangesarenotinstant•  Howtohandlefailurecases?

Page 12: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

MessageOrdering

p

q

r

1 2

•  Everybodywantsit!•  Howcanyouknowifyouhaveit?

•  Howcanyougetit?

Page 13: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

StateTransfers

•  Newnodesmustgetcurrentstate•  Doesnothappeninstantly•  Howdoyouhandlenodesfailing/joining?

p

q

r

Page 14: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

FailureAtomicity

p

q

r

Ideal Reality

x

?

•  Nodescanfailmid‐transmit•  Somenodesreceivemessage,othersdonot

•  Inconsistenciesarise!

Page 15: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Mo7va7onReview

•  Distributedprogrammingishard!

•  Noreliablemul7cast

•  Membershipchurn

•  Messageordering

•  Statetransfers•  Failureatomicity

Page 16: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Outline

•  Problem/Mo7va7on•  Solu7on(VirtualSynchrony)– Assump7ons

– CloseSynchrony– VirtualSynchrony

Page 17: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Assump7ons

•  WANofLANs•  Unreliablenetwork•  Flowcontrolatlowestlayer•  Clocksnotsynchronized•  Nopar77ons– CAPTheorem?

Page 18: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

FailureModel

•  Nodescrash•  Networkislossy•  Can’tdis7nguishdifference

Page 19: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Outline

•  Problem/Mo7va7on•  Solu7on(VirtualSynchrony)– Assump7ons

– CloseSynchrony– VirtualSynchrony

Page 20: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Outline

•  Problem/Mo7va7on•  Solu7on(VirtualSynchrony)– Assump7ons

– CloseSynchrony•  Model

•  Significance•  Issues

– VirtualSynchrony

Page 21: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Model

•  Events(allornothing)–  Internalcomputa7on

– Messagetransmission&delivery– Membershipchange

Page 22: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Model

•  Synchronousexecu7on

p

q

r

s

t

u

Ken’sSlides‐2006

Page 23: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Significance

•  Mul7castisalwaysreliable•  Membershipisalwaysconsistent

•  Totallyorderedmessagedelivery

•  State‐transferhappensinstantaneously•  FailureAtomicity– Mul7castisasingleevent

Page 24: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Issues

•  Discreteeventsimulator•  Isitprac7cal?•  Impossiblewithfailures

•  Veryexpensive– Systemprogressesinlock‐step– Limitedbyspeedofothermembers

Page 25: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Outline

•  Problem/Mo7va7on•  Solu7on(VirtualSynchrony)– Assump7ons

– CloseSynchrony– VirtualSynchrony

Page 26: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Outline•  VirtualSynchrony– AsynchronousExecu7on– VirtualSynchrony–  ISIS– Parallels– Benefits– Discussion

Page 27: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

AsynchronousExecu7on

•  Keytohighthroughputindistributedsystems•  Onlywaitforresponses(ortoofastsends)•  Communica7onchannel– Actsasapipeline– Notlimitedbylatency

•  NotpossiblewithCloseSynchrony!!

Page 28: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

AsynchronousExecu7on

p

q

r

s

t

u

Ken’sSlides‐2006

Page 29: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

VirtualSynchrony

•  CloseSynchrony+Asynchronous•  Indis7nguishabletoapplica7on•  So….whencansynchronousexecu7onberelaxed?

Page 30: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

ISIS

•  Communica7onFramework•  MembershipService

•  VSprimi7ves– ABCAST– CBCAST

Page 31: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

ISIS

•  Problem– CrashandLossyNetworkIndis3nguishable

•  Solu7on:– Membershiplist– Nonresponsiveorfailedmembersaredropped– Onlylistedmemberscanpar7cipate

– Re‐joinprotocol– DoesMembershipexistinalldistributedsystems?

Page 32: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

ISIS

•  AtomicBroadcast(ABCAST)•  Nomessagecanbedeliveredtoanyuserun7lallpreviousABCASTmessageshavebeendelivered

•  Costlytoimplement

•  …Butnoteveryoneneedssuchstrongguarantees

Page 33: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

ISIS

•  CausalAtomicBroadcast(CBCAST)•  Sufficientformostprogrammers

•  Concurrentmessagescommute

•  WeakerthanABCAST

Page 34: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

WhentouseCBCAST?

•  Whenanyconflic7ngmul7castsareuniquelyorderedalongasinglecausalchain

•  …..ThisisVirtualSynchrony

p

r

s

t1

2

3

4

5

1

2

Ken’sSlides‐2006

Eachthreadcorrespondstoadifferentlock

Page 35: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Parallels

•  Logical7me•  Replica7onindatabasesystems

•  Schneider’sstatemachineapproach

•  Parallelprocessorarchitectures•  Distributeddatabasesystems

Page 36: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Benefits

•  Assumeacloselysynchronousmodel•  Groupstateandstatetransfer•  Pipelinedcommunica7on(async)

•  Singleeventmodel

•  Failurehandling

Page 37: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Discussion

•  Par11ons•  Falseposi7ves– Mosthavethem,VSadmitsit

•  Falsenega7ves– Dependona7meout

Page 38: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Summary

•  Programmingindistributedsystemsishard•  CloseSynchronymakesiteasier– Coststoomuch

•  Takeasynchronouswhenyoucan•  VirtualSynchrony– Pipelined– Easytoreasonover

Page 39: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

UnderstandingtheLimita7onsofCausallyandTotallyOrderedCommunica7on

•  Authors– DavidCheriton

•  Stanford•  PhD–Waterloo

•  Billionaire– DaleSkeen

•  PhD–UCBerkeley•  3‐phasecommitprotocol

Page 40: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

TheflawsofCATOCS

•  Unrecognizedcausality•  Noseman3cordering

•  NoEfficiencyGain(overState‐levelTechniques)

•  NoScalability

Page 41: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

UnrecognizedCausality

•  Externalcommunica7onisunknown

p

q

r

s

Page 42: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

UnrecognizedCausality

•  Databaseisexternalen7ty

•  Causalrela7onexists,butCATOCSmissesit

Page 43: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

NoSeman7cOrdering

•  Serializa7on– Messagescan’tbe“grouptogether”

–  Implemen7ngeliminatesCATOCSneed

•  CausalMemory– Solu7on:state‐levellogicalclock

Page 44: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

NoEfficiencyGain

•  S7llneedstate‐leveltechniques•  Falsecausality– ReducesPerformance

–  IncreasedMemory

•  Messageoverhead

Page 45: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

NoEfficiencyGain

•  Whatifm2happenedtofollowm1,butwasnotcausallyrelated?

•  CATOCSwouldmakeFalseCausality

Page 46: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

NoScalability

•  ≈quadra7cgrowthofexpectedmessagebuffering

•  RebuHal:– Worstcase–  Imprac7calusecase

Page 47: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Summary

•  CATOCSsopwareisoverkill•  Communica7onsystemdoesn’tknoweverything

•  EverythingisbeHerattheapplica7onlevel

Page 48: Virtual Synchrony - cs.cornell.eduThe Process Group Approach to Reliable Distributed Compung • Ken Birman – Professor, Cornell University • ISIS

Conclusions

•  DistributedProgrammingishard•  CloseSynchrony– Toocostly

•  VirtualSynchrony– Limita7ons

•  VSnotperfectforallsitua7ons