Last Class: Web Caching

Slides:



Advertisements
Similar presentations
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 7: Consistency 4/13/20151Distributed Systems - COMP 655.
Advertisements

Linearizability Linearizability is a correctness criterion for concurrent object (Herlihy & Wing ACM TOPLAS 1990). It provides the illusion that each operation.
Replication. Topics r Why Replication? r System Model r Consistency Models r One approach to consistency management and dealing with failures.
Consistency and Replication Chapter 7 Part II Replica Management & Consistency Protocols.
Consistency and Replication Chapter Topics Reasons for Replication Models of Consistency –Data-centric consistency models: strict, linearizable,
Consistency and Replication
1 CS 194: Lecture 8 Consistency and Replication Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer.
Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing1 Announcements.
Consistency and Replication Chapter 6. Object Replication (1) Organization of a distributed remote object shared by two different clients.
Consistency and Replication. Replication of data Why? To enhance reliability To improve performance in a large scale system Replicas must be consistent.
Distributed Systems1 Chapter 8: Replication and Consistency  Replication: A key to providing good performance, high availability and fault tolerance in.
Distributed Systems Fall 2010 Replication Fall 20105DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Computer Science Lecture 14, page 1 CS677: Distributed OS Consistency and Replication Today: –Introduction –Consistency models Data-centric consistency.
Computer Science Lecture 16, page 1 CS677: Distributed OS Last Class: Web Caching Use web caching as an illustrative example Distribution protocols –Invalidate.
CS 582 / CMPE 481 Distributed Systems
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Last Class: Weak Consistency
Computer Science Lecture 14, page 1 CS677: Distributed OS Consistency and Replication Introduction Consistency models –Data-centric consistency models.
G Robert Grimm New York University Bayou: A Weakly Connected Replicated Storage System.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Client-Centric.
Computer Science Lecture 16, page 1 CS677: Distributed OS Last Class:Consistency Semantics Consistency models –Data-centric consistency models –Client-centric.
University of Pennsylvania 11/21/00CSE 3801 Distributed File Systems CSE 380 Lecture Note 14 Insup Lee.
Multicast Communication Multicast is the delivery of a message to a group of receivers simultaneously in a single transmission from the source – The source.
Consistency and Replication Chapter 7
Epidemic Algorithms for replicated Database maintenance Alan Demers et al Xerox Palo Alto Research Center, PODC 87 Presented by: Harshit Dokania.
1 6.4 Distribution Protocols Different ways of propagating/distributing updates to replicas, independent of the consistency model. First design issue.
Mobility in Distributed Computing With Special Emphasis on Data Mobility.
Consistency And Replication
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Consistency.
Consistency and Replication Chapter 6. Release Consistency (1) A valid event sequence for release consistency. Use acquire/release operations to denote.
Consistency and Replication. Replication of data Why? To enhance reliability To improve performance in a large scale system Replicas must be consistent.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Outline Introduction (what’s it all about) Data-centric consistency Client-centric consistency Replica management Consistency protocols.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Consistency.
Distributed Systems CS Consistency and Replication – Part IV Lecture 21, Nov 10, 2014 Mohammad Hammoud.
Distributed File Systems
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Consistency and Replication Chapter 6. Topics Reasons for Replication Models of Consistency –Data-centric consistency models –Client-centric consistency.
12/17/2015Distributed Systems - Comp 6551 Consistency and Replication The problems we are trying to solve Types of consistency Approaches to propagation.
Distributed Systems CS Consistency and Replication – Part IV Lecture 13, Oct 23, 2013 Mohammad Hammoud.
Client-Centric Consistency Models
Hwajung Lee.  Improves reliability  Improves availability ( What good is a reliable system if it is not available?)  Replication must be transparent.
Consistency and Replication Chapter 6 Presenter: Yang Jie RTMM Lab Kyung Hee University.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Mobility Victoria Krafft CS /25/05. General Idea People and their machines move around Machines want to share data Networks and machines fail Network.
CS6320 – Performance L. Grewe.
Nomadic File Systems Uri Moszkowicz 05/02/02.
Distributed Systems – Paxos
Lecturer : Dr. Pavle Mogin
6.4 Data and File Replication
Gossip-based Data Dissemination
Consistency and Replication
Chapter 7: Consistency & Replication IV - REPLICATION MANAGEMENT -Sumanth Kandagatla Instructor: Prof. Yanqing Zhang Advanced Operating Systems (CSC 8320)
CSE 486/586 Distributed Systems Consistency --- 3
Consistency Models.
EECS 498 Introduction to Distributed Systems Fall 2017
Outline Midterm results summary Distributed file systems – continued
Linearizability Linearizability is a correctness criterion for concurrent object (Herlihy & Wing ACM TOPLAS 1990). It provides the illusion that each operation.
Consistency and Replication
Replication Improves reliability Improves availability
EECS 498 Introduction to Distributed Systems Fall 2017
Consistency and Replication
Distributed Systems CS
Ch 5 Replication and Consistency
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Distributed Systems CS
Replica Placement Model: We consider objects (and don’t worry whether they contain just data or code, or both) Distinguish different processes: A process.
Outline Review of Quiz #1 Distributed File Systems 4/20/2019 COP5611.
CSE 486/586 Distributed Systems Consistency --- 3
Presentation transcript:

