Understanding Replication in Databases and Distributed Systems

Download Report

Transcript Understanding Replication in Databases and Distributed Systems

Database Replication Techniques:
A Three Parameter Classification
M. Wiesmann F. Pedone A. Schiper
Swiss Federal Institute of Technology – Lausanne
B. Kemme G. Alonso
Swiss Federal Institute of Technology – Zürich
http://lsewww.epfl.ch/~dragon/
Understanding Replication in Database & Distributed Systems
SRDS’00 - 1
Background - Dragon Project
 Joint research project between Zürich and Lausanne
 Cooperation between Database people (Zürich) and Distributed
System people (Lausanne)
 Common Interest  Replicated Databases
 Goal:
 build synergy between both communities.
 Results:
 Understanding the other community.
 New Replication algorithms & techniques.
 Exploring Replication Techniques  this paper.
Understanding Replication in Database & Distributed Systems
SRDS’00 - 2
Replicated Database
 One Logical Database
Replica 3
Replica 2
 Network connects Replicas
Replica 1
 N logical replicas
Logical DB
Network
 All replica are synchronous
(eager replication)
Clients
 Clients connect to the logical Database.
 Replicas processes transactions (ACID properties)
Understanding Replication in Database & Distributed Systems
SRDS’00 - 3
Database Replication Techniques
Eager vs. Lazy
 Two ways to replicate a database: eager & lazy
 Eager
Replica are kept coherent
 Lazy
Replica might diverge (violates ACID)
 Eager is traditionally considered too costly [Gray 96]
 Search more efficient eager replication.
 Systematically explore solution space
 Classification
Understanding Replication in Database & Distributed Systems
SRDS’00 - 4
Classification
Replica 3
 [Wiesmann & All ERSADS’99]
Replica 2
 Many Classifications tentatives
Replica 1
Logical DB
Network
 Classification must:
 Be applicable for all considered techniques
 Group together techniques with same communication patterns
 Group together techniques with similar network load.
Clients
 Permits to:
 Systematically Explore Parameter Space
 Find out requirements for each Element in Parameter Space
 3 Orthogonal Criterion
 Server Architecture, Server Interaction, Transaction Termination
Understanding Replication in Database & Distributed Systems
SRDS’00 - 5
Parameter 
Server Architecture
 Reflects the way the replica are organized in the System.
 Where clients send their requests.
Primary Copy
Update Everywhere
Understanding Replication in Database & Distributed Systems
SRDS’00 - 6
Parameter 
Server Interaction
 Represents the traffic generated for one transaction
Constant number of interactions
O(1)
Linear number of interactions
O(n)
n = number of operations
Understanding Replication in Database & Distributed Systems
SRDS’00 - 7
Parameter 
Transaction Termination
 Determines how the outcome of transaction is decided:
Voting
There is atomic commitment phase
Non-Voting
There is no atomic commitment phase
Understanding Replication in Database & Distributed Systems
SRDS’00 - 8
The Classification
Understanding Replication in Database & Distributed Systems
SRDS’00 - 9
Requirements for Each Class
 Each class contains many replication techniques
 Each class implies some requirements:
 On the communication primitives (order,reliability uniformity)
 On the database system (determinism)
 A few Examples:
 Present the general protocol for three classes
Understanding Replication in Database & Distributed Systems
SRDS’00 - 10
Non Voting – Constant Interaction – Primary
Copy
 “Cold Standby” Primary Copy
 Typical Commercial configuration [Gray 93 Transaction Processing…]
 Needs FIFO Broadcast
 Cold Standby (back-up might not have applied changes)
 1 Safe - 2 Safe with certain constraints on the communication primitives
Understanding Replication in Database & Distributed Systems
SRDS’00 - 11
Update Everywhere – Linear Interactions –
Voting
 Classical form of replication
 Read One Write All technique [Bernstein 87
 Each Operation is Sent to All replicas
 The Transaction is terminated by 2PC
Concurency Control…]
Understanding Replication in Database & Distributed Systems
SRDS’00 - 12
Update Everywhere – Non Voting – Constant
Interaction
Active
Replication
Certification
Based
Replication




Needs a known determinism point.
Needs total order broadcast.
If the dp at the start
 Active Replication [Schneider 90 ACM Survey]
If the dp after start
 Certification based replication
[Kemme & all ICDCS’ 98 - Pedone & all EuroPar 98]
 If the dp in the middle
 Possible - never proposed.
Understanding Replication in Database & Distributed Systems
SRDS’00 - 13
The Issue of Determinism
 How do we express the constraints on
the server?
 One important issue determinism.
 We needs something more than a
boolean.
Trans act ion
Start
Start Start
op1
op2
Trans act ion
End
Start Start
opn opn+1
 Notion of Determinism Point (dp).
 Execution from this point is
deterministic.
Understanding Replication in Database & Distributed Systems
Determinis m Point
SRDS’00 - 14
Conclusion
 Classification helps:




Explore Solution Space.
Understand the relation between existing techniques.
Understand the requirements for communication and database system.
Give Basis for comparing the techniques (for instance by simulation).
 A case for eager replication
 Lazy replication usually compared to expensive eager replication.
 Should be compared to comparable eager replications.
 Non-voting - Update everywhere techniques are very promising.
Understanding Replication in Database & Distributed Systems
SRDS’00 - 15