Evaluating Data Freshness in Large Scale Replicated Databases
Asynchronous Replication of Databases
1. Survey Paper - UCE15
Asynchronous Replication of
Databases in Large Scale
State Of The Art
Master's Degree in Computer Engineering
University of Minho
2. Survey Paper - UCE15
Agenda
Introduction
Consistency Criteria
Asynchronous Replication
Replication in Large Scale and Data Freshness
MySQL
Conclusions
Master's Degree in Computer Engineering
University of Minho
3. Survey Paper - UCE15
Introduction
Master's Degree in Computer Engineering
University of Minho
4. Survey Paper - UCE15
Introduction
Why replicate data?
Master's Degree in Computer Engineering
University of Minho
5. Survey Paper - UCE15
Introduction
Why replicate data?
Fault-Tolerance
Master's Degree in Computer Engineering
University of Minho
6. Survey Paper - UCE15
Introduction
Why replicate data?
Fault-Tolerance
Performance
Master's Degree in Computer Engineering
University of Minho
7. Survey Paper - UCE15
Introduction
Why replicate data?
Fault-Tolerance
Performance
Master's Degree in Computer Engineering
University of Minho
8. Survey Paper - UCE15
Introduction
Why replicate data?
Fault-Tolerance
Performance
However...
Master's Degree in Computer Engineering
University of Minho
9. Survey Paper - UCE15
Introduction
Why replicate data?
Fault-Tolerance
Performance
However...
Introduces a constant trade-off between consistency and
performance
Master's Degree in Computer Engineering
University of Minho
10. Survey Paper - UCE15
Introduction
Why replicate data?
Fault-Tolerance
Performance
However...
Introduces a constant trade-off between consistency and
performance
Need to use adequate replication mechanisms / protocols
Master's Degree in Computer Engineering
University of Minho
11. Survey Paper - UCE15
Introduction
Master's Degree in Computer Engineering
University of Minho
12. Survey Paper - UCE15
Introduction
Classification of replication protocols:
Master's Degree in Computer Engineering
University of Minho
13. Survey Paper - UCE15
Introduction
Classification of replication protocols:
When can updates be performed:
Master's Degree in Computer Engineering
University of Minho
14. Survey Paper - UCE15
Introduction
Classification of replication protocols:
When can updates be performed:
Who can perform updates:
Master's Degree in Computer Engineering
University of Minho
15. Survey Paper - UCE15
Introduction
Classification of replication protocols:
When can updates be performed:
- Lazy (also know as asynchronous)
- Eager (also know as synchronous)
Who can perform updates:
Master's Degree in Computer Engineering
University of Minho
16. Survey Paper - UCE15
Introduction
Classification of replication protocols:
When can updates be performed:
- Lazy (also know as asynchronous)
- Eager (also know as synchronous)
Who can perform updates:
- Primary copy
- Update-everywhere
Master's Degree in Computer Engineering
University of Minho
17. Survey Paper - UCE15
Consistency Criteria
Master's Degree in Computer Engineering
University of Minho
18. Survey Paper - UCE15
Consistency Criteria
Key issue, since replication is a solution to achieve fault-tolerance
Master's Degree in Computer Engineering
University of Minho
19. Survey Paper - UCE15
Consistency Criteria
Key issue, since replication is a solution to achieve fault-tolerance
Correct behaviour in a replicated system must ensure linearizability
(also know as one copy equivalence):
Master's Degree in Computer Engineering
University of Minho
20. Survey Paper - UCE15
Consistency Criteria
Key issue, since replication is a solution to achieve fault-tolerance
Correct behaviour in a replicated system must ensure linearizability
(also know as one copy equivalence):
‣ Gives the illusion that a replicated database system is single
Master's Degree in Computer Engineering
University of Minho
21. Survey Paper - UCE15
Consistency Criteria
Key issue, since replication is a solution to achieve fault-tolerance
Correct behaviour in a replicated system must ensure linearizability
(also know as one copy equivalence):
‣ Gives the illusion that a replicated database system is single
‣ Maintain order
Master's Degree in Computer Engineering
University of Minho
22. Survey Paper - UCE15
Consistency Criteria
Key issue, since replication is a solution to achieve fault-tolerance
Correct behaviour in a replicated system must ensure linearizability
(also know as one copy equivalence):
‣ Gives the illusion that a replicated database system is single
‣ Maintain order
‣ Atomicity
Master's Degree in Computer Engineering
University of Minho
23. Survey Paper - UCE15
Consistency Criteria
Other Criteria:
Increasing popularity of Snapshot Isolation (SI)
Strong Serializability
Strong Session 1SR
Master's Degree in Computer Engineering
University of Minho
24. Survey Paper - UCE15
Asynchronous Replication
Master's Degree in Computer Engineering
University of Minho
25. Survey Paper - UCE15
Asynchronous Replication
Lazy schemes update replicas using separate transactions
Master's Degree in Computer Engineering
University of Minho
26. Survey Paper - UCE15
Asynchronous Replication
Lazy schemes update replicas using separate transactions
Due to the complexity and performance of eager replication, there is
a wide spectrum of lazy schemes
Master's Degree in Computer Engineering
University of Minho
27. Survey Paper - UCE15
Asynchronous Replication
Lazy schemes update replicas using separate transactions
Due to the complexity and performance of eager replication, there is
a wide spectrum of lazy schemes
Lazy Replication Models:
Master's Degree in Computer Engineering
University of Minho
28. Survey Paper - UCE15
Asynchronous Replication
Lazy schemes update replicas using separate transactions
Due to the complexity and performance of eager replication, there is
a wide spectrum of lazy schemes
Lazy Replication Models:
Primary copy
Master's Degree in Computer Engineering
University of Minho
29. Survey Paper - UCE15
Asynchronous Replication
Lazy schemes update replicas using separate transactions
Due to the complexity and performance of eager replication, there is
a wide spectrum of lazy schemes
Lazy Replication Models:
Primary copy
Update-everywhere
Master's Degree in Computer Engineering
University of Minho
30. Survey Paper - UCE15
Replication in Large Scale and Data
Freshness
Master's Degree in Computer Engineering
University of Minho
31. Survey Paper - UCE15
Replication in Large Scale and Data
Freshness
Current techniques have attained some degree of scalability,
however there are two main limitations:
Master's Degree in Computer Engineering
University of Minho
32. Survey Paper - UCE15
Replication in Large Scale and Data
Freshness
Current techniques have attained some degree of scalability,
however there are two main limitations:
Most solutions adopt a full replication model
Master's Degree in Computer Engineering
University of Minho
33. Survey Paper - UCE15
Replication in Large Scale and Data
Freshness
Current techniques have attained some degree of scalability,
however there are two main limitations:
Most solutions adopt a full replication model
➡ Coordination overhead
Master's Degree in Computer Engineering
University of Minho
34. Survey Paper - UCE15
Replication in Large Scale and Data
Freshness
Current techniques have attained some degree of scalability,
however there are two main limitations:
Most solutions adopt a full replication model
➡ Coordination overhead
Most solutions rely on 1-copy-serializability
Master's Degree in Computer Engineering
University of Minho
35. Survey Paper - UCE15
Replication in Large Scale and Data
Freshness
Current techniques have attained some degree of scalability,
however there are two main limitations:
Most solutions adopt a full replication model
➡ Coordination overhead
Most solutions rely on 1-copy-serializability
➡ Limits concurrency
Master's Degree in Computer Engineering
University of Minho
36. Survey Paper - UCE15
Replication in Large Scale and Data
Freshness
Current techniques have attained some degree of scalability,
however there are two main limitations:
Most solutions adopt a full replication model
➡ Coordination overhead
Most solutions rely on 1-copy-serializability
➡ Limits concurrency
➡ Limits scalability of the system
Master's Degree in Computer Engineering
University of Minho
37. Survey Paper - UCE15
Replication in Large Scale and Data
Freshness
Master's Degree in Computer Engineering
University of Minho
38. Survey Paper - UCE15
Replication in Large Scale and Data
Freshness
Although serializability is guaranteed on lazy replication system with
concurrency control techniques and consistency criterion, these
techniques do not provide data freshness guarantees:
Master's Degree in Computer Engineering
University of Minho
39. Survey Paper - UCE15
Replication in Large Scale and Data
Freshness
Transactions may see stale data
They may be serialized in an order different from the one in
which they were submitted
Master's Degree in Computer Engineering
University of Minho
40. Survey Paper - UCE15
MySQL
Master's Degree in Computer Engineering
University of Minho
41. Survey Paper - UCE15
MySQL
MySQL implements asynchronous master-slave replication
Master's Degree in Computer Engineering
University of Minho
42. Survey Paper - UCE15
MySQL
MySQL implements asynchronous master-slave replication
Uses the primary-copy replication method, supporting two formats
of replication:
Master's Degree in Computer Engineering
University of Minho
43. Survey Paper - UCE15
MySQL
MySQL implements asynchronous master-slave replication
Uses the primary-copy replication method, supporting two formats
of replication:
Statement-based
Master's Degree in Computer Engineering
University of Minho
44. Survey Paper - UCE15
MySQL
MySQL implements asynchronous master-slave replication
Uses the primary-copy replication method, supporting two formats
of replication:
Statement-based
Row-based
Master's Degree in Computer Engineering
University of Minho
45. Survey Paper - UCE15
MySQL
Replication topologies:
Master's Degree in Computer Engineering
University of Minho
46. Survey Paper - UCE15
MySQL
Replication topologies:
Master and Multiple Slaves
Master's Degree in Computer Engineering
University of Minho
47. Survey Paper - UCE15
MySQL
Replication topologies:
Master and Multiple Slaves Ring
Master's Degree in Computer Engineering
University of Minho
48. Survey Paper - UCE15
MySQL
Replication topologies:
Master and Multiple Slaves Ring Tree
Master's Degree in Computer Engineering
University of Minho
49. Survey Paper - UCE15
Conclusions
Master's Degree in Computer Engineering
University of Minho
50. Survey Paper - UCE15
Conclusions
Eager protocols are not appropriate for large scale systems
Master's Degree in Computer Engineering
University of Minho
51. Survey Paper - UCE15
Conclusions
Eager protocols are not appropriate for large scale systems
Lazy protocols have better performance, but inconsistencies among copies may occur
Master's Degree in Computer Engineering
University of Minho
52. Survey Paper - UCE15
Conclusions
Eager protocols are not appropriate for large scale systems
Lazy protocols have better performance, but inconsistencies among copies may occur
Primary-copy approach introduces a single point of failure, but simplifies replica control
Master's Degree in Computer Engineering
University of Minho
53. Survey Paper - UCE15
Conclusions
Eager protocols are not appropriate for large scale systems
Lazy protocols have better performance, but inconsistencies among copies may occur
Primary-copy approach introduces a single point of failure, but simplifies replica control
Update-everywhere method speeds up data access but makes replica coordination more
complex and expensive
Master's Degree in Computer Engineering
University of Minho
54. Survey Paper - UCE15
Conclusions
Eager protocols are not appropriate for large scale systems
Lazy protocols have better performance, but inconsistencies among copies may occur
Primary-copy approach introduces a single point of failure, but simplifies replica control
Update-everywhere method speeds up data access but makes replica coordination more
complex and expensive
1-copy serializability limits concurrency and thus scalability of the system
Master's Degree in Computer Engineering
University of Minho
55. Survey Paper - UCE15
Conclusions
Eager protocols are not appropriate for large scale systems
Lazy protocols have better performance, but inconsistencies among copies may occur
Primary-copy approach introduces a single point of failure, but simplifies replica control
Update-everywhere method speeds up data access but makes replica coordination more
complex and expensive
1-copy serializability limits concurrency and thus scalability of the system
Concurrency control techniques and consistency criterion in lazy replication systems do not
provide data freshness
Master's Degree in Computer Engineering
University of Minho
56. Survey Paper - UCE15
Conclusions
Eager protocols are not appropriate for large scale systems
Lazy protocols have better performance, but inconsistencies among copies may occur
Primary-copy approach introduces a single point of failure, but simplifies replica control
Update-everywhere method speeds up data access but makes replica coordination more
complex and expensive
1-copy serializability limits concurrency and thus scalability of the system
Concurrency control techniques and consistency criterion in lazy replication systems do not
provide data freshness
Some consistency techniques to improve data freshness emerged, but have a trade-off
between consistency and performance
Master's Degree in Computer Engineering
University of Minho