Replication. Consistency models. Replica placement Distribution protocols

Similar documents
Consistency and Replication. Why replicate?

Last Class: Consistency Models. Today: Implementation Issues

Consistency and Replication. Why replicate?

Computing Parable. The Archery Teacher. Courtesy: S. Keshav, U. Waterloo. Computer Science. Lecture 16, page 1

Today: World Wide Web! Traditional Web-Based Systems!

Consistency and Replication

Chapter 4: Distributed Systems: Replication and Consistency. Fall 2013 Jussi Kangasharju

Consistency and Replication. Some slides are from Prof. Jalal Y. Kawash at Univ. of Calgary

Replication and Consistency. Fall 2010 Jussi Kangasharju

Consistency and Replication

殷亚凤. Consistency and Replication. Distributed Systems [7]

DISTRIBUTED COMPUTER SYSTEMS

Important Lessons. A Distributed Algorithm (2) Today's Lecture - Replication

Today: World Wide Web

Today: World Wide Web. Traditional Web-Based Systems

Lecture 6 Consistency and Replication

Consistency and Replication

Consistency & Replication

Replication of Data. Data-Centric Consistency Models. Reliability vs. Availability

Distributed Systems: Consistency and Replication

Module 7 - Replication

CONSISTENCY IN DISTRIBUTED SYSTEMS

Replication in Distributed Systems

Consistency and Replication 1/62

Chapter 7 Consistency And Replication

Distributed Systems (5DV147)

Consistency and Replication 1/65

Consistency and Replication (part b)

Last Class: Web Caching. Today: More on Consistency

DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN. Chapter 7 Consistency And Replication

Data-Centric Consistency Models. The general organization of a logical data store, physically distributed and replicated across multiple processes.

Eventual Consistency. Eventual Consistency

CSE 5306 Distributed Systems. Consistency and Replication

Replication & Consistency Part II. CS403/534 Distributed Systems Erkay Savas Sabanci University

Distributed Systems Principles and Paradigms. Chapter 07: Consistency & Replication

Today CSCI Data Replication. Example: Distributed Shared Memory. Data Replication. Data Consistency. Instructor: Abhishek Chandra

Implementation Issues. Remote-Write Protocols

Replication and Consistency

Electronic Payment Systems (1) E-cash

Replication architecture

Module 7 File Systems & Replication CS755! 7-1!

CMSC Computer Architecture Lecture 15: Memory Consistency and Synchronization. Prof. Yanjing Li University of Chicago

Memory Consistency. Minsoo Ryu. Department of Computer Science and Engineering. Hanyang University. Real-Time Computing and Communications Lab.

CSE 5306 Distributed Systems

Replica Placement. Replica Placement

Time and distributed systems. Just use time stamps? Correct consistency model? Replication and Consistency

Computer Architecture

Distributed Systems. replication Johan Montelius ID2201. Distributed Systems ID2201

Important Lessons. Today's Lecture. Two Views of Distributed Systems

NFS: Naming indirection, abstraction. Abstraction, abstraction, abstraction! Network File Systems: Naming, cache control, consistency

COMP Parallel Computing. CC-NUMA (2) Memory Consistency

740: Computer Architecture Memory Consistency. Prof. Onur Mutlu Carnegie Mellon University

CS555: Distributed Systems [Fall 2017] Dept. Of Computer Science, Colorado State University

June Gerd Liefländer System Architecture Group Universität Karlsruhe, System Architecture Group

MYE017 Distributed Systems. Kostas Magoutis

Last Class:Consistency Semantics. Today: More on Consistency

