Distributed Systems Fall 2011 Gossip and highly available services.

Slides:



Advertisements
Similar presentations
Replication. Topics r Why Replication? r System Model r Consistency Models r One approach to consistency management and dealing with failures.
Advertisements

CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Consistency Steve Ko Computer Sciences and Engineering University at Buffalo.
Replication Management. Motivations for Replication Performance enhancement Increased availability Fault tolerance.
Consistency and Replication (3). Topics Consistency protocols.
1 Linearizability (p566) the strictest criterion for a replication system  The correctness criteria for replicated objects are defined by referring to.
DISTRIBUTED SYSTEMS II REPLICATION –QUORUM CONSENSUS Prof Philippas Tsigas Distributed Computing and Systems Research Group.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Consistency Steve Ko Computer Sciences and Engineering University at Buffalo.
Distributed Systems Fall 2010 Replication Fall 20105DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Scaling Distributed Machine Learning with the BASED ON THE PAPER AND PRESENTATION: SCALING DISTRIBUTED MACHINE LEARNING WITH THE PARAMETER SERVER – GOOGLE,
CS 582 / CMPE 481 Distributed Systems Fault Tolerance.
Group Communications Group communication: one source process sending a message to a group of processes: Destination is a group rather than a single process.
CS 582 / CMPE 481 Distributed Systems
CS 582 / CMPE 481 Distributed Systems Replication.
2/23/2009CS50901 Implementing Fault-Tolerant Services Using the State Machine Approach: A Tutorial Fred B. Schneider Presenter: Aly Farahat.
© Chinese University, CSE Dept. Distributed Systems / Distributed Systems Topic 9: Time, Coordination and Replication Dr. Michael R. Lyu Computer.
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Peer-to-Peer in the Datacenter: Amazon Dynamo Aaron Blankstein COS 461: Computer Networks Lectures: MW 10-10:50am in Architecture N101
Fault Tolerance via the State Machine Replication Approach Favian Contreras.
Exercises for Chapter 2: System models
Replication ( ) by Ramya Balakumar
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 18: Replication.
Slides for Chapter 14: Replication From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley 2001.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Replication with View Synchronous Group Communication Steve Ko Computer Sciences and Engineering.
DISTRIBUTED SYSTEMS II REPLICATION CNT. Prof Philippas Tsigas Distributed Computing and Systems Research Group.
Exercises for Chapter 18: Replication From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley 2001.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Gossiping Steve Ko Computer Sciences and Engineering University at Buffalo.
Chapter 6.5 Distributed File Systems Summary Junfei Wen Fall 2013.
DISTRIBUTED SYSTEMS II REPLICATION Prof Philippas Tsigas Distributed Computing and Systems Research Group.
IM NTU Distributed Information Systems 2004 Replication Management -- 1 Replication Management Yih-Kuen Tsay Dept. of Information Management National Taiwan.
Architecture Models. Readings r Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 m Note: All figures from this book.
1 Highly available services  we discuss the application of replication techniques to make services highly available. –we aim to give clients access to.
Replication (1). Topics r Why Replication? r System Model r Consistency Models – How do we reason about the consistency of the “global state”? m Data-centric.
DISTRIBUTED SYSTEMS II REPLICATION Prof Philippas Tsigas Distributed Computing and Systems Research Group.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Fault Tolerant Services
1 Distribuerede systemer og sikkerhed – 21. marts 2002 zFrom Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design zEdition 3, © Addison-Wesley.
Replication (1). Topics r Why Replication? r System Model r Consistency Models r One approach to consistency management and dealing with failures.
D u k e S y s t e m s Asynchronous Replicated State Machines (Causal Multicast and All That) Jeff Chase Duke University.
Exercises for Chapter 15: COORDINATION AND AGREEMENT From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Consistency Steve Ko Computer Sciences and Engineering University at Buffalo.
Replication and Group Communication. Management of Replicated Data FE Requests and replies C Replica C Service Clients Front ends managers RM FE RM Instructor’s.
Hwajung Lee.  Improves reliability  Improves availability ( What good is a reliable system if it is not available?)  Replication must be transparent.
Providing High Availability Using Lazy Replication Rivaka Ladin, Barbara Liskov, Liuba Shrira, Sanjay Ghemawat Presented by Huang-Ming Huang.
Replication Improves reliability Improves availability ( What good is a reliable system if it is not available?) Replication must be transparent and create.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Replication Steve Ko Computer Sciences and Engineering University at Buffalo.
Exercises for Chapter 2: System models From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson Education 2005.
Lecture 13: Replication Haibin Zhu, PhD. Assistant Professor Department of Computer Science Nipissing University © 2002.
Highly Available Services and Transactions with Replicated Data Jason Lenthe.
Fault Tolerance (2). Topics r Reliable Group Communication.
PERFORMANCE MANAGEMENT IMPROVING PERFORMANCE TECHNIQUES Network management system 1.
Distributed Computing Systems Replication Dr. Sunny Jeong. Mr. Colin Zhang With Thanks to Prof. G. Coulouris,
Replication Chapter Katherine Dawicki. Motivations Performance enhancement Increased availability Fault Tolerance.
Exercises for Chapter 14: Replication
Exercises for Chapter 11: COORDINATION AND AGREEMENT
Distributed Systems – Paxos
Consistency and Replication
Replication and Consistency
Replication and Consistency
Distributed systems II Replication Cnt.
Replication Improves reliability Improves availability
Active replication for fault tolerance
Fault-Tolerant State Machine Replication
Slides for Chapter 15: Replication
B. Ramamurthy Based on Paper by Werner Vogels and Chris Re
Slides for Chapter 18: Replication
Lecture 21: Replication Control
CSE 486/586 Distributed Systems Consistency --- 2
Network management system
Replication and Consistency
Presentation transcript:

