REPLICATION
REPLICATION
INTRODUCTION
EXAMPLES OF REPLICATION EXAMPLES
RELATIONS TO OTHER DISTRIBUTED SYSTEM TOPICS
REASONS FOR REPLICATION
OBJECT REPLICATION
REPLICATION AS SCALING TECHNIQUE
FAULT TOLERANT SERVICE
HIGH AVAILABILITY SERVICE
TRANSACTION WITH REPLICATED DATA
RELATIONS TO OTHER DISTRIBUTED SYSTEM
TOPICS
Fault Tolerance-the idea of multiple chain of nodes with same data in cases of
one node being down then the other nodes deal with demand for resources.
Concurrency-distribution of nodes to clients when they are requesting the
same resources e. g bids in auction , forex-trading
Scalability-more integration of nodes or components into the existing system
or patching.
Security-write operations such as transactions needs to be locked when such
transactions are occurring so that consistency is met.
Intercommunication processes-asynchronous activity
Latency-delays of message transportation.
Other designing principles for a distributed systems.
INTRODUCTION
Failover—in node or replica failures other replica can take over ensuring
service remain operational. Clients can be ,directed to available replicas.
Data durability-having multiple sources of data copies reduces the risk
of losing data due to hardware failures , network failures or other
localized failures.
Load balancing-when one node is becoming overwhelmed due to sudden
change of demand then the load is distributed among the remaining
replica.
Geographical redundancy-additional fault tolerance in issues such as
natural disasters.
Fast Recovery-system recoveries rather than considering data backups
to restore services implying downtimes are minimum for efficient
High Availability Services
High Available Services refer to systems designed to provide continuous
and uninterrupted access to services, even in the presence of failures or
disruptions.
The goal is to minimize downtime and ensure that services remain
accessible and accessible and operational for users.
Techniques to achieve HA
Redundancy: Involves replicating data across multiple nodes or
machines. Redundancy ensures that the system remains available even
in the event of failures.
Load Balancing: Load balancing distributes the workload evenly across
multiple replicas, helping prevent any replica from becoming
overwhelmed with requests, improving performance and resource
utilization.
Failover and Failback: Failover is the process of switching to a backup
replica when the primary fails. Failback is the process of returning to the
primary replica after it has recovered. These mechanism ensure the
system can quickly recover from failures and restore normal operations.
TRANSACTION WITH REPLICATED
DATA
Replication Schemes
the effect of transactions on replicated objects should be the same as if they had
been performed one at a time on a single set of objects.
this property is called one-copy serializability.
Each write operation sets a write lock at each replica manager e.g.fx trading
Each read sets a read lock at one replica manager
This happens in a multi-master replication
The idea is that each server must act as if its only server writing to the database
and other servers just reading from the server and every update to database
must be replicated to all other servers before being committed with algorithms
such as Two-phase commit.
Changes are not immediately visible to other servers but such is written in log
files which act as record of change.
Two phase commit
Method of achieving one-copy serializability in multi-master replication.
It has 2 procedures such as prepare and commit phase.
Prepare phase-a server wanting to make change to database sends a message to
other servers for positive acknowledgement which then proceed to commit phase.
Commit phase-server initiating the change sends a commit message to other
servers and change will be considered complete if all other servers received the
commit message and responded with positive acknowledgement.
Available copies with validation
Each server keep track number of copies of the database that are currently
available .
If a change have been requested then number of copies are checked to see if
they are enough and if they are not change is delayed till the copies are enough.
This is to ensure data consistency
And is based on quorum factor
Quorum consensus
Consensus is more to say in agreement based on cohesion
It ensures that all servers has same view of database.
A server keeps track of other servers it has communicated with and uses
this information to come up with a quorum which is a minimum number
of servers that must agree to set of updates before they can be applied
to database.
If agreement is not reach servers continue to communicate with each
other till agreement is met.
Virtual Partition
All about nodes reaching consensus in events of virtual partitions
Virtual partitions are bottlenecks whereby servers in involved will not be
reaching consensus even connected to the network .
In succinct we are saying communication loss due to misconfigurations .
* Paxos Algorithm
Case study # forex trading