PushyDB. Jeff Chan, Kenny Lam, Nils Molina, Oliver Song {jeffchan, kennylam, molina,

Distributed Systems. Characteristics of Distributed Systems. Lecture Notes 1 Basic Concepts. Operating Systems. Anand Tripathi

Distributed Systems. Characteristics of Distributed Systems. Characteristics of Distributed Systems. Goals in Distributed System Designs

Implementing caches. Example. Client. N. America. Client System + Caches. Asia. Client. Africa. Client. Client. Client. Client. Client.

Relaxed Memory-Consistency Models

Today: Fault Tolerance. Replica Management

Distributed Systems. Lec 11: Consistency Models. Slide acks: Jinyang Li, Robert Morris

Network File Systems

Distributed Systems. Fundamentals Shared Store. Fabienne Boyer Reprise du cours d Olivier Gruber. Université Joseph Fourier. Projet ERODS (LIG)

CSE 513: Distributed Systems (Distributed Shared Memory)

Applying Sequential Consistency to Web Caching

Distributed Systems. Lec 12: Consistency Models Sequential, Causal, and Eventual Consistency. Slide acks: Jinyang Li

GFS Overview. Design goals/priorities Design for big-data workloads Huge files, mostly appends, concurrency, huge bandwidth Design for failures

Cache Coherence in Distributed and Replicated Transactional Memory Systems. Technical Report RT/4/2009

Distributed Systems. Day 13: Distributed Transaction. To Be or Not to Be Distributed.. Transactions

Global atomicity. Such distributed atomicity is called global atomicity A protocol designed to enforce global atomicity is called commit protocol

CPS 512 midterm exam #1, 10/7/2016

Replications and Consensus

Distributed Systems. Lec 10: Distributed File Systems GFS. Slide acks: Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung

Parallel and Distributed Systems. Programming Models. Why Parallel or Distributed Computing? What is a parallel computer?

Overview: Memory Consistency

Consistency in Distributed Systems

CS Amazon Dynamo

Chapter 6: Distributed Systems: The Web. Fall 2012 Sini Ruohomaa Slides joint work with Jussi Kangasharju et al.

Large-Scale Key-Value Stores Eventual Consistency Marco Serafini

Advanced Distributed Systems

DISTRIBUTED SHARED MEMORY

Distributed Systems COMP 212. Revision 2 Othon Michail

Causal Consistency and Two-Phase Commit

Distributed Systems. 19. Spanner. Paul Krzyzanowski. Rutgers University. Fall 2017

Linearizability CMPT 401. Sequential Consistency. Passive Replication

Multiple-Writer Distributed Memory

IJMIE Volume 2, Issue 7 ISSN:

Presented By: Devarsh Patel

Department of Computer Science Institute for System Architecture, Chair for Computer Networks. Caching, Content Distribution and Load Balancing

EECS 498 Introduction to Distributed Systems

Distributed KIDS Labs 1

Modelling and Analysis of Push Caching

Distributed Systems (5DV020) Group communication. Fall Group communication. Fall Indirect communication

Maintaining Mutual Consistency for Cached Web Objects

Failure Models. Fault Tolerance. Failure Masking by Redundancy. Agreement in Faulty Systems

02 - Distributed Systems

Indirect Communication

02 - Distributed Systems

Transcription:

Replication Motivation Consistency models Data/Client-centric consistency models Replica placement Distribution protocols Invalidate versus updates Push versus Pull Cooperation between replicas Client-centric models Eventual consistency and Epidemic protocols Implementation issues (consistency protocols) Primary-based Replicated-write Cache-coherence 2

3

4

5

Benefits of replication:? Key issue:? 6

Approach 1: application is responsible for replication Application needs to handle consistency issues Pro:? Approach 2: system (middleware) handles replication Consistency issues are handled by the middleware Pro:? 7

Replication and caching used for system scalability Multiple copies: Improves performance by reducing access latency But higher network overheads of maintaining consistency Example: object is replicated N times Read frequency R, write frequency W If R<<W, high consistency overhead and wasted messages Consistency maintenance is itself an issue What semantics to provide? Tight consistency requires globally synchronized clocks! 8

Consistency model (aka consistency semantics) Contract between processes and the data store If processes obey certain rules, data store will work correctly All models attempt to return the results of the last write for a read operation Differ in how last write is determined/defined 9

Any read always returns the result of the most recent write. It implicitly assumes? 10

Sequential consistency: weaker than strict consistency Assumes all operations are executed in some sequential order and each process issues operations in program order Any valid interleaving is allowed All agree on the same interleaving Each proc preserves its program order Nothing is said about most recent write 11

Causally related writes must be seen by all processes in the same order Concurrent writes may be seen in different orders on different processes 14

Consistency Description Strict Linearizability Sequential Causal FIFO Consistency Weak Release Entry Absolute time ordering of all shared accesses matters. All processes must see all shared accesses in the same order. Accesses are furthermore ordered according to a (nonunique) global timestamp All processes see all shared accesses in the same order. Accesses are not ordered in time All processes see causally-related shared accesses in the same order. All processes see writes from each other in the order they were used. Writes from different processes may not always be seen in that order (a) Description Shared data can be counted on to be consistent only after a synchronization is done Shared data are made consistent when a critical region is exited Shared data pertaining to a critical region are made consistent when a critical region is entered. (b) Lecture 12 Page 17

Permanent replicas (mirroring) Server-initiated replicas (push caching) Client-initiated replicas (pull/client caching) 18

Example of the web to illustrate caching and replication issues Simpler model: clients are read-only, only server updates data browser request response Web server browser request response Web Proxy cache request response Web server 19

Web pages tend to be updated over time Some objects are static, others are dynamic Different update frequencies (few minutes to few weeks) How can a proxy cache maintain consistency of cached data? Send invalidate or update Push versus pull 20

Server tracks all proxies that have requested objects If a web page is modified, notify each proxy Notification types (1) invalidate (2) update How to decide between invalidate and updates? Pros and cons? Alternative approach:? proxy push Web server 21

proxy poll response Web server Proxy is entirely responsible for maintaining consistency Proxy periodically polls the server to see if object has changed Use if-modified-since HTTP messages Key question: when should a proxy poll? 23

Method 1: use a server assigned time-tolive (TTL) values Method 2: proxy can dynamically determine the refresh interval 24

Lease: duration of time for which server agrees to notify proxy of modification Server issues lease on first request and sends notification until expiry Need to renew lease upon expiry Efficiency depends on the lease duration Zero duration =>? Infinite leases =>? Get + lease req Client read Proxy Reply + lease Server Invalidate/update Lecture 12 Page 26

27