Last Class: Web Caching Use web caching as an illustrative example Distribution protocols Invalidate versus updates Push versus Pull Cooperation between replicas CS677: Distributed OS

Today: More on Consistency Eventual consistency and Epidemic protocols Consistency protocols Primary-based Replicated-write Putting it all together Final thoughts CS677: Distributed OS

Eventual Consistency Many systems: one or few processes perform updates How frequently should these updates be made available to other read-only processes? Examples: DNS: single naming authority per domain Only naming authority allowed updates (no write-write conflicts) How should read-write conflicts (consistency) be addressed? NIS: user information database in Unix systems Only sys-admins update database, users only read data Only user updates are changes to password CS677: Distributed OS

Eventual Consistency Assume a replicated database with few updaters and many readers Eventual consistency: in absence of updates, all replicas converge towards identical copies Only requirement: an update should eventually propagate to all replicas Cheap to implement: no or infrequent write-write conflicts Things work fine so long as user accesses same replica What if they don’t: CS677: Distributed OS

Client-centric Consistency Models Assume read operations by a single process P at two different local copies of the same data store Four different consistency semantics Monotonic reads Once read, subsequent reads on that data items return same or more recent values Monotonic writes A write must be propagated to all replicas before a successive write by the same process Resembles FIFO consistency (writes from same process are processed in same order) Read your writes: read(x) always returns write(x) by that process Writes follow reads: write(x) following read(x) will take place on same or more recent version of x CS677: Distributed OS

Epidemic Protocols Used in Bayou system from Xerox PARC Bayou: weakly connected replicas Useful in mobile computing (mobile laptops) Useful in wide area distributed databases (weak connectivity) Based on theory of epidemics (spreading infectious diseases) Upon an update, try to “infect” other replicas as quickly as possible Pair-wise exchange of updates (like pair-wise spreading of a disease) Terminology: Infective store: store with an update it is willing to spread Susceptible store: store that is not yet updates Many algorithms possible to spread updates CS677: Distributed OS

Spreading an Epidemic Anti-entropy Rumor mongering (aka gossiping) Server P picks a server Q at random and exchanges updates Three possibilities: only push, only pull, both push and pull Claim: A pure push-based approach does not help spread updates quickly (Why?) Pull or initial push with pull work better Rumor mongering (aka gossiping) Upon receiving an update, P tries to push to Q If Q already received the update, stop spreading with prob 1/k Analogous to “hot” gossip items => stop spreading if “cold” Does not guarantee that all replicas receive updates Chances of staying susceptible: s= e-(k+1)(1-s) CS677: Distributed OS

Removing Data Deletion of data items is hard in epidemic protocols Example: server deletes data item x No state information is preserved Can’t distinguish between a deleted copy and no copy! CS677: Distributed OS

Implementation Issues Two techniques to implement consistency models Primary-based protocols Assume a primary replica for each data item Primary responsible for coordinating all writes Replicated write protocols No primary is assumed for a data item Writes can take place at any replica CS677: Distributed OS

Remote-Write Protocols Traditionally used in client-server systems CS677: Distributed OS

Remote-Write Protocols (2) Primary-backup protocol Allow local reads, sent writes to primary Block on write until all replicas are notified Implements sequential consistency CS677: Distributed OS

Local-Write Protocols (1) Primary-based local-write protocol in which a single copy is migrated between processes. Limitation: need to track the primary for each data item CS677: Distributed OS

Local-Write Protocols (2) Primary-backup protocol in which the primary migrates to the process wanting to perform an update CS677: Distributed OS

Replicated-write Protocols Relax the assumption of one primary No primary, any replica is allowed to update Consistency is more complex to achieve Quorum-based protocols Use voting to request/acquire permissions from replicas Consider a file replicated on N servers Update: contact at least (N/2+1) servers and get them to agree to do update (associate version number with file) Read: contact majority of servers and obtain version number If majority of servers agree on a version number, read CS677: Distributed OS

Gifford’s Quorum-Based Protocol Three examples of the voting algorithm: A correct choice of read and write set A choice that may lead to write-write conflicts A correct choice, known as ROWA (read one, write all) CS677: Distributed OS

Final Thoughts Replication and caching improve performance in distributed systems Consistency of replicated data is crucial Many consistency semantics (models) possible Need to pick appropriate model depending on the application Example: web caching: weak consistency is OK since humans are tolerant to stale information (can reload browser) Implementation overheads and complexity grows if stronger guarantees are desired CS677: Distributed OS