CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Gossiping Steve Ko Computer Sciences and Engineering University at Buffalo.

Slides:



Advertisements
Similar presentations
CS 425 / ECE 428 Distributed Systems Fall 2014 Indranil Gupta (Indy)
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.
Dynamo: Amazon's Highly Available Key-value Store Distributed Storage Systems CS presented by: Hussam Abu-Libdeh.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Byzantine Fault Tolerance Steve Ko Computer Sciences and Engineering University at Buffalo.
Consistency and Replication (3). Topics Consistency protocols.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Replication Steve Ko Computer Sciences and Engineering University at Buffalo.
DISTRIBUTED SYSTEMS II REPLICATION CNT. II 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.
CS542: Topics in Distributed Systems
Database Replication techniques: a Three Parameter Classification Authors : Database Replication techniques: a Three Parameter Classification Authors :
CS 582 / CMPE 481 Distributed Systems
CS 142 Lecture Notes: DatacentersSlide 1 Google Datacenter.
Distributed Systems Fall 2011 Gossip and highly available services.
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Distributed File Systems Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Case Study: Amazon Dynamo Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Mid-Semester Overview Steve Ko Computer Sciences and Engineering University at Buffalo.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
CSE 486/586 CSE 486/586 Distributed Systems Case Study: Amazon Dynamo Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Replication with View Synchronous Group Communication Steve Ko Computer Sciences and Engineering.
CSE 486/586 CSE 486/586 Distributed Systems Concurrency Control Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Concurrency Control Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Gossiping Steve Ko Computer Sciences and Engineering University at Buffalo.
IM NTU Distributed Information Systems 2004 Replication Management -- 1 Replication Management Yih-Kuen Tsay Dept. of Information Management National Taiwan.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Replication Steve Ko Computer Sciences and Engineering University at Buffalo.
CS542: Topics in Distributed Systems Replication.
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.
CSE 486/586 CSE 486/586 Distributed Systems Consistency Steve Ko Computer Sciences and Engineering University at Buffalo.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Fault Tolerant Services
Chapter 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University Building Dependable Distributed Systems.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Consistency Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 486/586 Distributed Systems Consistency --- 3
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Replication Steve Ko Computer Sciences and Engineering University at Buffalo.
Lecture 13: Replication Haibin Zhu, PhD. Assistant Professor Department of Computer Science Nipissing University © 2002.
CSE 486/586 CSE 486/586 Distributed Systems Consistency Steve Ko Computer Sciences and Engineering University at Buffalo.
Highly Available Services and Transactions with Replicated Data Jason Lenthe.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Transactions on Replicated Data Steve Ko Computer Sciences and Engineering University at Buffalo.
Lecture 19-1 Computer Science 425 Distributed Systems CS 425 / ECE 428 Fall 2013 Indranil Gupta (Indy) October 29, 2013 Lecture 19 Gossiping Reading: Section.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Paxos Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 486/586 CSE 486/586 Distributed Systems Gossiping Steve Ko Computer Sciences and Engineering University at Buffalo.
Lecture 19-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2012 Indranil Gupta (Indy) October 30, 2012 Lecture 19 Gossiping.
Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2011 Gossiping Reading: Section 15.4 / 18.4  2011, N. Borisov, I. Gupta, K. Nahrtstedt,
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Paxos Steve Ko Computer Sciences and Engineering University at Buffalo.
Distributed Computing Systems Replication Dr. Sunny Jeong. Mr. Colin Zhang With Thanks to Prof. G. Coulouris,
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Consistency Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 486/586 Distributed Systems Gossiping
CSE 486/586 Distributed Systems Consistency --- 2
CSE 486/586 Distributed Systems Case Study: Amazon Dynamo
CSE 486/586 Distributed Systems Consistency --- 2
CSE 486/586 Distributed Systems Consistency --- 1
CS 425 / ECE 428 Distributed Systems Fall 2017 Indranil Gupta (Indy)
湖南大学-信息科学与工程学院-计算机与科学系
CSE 486/586 Distributed Systems Consistency --- 3
CSE 486/586 Distributed Systems Consistency --- 1
Active replication for fault tolerance
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
CSE 486/586 Distributed Systems Concurrency Control --- 3
Last Class: Web Caching
EEC 688/788 Secure and Dependable Computing
CSE 486/586 Distributed Systems Consistency --- 2
CSE 486/586 Distributed Systems Consistency --- 3
CS 425 / ECE 428 Distributed Systems Fall 2018 Indranil Gupta (Indy)
CSE 486/586 Distributed Systems Consistency --- 1
CSE 486/586 Distributed Systems Case Study: Amazon Dynamo
CSE 486/586 Distributed Systems Concurrency Control --- 3
Presentation transcript:

CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Gossiping Steve Ko Computer Sciences and Engineering University at Buffalo

