Unit-7 Consistency and Replication
7.1 Introduction
7.2 Data-centric consistency models
7.3 Client-centric consistency models
7.4 Replica management
7.5 Consistency protocols
7.6 Cashing and replication in Web
Replication for improving performance
//Replication = sub replication
Replication for High-availability
Replication for Enhancing Scalability
Replication for securing Against Malicious Attacks
- If the minority of the servers that hold the data are malicious the non-malicious servers
can outvote the malicious servers, thus provide security.
Number of servers with correct data outvote the faulty servers.
Why consistency?
- In DS with replicated data, one of the main problems is keeping data consistent.
What is consistency and replication explain in detail?
Consistency Methods
-Data Centric Consistency Method
-Client Centric Consistency Method
Introduction to Consistency and Replication
In a distributed system, shared data is typically stored in distributed shared memory,
distributed databases or distributed file system.
- The storage can be divided across multiple computers.
- Simply, we refer to a series of such data storage units as data-stores.
Multiple processes can access shared data by accessing any replica on the data-store.
- Processes generally perform read and write operations on the replicas.
Types of consistency model
Consistency models can be divided into two types:
Data-Centric Consistency Models
- These models define how the data updates are propagated across the replicas to keep
them consistent.
Client-Centric Consistency Model
- These models assume that clients connect to different replicas at each time.
- The models ensure that whenever a client connects to a replica the replica is bought up to
date with the replica that the client accessed previously.
Data-centric Consistency Models
Data-centric Consistency Models describe how the replicated data is kept consistent and what
the process can expect.
Consistency Specification Models:
Models for consistent
Consistency Specification Models
Consistency Specification Models enable measuring and specifying the level of inconsistency in
replicated data-store.
Types of Ordering
We will study three types of ordering of message that meet the needs of different applications:
1. Total ordering
2. Sequential Ordering
i. Sequential Consistency model
3. Casual Ordering
i. Causal Consistency model
Casual relation between two events
- If a and b two events a and b such that a happened before b or a -> b ,
Replica Management
Replica management describes where, when and by whom replicas should be replaced.
There are two problems/challenges they are:-
- Replica – server placement
Decides the best locations to place the replica server that can host data stores
- Content replication and placement
Finds the best server for placing the content
Types of content replication and placement
-permanent replicas
-server initiated replicas client
-client initiated replicas
Permanent replicas
-Initial sets of replicas that constitute the distributed data storage / data replicas
-Typically small in number
There are two types of permanent replicas:-
-Primary servers
-One or more servers in an organization
-Whenever a request arrives, it is forwarded into one of the primary servers
-Mirror sites
-Geographically spread and replicas are generally statically configured
-Server Initiated Replicas
Third parties owner/providers
-Client initiated replicas
-Client initiated replicas are known as client cache
-Client cache are used only to reduce the access latency of data
For example browser casing locally
Consistency protocol
A consistency protocol describes the implementation of a specific consistency model
there are three consistency model we are going to study they are:-
-Primary based protocol
One primary coordinator is elected to control replication across multiple replicas
-Replicated write protocols
Multiple replicas coordinate to provide consistency guarantee
-Cache coherence protocol
A special cache of client controlled replications.
Important question
Fully explain consistency model and briefly explain what is replication?