/
CHUBBY CHUBBY

CHUBBY - PowerPoint Presentation

debby-jeon
debby-jeon . @debby-jeon
Follow
398 views
Uploaded On 2015-11-07

CHUBBY - PPT Presentation

and PAXOS Sergio Bernales 1 Dennis Kafura CS5204 Operating Systems Overview Chubby Why How More precise how Paxos Why How More precise why Dennis Kafura CS5204 Operating Systems ID: 185717

systems operating kafura dennis operating systems dennis kafura cs5204 proposal number request chosen acceptors prepare accept acceptor accepted clients

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "CHUBBY" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

CHUBBYandPAXOS

Sergio Bernales

1

Dennis Kafura – CS5204 – Operating SystemsSlide2

OverviewChubbyWhy?

How?More precise howPaxosWhy?How?More precise why

Dennis

Kafura

– CS5204 – Operating Systems

2Slide3

10 – 30,000 ClientsDifferent client servicesWho is in charge?

Guarantee it?What if you go down?i.e. DNS Server

Dennis Kafura – CS5204 – Operating Systems

3Slide4

Service RequirementsEasy for client developers (of the variety kind)Reliable and Available

Master is clear –hint, hint PaxosThousands of clients, tiny thingsGrowing clients = growing transactions

Dennis Kafura – CS5204 – Operating Systems

4Slide5

ChubbyCoarse-grained lock service

CachingEvent NotificationAccess Control Lists/ls/foo/wombat/pouch

Dennis Kafura – CS5204 – Operating Systems

5Slide6

System Structure

Dennis Kafura – CS5204 – Operating Systems

6

Cache: data, metadata, absent file, handles

(invalidated when data is changed)Slide7

Files, Directories, Handles/ls

/foo/wombat/pouchACLControls: reading, writing, ACL changesACL authentication in RPCMeta-data of node (64 bits entries)

Dennis Kafura – CS5204 – Operating Systems

7

Instance

Number

Content generation number

Lock generation

ACL generationSlide8

SequencerSequence numbers provided only for interactionc

that use locksRequest sequencerName of lockAcquisition mode (exclusive, shared)Lock generation numberLock delay

Dennis Kafura – CS5204 – Operating Systems

8Slide9

API (1 of 2)Open(/

ls/foo/wombat/pouch )*Close()Poison()GetContentAndStats()

getStat()ReadDir()SetContents

()

Compare and swap

Delete()

Acquire(),

TryAcquire

(), Release()

Dennis Kafura – CS5204 – Operating Systems

9Slide10

API (2 of 2)GetSequencer()

SetSequencer()CheckSequencer()

Dennis Kafura – CS5204 – Operating Systems

10Slide11

Sessions Keeps locks activeData consistent

Survives failuresKeepAlivesMost calls are KeepAlives

Dennis Kafura – CS5204 – Operating Systems

11Slide12

EventsSubcribe to

Contents modifiedChild node addedChubby master failHandle has become invalidLock acquired

Conflicting lock request

Dennis Kafura – CS5204 – Operating Systems

12Slide13

EfficiencyAtomic operationsNo

current directoriesNo last access timesProxiesKeepAlive

replies used to transmit events and cache invalidations

Dennis Kafura – CS5204 – Operating Systems

13Slide14

Back to the DNS ServerChubby cachesChubby batches

Don’t use as fileserver Do use for config files, elect masters

Dennis Kafura – CS5204 – Operating Systems

14Slide15

Master Fail - Over

Dennis Kafura – CS5204 – Operating Systems

15Slide16

Recover

Pick a new client epoch number(sent by clients)Master responds to master location requestsRebuilds session memory

strucutureKeepAlives allowed

Notifies clients of failure

Master waits sessions syncs

Fully operational

While operating, handles are verified

Ephemeral files removed

Dennis Kafura – CS5204 – Operating Systems

16Slide17

Intro PaxosA consensus algorithm

Only a value that has been proposed may be chosenOnly a single value is chosenUnless value actually chosen, process don’t learn about it

If someone disagrees, no one has agreed

Dennis Kafura – CS5204 – Operating Systems

17Slide18

PaxosProposers, Acceptors, Learners

Multiples of eachSystem assumes failureData never corrupted

Dennis Kafura – CS5204 – Operating Systems

18Slide19

Choosing a ValueP1- An acceptor must accept the first proposal it receives

ProblemSeveral values proposed, none chosenPossible to accept multipleA solution: number proposals

Dennis Kafura – CS5204 – Operating Systems

19Slide20

Choosing a ValueP2- If a proposal with value

v is chosen, then every higher numbered proposal that is chosen has value vP2a- If a proposal with value v is chosen, then every higher accepted by any proposer has value

vP2b- If a proposal with value v

is chosen, then every higher accepted by any proposer has value

v

Dennis Kafura – CS5204 – Operating Systems

20Slide21

Choosing a ValueP2c- For any v

and n, if a proposal with value v and number n is issued, then there is a set S consisting of a majority of acceptors such that either (a) no acceptor in S has accepted any proposal numbered less than

n, or (b) v is the value of the highest-numbered proposal among all proposals numbered less than n accepted by the acceptors in S

P1a- An acceptor can accept a proposal,

iff

if has not

reponded

to a

prepare

request having a number greater than

n

Dennis Kafura – CS5204 – Operating Systems

21Slide22

AlgorithmPhase 1

Proposer selects proposal number n and sends prepare request to majority of acceptors

If acceptor receives request number n greater than that of any other prepare request it has accepted, it sends back promise not to accept any more and also it’s last

n

Phase 2

Proposer receives prepare request form majority of acceptors, then sends the proposal number

n

plus the actual value

v

If acceptor receives

accept

request for proposal

n,

accepts it only if it has not responded to another

prepare

request.

Dennis Kafura – CS5204 – Operating Systems

22Slide23

Learn a Chosen ValueChosen value propagatedAll acceptors send messages to learners

Distinguished learner gets the message, passes it onDistinguished learnerSLearner ask acceptors

Distinguished Acceptors

Dennis Kafura – CS5204 – Operating Systems

23