CSE 486/586, Spring 2012 Recap Available copies replication? –Read and write proceed with live replicas –Cannot achieve one-copy serialization itself –Local validation can be used Quorum approach? –Proposed to deal with network partitioning –Don’t require everyone to participate –Have a read quorum & a write quorum Pessimistic quorum vs. optimistic quorum? –Pessimistic quorum only allows one partition to proceed –Optimistic quorum allows multiple partitions to proceed Static quorum? –Pessimistic quorum View-based quorum? –Optimistic quorum 2

CSE 486/586, Spring 2012 CAP Theorem Consistency Availability –Respond with a reasonable delay Partition tolerance –Even if the network gets partitioned Choose two! Brewer conjectured in 2000, then proven by Gilbert and Lynch in

CSE 486/586, Spring 2012 Problem with Scale (Google Data) ~0.5 overheating (power down most machines in <5 mins, ~1-2 days to recover) ~1 PDU failure (~ machines suddenly disappear, ~6 hours to come back) ~1 rack-move (plenty of warning, ~ machines powered down, ~6 hours) ~1 network rewiring (rolling ~5% of machines down over 2-day span) ~20 rack failures (40-80 machines instantly disappear, 1-6 hours to get back) ~5 racks go wonky (40-80 machines see 50% packet loss) ~8 network maintenances (4 might cause ~30-minute random connectivity losses) ~12 router reloads (takes out DNS and external vips for a couple minutes) ~3 router failures (have to immediately pull traffic for an hour) ~dozens of minor 30-second blips for DNS ~1000 individual machine failures ~thousands of hard drive failures 4

CSE 486/586, Spring 2012 Problem with Latency Users expect desktop-quality responsiveness. Amazon: every 100ms of latency cost them 1% in sales. Google: an extra.5 seconds in search page generation time dropped traffic by 20%. “Users really respond to speed” – Google VP Marissa Mayer 5

CSE 486/586, Spring 2012 Coping with CAP 6 ConsistencyAvailability Partition Tolerance E.g., view-synchronous updates E.g., 2PC, static quorum Eventual consistency (e.g., Optimistic quorum) Eventual consistency (e.g., Optimistic quorum)

CSE 486/586, Spring 2012 Coping with CAP The main issue is scale. –As the system size grows, network partitioning becomes inevitable. –You do not want to stop serving requests because of network partitioning. –Giving up partition tolerance means giving up scale. Then the choice is either giving up availability or consistency Giving up availability and retaining consistency –E.g., use 2PC or static quorum –Your system blocks until everything becomes consistent. –Probably cannot satisfy customers well enough. Giving up consistency and retaining availability –Eventual consistency 7

CSE 486/586, Spring 2012 Eventual Consistency There are some inconsistent states the system goes though temporarily. Lots of new systems choose partition tolerance and availability over consistency. –Amazon, Facebook, eBay, Twitter, etc. Not as bad as it sounds… –If you have enough in stock, keeping how many left exactly every moment is not necessary (as long as you can get the right number eventually). –Online credit card histories don’t exactly reflect real-time usage. –Facebook updates can show up to some, but not to the other for some period of time. 8

CSE 486/586, Spring 2012 Required: Conflict Resolution Concurrent updates during partitions will cause conflicts – E.g., scheduling a meeting under the same time – E.g., concurrent modifications of the same file Conflicts must be resolved, either automatically or manually – E.g., file merge – E.g., priorities – E.g., kick it back to human The system must decide: what kind of conflicts are OK & how to minimize them 9

CSE 486/586, Spring 2012 BASE Basically Available Soft-state Eventually consistent Counterpart to ACID Proposed by Brewer et al. Aims high-availability and high-performance rather than consistency and isolation “best-effort” to consistency Harder for programmers –When accessing data, it’s possible that the data is inconsistent! 10

CSE 486/586, Spring 2012 CSE 486/586 Administrivia Project 2 has been released on the course website. –Simple DHT based on Chord –Please, please start right away! –Deadline: 4/13 2:59PM Great feedback so far online. Please participate! 11

CSE 486/586, Spring 2012 Recall: Passive Replication Request Communication: the request is issued to the primary RM and carries a unique request id. Coordination: Primary takes requests atomically, in order, checks id (resends response if not new id.) Execution: Primary executes & stores the response Agreement: If update, primary sends updated state/result, req-id and response to all backup RMs (1-phase commit enough). Response: primary sends result to the front end 12 Client Front End RM Client Front End RM primary Backup ….

CSE 486/586, Spring 2012 Recall: Active Replication 13 Request Communication: The request contains a unique identifier and is multicast to all by a reliable totally-ordered multicast. Coordination: Group communication ensures that requests are delivered to each RM in the same order (but may be at different physical times!). Execution: Each replica executes the request. (Correct replicas return same result since they are running the same program, i.e., they are replicated protocols or replicated state machines) Agreement: No agreement phase is needed, because of multicast delivery semantics of requests Response: Each replica sends response directly to FE Client Front End RM Client Front End RM ….