Distributed Systems Fall 2011 Gossip and highly available services

…sometimes, good enough and on time is better than waiting for perfection…

3 Outline Quality of Service (QoS) vs. High availability Gossip –Basic concept –Architecture Cloud computing

Quality of Service Quality of Service means different things depending on context –Low number of crashes / high uptime –Messages delivered in ”reasonable” time (e.g. live streaming data) –Many more interpretations Service Level Agreement Compensation for broken SLAs –E.g. accounting in Grids / Clouds 4

High availability Uptime does not imply availability! Some level of service is better than none We do not always need replicas with either sequential consistency / linearizability properties –“Fresh enough” rather than “the freshest” Many modern (huge) systems have similar requirements 5

Quick refresher Sequential consistency –Interleaving of operations performed (as if) on a single copy of the object –Consistent with program order of the invoking client (as opposed to real time in linearizability) 6

Gossip Framework, Architecture, and/or Protocol “Lazy” synchronization between replica managers –Eventual consistency Very fault-tolerant –Crashes are OK –Clients contact any replica manager for any operation –Clients keep track of their own state 7

Basic ideas of Gossip Consistent service over time –Provide clients with newer data than they have observed so far –Clients can work with different replicas for each operation Relaxed inter-replica consistency –Not generally sequential consistency 8

Basic ideas contd. Update operations –Change some value in the system –Accepted immediately (carried out later) Query operations –Reads value(s) from the system –Blocks until replica manager is able to respond to client –Needs fresh enough data to respond 9

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Figure 15.6 Query and update operations in a gossip service Service Query Val FE RM Query, prev Val,new Update FE Update, prev Update id Clients gossip

Message ordering Causal update ordering Forced (total and causal) Immediate –Applied in consistent order relative to any other update at all replica managers, regardless of ordering for the other update Tradeoff: consistency vs. cost –Causal is cheap and easy –Causal order for queries to a single RM 11

Message ordering example Discussion forum (bulletin board) Causal order for discussion threads –Preserves conversation structures Forced order for registration –Clear order of who joined when Immediate for unregistering –No messages sent to ex-subscriber 12

Front ends Much more intelligent than during active/passive replication! Clients always use front ends –Even for inter-client messages (allows causally related messages and information dissemination) 13

Queries Client state (vector-clock) included in the call The RM returns values that are at least as recent as the client state –If the state of the client is more recent than the RM, the RM will either request the missing messages or wait for them. 14

Updates Causal order Each have unique identifiers Client state is included in the call to support message orderings Updates are never blocking, only enqueued Due to the ordering guarantees, a client can update (or query) any RM and get the same result 15

Replication phases Request –Normally FE sends to single RM (use more for higher fault tolerance) Update response Coordination –Apply updates once ordering allows –No explicit coordination: only Gossip messages required Execution Query response Agreement –Lazy: can wait and send update batches 16

Front end timestamp FE embeds own vector clock with each message Update –RM infers order relative to others Queries –RM returns oldest possible data: FE has (2,4,6) and RM (2,5,5) RM updates own state to (2,5,6) and returns state at (2,5,5) 17

Front end timestamps contd. Clients can communicate with each other –Causes causal relationship between messages –Lets FEs update their vector timestamps so that future queries to Gossip service will give more updated data 18

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Figure 15.8 A gossip replica manager, showing its main state components Other replicamanagers Replica timestamp Update log Value timestamp Value Executed operation table Stable updates Updates Gossip messages FE Replica timestamp Replica log OperationIDUpdate Prev FE Replica manager Timestamp table

Gossiping The architecture does not specify when and with which peers to gossip Delay depends on: –Frequency and duration of partitions –Frequency of gossip-exchanges (application dependant) –Peer-selection policy Random Deterministic Topological 20

Advanced Gossiping In some applications (think Facebook), replication can be geographically biased Read-only RMs close to clients can improve scalability a lot for read intensive applications 21

Facebook and Gossip Inbox search problem: 25TB of data Facebook solution: Cassandra –Similar to Distributed Hash-Tables, more about these during next lecture –Conceptually, a hash-table with N-replicas using lazy updates to share data Facebook uses algorithms similar to Gossip for failure handling. –If a node in DHT crashes, the event is propagated to the other replicas 22

Cloud computing Servers and tasks are run inside virtual machines –Virtual machines can be moved and placed dynamically –A master image is used to start new copies of virtual machines –Elasticity: virtual machines are added or removed depending on certain system conditions A simple example follows 23

24 InterSweep Inc.

25 InterSweep Inc.

26 InterSweep Inc.

27 Next lecture Beyond client-server –Peer to peer (P2P) –BitTorrent –Hybrid systems Distributed Hash-Tables Distributed Computing –BOINC