CSE 486/586, Spring 2012 Eager vs. Lazy Eager replication, e.g., B-multicast, R-multicast, etc. (previously in the course) –Multicast request to all RMs immediately in active replication –Multicast results to all RMs immediately in passive replication Alternative: Lazy replication –Allow replicas to converge eventually and lazily –Propagate updates and queries lazily, e.g., when network bandwidth available –FEs need to wait for reply from only one RM –Allow other RMs to be disconnected/unavailable –May provide weaker consistency than sequential consistency, but improves performance Lazy replication can be provided by using the gossiping 14

CSE 486/586, Spring 2012 Revisiting Multicast 15 Distributed Group of “Nodes”= “Nodes”=Processes at Internet- based hosts Node with a piece of information to be communicated to everyone

CSE 486/586, Spring 2012 Fault-Tolerance and Scalability 16 Multicast sender Multicast Protocol Nodes may crash Nodes may crash Packets may Packets may be dropped be dropped Possibly Possibly 1000’s of nodes X X

CSE 486/586, Spring 2012 B-Multicast 17 UDP/TCP packets Simplest Simplest implementation implementation Problems? Problems?

CSE 486/586, Spring 2012 R-Multicast 18 UDP/TCP packets Stronger guarantees Stronger guarantees Overhead is Overhead is quadratic in N

CSE 486/586, Spring 2012 Any Other? E.g., tree-based multicast 19 UDP/TCP packets e.g., IPmulticast, SRM e.g., IPmulticast, SRM RMTP, TRAM,TMTP RMTP, TRAM,TMTP Tree setup Tree setup and maintenance and maintenance Problems? Problems?

CSE 486/586, Spring 2012 Another Approach 20 Multicast sender

CSE 486/586, Spring 2012 Another Approach 21 Gossip messages (UDP) Periodically, transmit to b random targets

CSE 486/586, Spring 2012 Another Approach 22 Other nodes do same after receiving multicast Gossip messages (UDP)

CSE 486/586, Spring 2012 Another Approach 23

CSE 486/586, Spring 2012 Uninfected Uninfected “Gossip” (or “Epidemic”) Multicast 24 Protocol rounds (local clock) Protocol rounds (local clock) b random targets per round b random targets per round Infected Infected Gossip Message (UDP)

CSE 486/586, Spring 2012 Properties Lightweight Quick spread Highly fault-tolerant Analysis from old mathematical branch of Epidemiology [Bailey 75] Parameters c,b: –c for determining rounds: (c*log(n)), b: # of nodes to contact –Can be small numbers independent of n, e.g., c=2; b=2; Within c*log(n) rounds, [ low latency ] –all but of nodes receive the multicast [reliability] –each node has transmitted no more than c*b*log(n) gossip messages [lightweight] 25

CSE 486/586, Spring 2012 Fault-Tolerance Packet loss –50% packet loss: analyze with b replaced with b/2 –To achieve same reliability as 0% packet loss, takes twice as many rounds Node failure –50% of nodes fail: analyze with n replaced with n/2 and b replaced with b/2 –Same as above 26

CSE 486/586, Spring 2012 Fault-Tolerance With failures, is it possible that the epidemic might die out quickly? Possible, but improbable: –Once a few nodes are infected, with high probability, the epidemic will not die out –So the analysis we saw in the previous slides is actually behavior with high probability [Galey and Dani 98] The same applicable to: –Rumors –Infectious diseases –A worm such as Blaster Some implementations –Amazon Web Services EC2/S3 (rumored) –Usenet NNTP (Network News Transport Protocol) 27

CSE 486/586, Spring 2012 Gossiping Architecture The RMs exchange “gossip” messages –Periodically and amongst each other. –Gossip messages convey updates they have each received from clients, and serve to achieve convergence of all RMs. Objective: provisioning of highly available service. Guarantee: –Each client obtains a consistent service over time: in response to a query, an RM may have to wait until it receives “required” updates from other RMs. The RM then provides client with data that at least reflects the updates that the client has observed so far. –Relaxed consistency among replicas: RMs may be inconsistent at any given point of time. Yet all RMs eventually receive all updates and they apply updates with ordering guarantees. Can be used to provide sequential consistency. 28

CSE 486/586, Spring 2012 Gossip Architecture 29 QueryVal FE RM Query, prevVal,new Update FE Update, prevUpdate id Service Clients gossip

CSE 486/586, Spring 2012 Summary CAP Theorem –Consistency, Availability, Partition Tolerance –Pick two Eventual consistency –A system might go through some inconsistent states temporarily Eager replication vs. lazy replication –Lazy replication propagates updates in the background Gossiping –One strategy for lazy replication –High-level of fault-tolerance & quick spread 30

CSE 486/586, Spring Acknowledgements These slides contain material developed and copyrighted by Indranil Gupta (UIUC).