Help shape GoConqr. What should we add next?

Flashcards

Lecture 7 - Basics of replication

minal Kotwal Distributed systems English 17 cards

Replication: - Maintenance of on-line copies of data and resources

Cards in this deck (17)

  1. 1Replication: - Maintenance of on-line copies of data and resourcesMotivations of replication:
    - Performance enhancement: enhance service response times, eliminate single server bottleneck
    - Enhanced availability/reliability - client can access alternative services
    * needs failure independent components (server + communication links)
    * Availability of the system
    - Fault tolerance - can guarantee correct request processing, even though one or more of the servers fail
    Replication: - Maintenance of on-line copies of data and resources
  2. 2Replication examples: - Permanent replicas * Web mirroring: few replicas, statically configured * Distributed databases: cluster of servers that share nothing (disks or memory) - Dynamic replicas * Server-initiated replicas: replication infrastructure (servers) are in place. Initiating server optimises performance. Eg: sudden burst in web server queries coming from a region * Client-initiated replicas - client cacheReplication requirements
    - Replication transparency - clients are not aware of multiple physical copies
    - Consistency : different clients issuing the same request on the same (logical) data should get results which do not
    * Lead to inconsistencies
    * Break a constraint within a single application
  3. 3Fault tolerance: - System responds even in the presence in failures - Users cannot tell the difference between system with failures and without failures - Can lead to inconsistencies between replicas * Linearisability - virtual single image of replicated objects - An interleaved sequence of operations has the same result on replicated objects as on a single copy of the object - The order of the operations is consistent with the real times at which the events happened * Sequential consistency - similar to linearisability, but it has relaxed ordering constraint - The order of the operations is consistent on each individual copy of the object - Execution order of operations is the criterion, absolute time of executions is irrelevantdone
  4. 4Replica management - Asynchronous model * Client communicates with local server only * Control returns to client after local processing is finished * Servers communicate changes when convenient * Fast, has consistent problems - Servers process requests as they arrive - No total ordering - Clients may see different versions of the data due to delayed arrival of updatesReplica management - synchronous model
    * Requests are processed by all servers holding replicas
    * Control returns to client after all servers finished processing
    * Consistent, response time can be very slow
    - Requests are processed in the same order (totally ordered messages)
    - Maintains strict consistency
    - Extra costs of propagating new items and ordering them
  5. 5Replica management - Combined model: Trade-off between availability and consistency * Quorum-based schemes - Minimise communication costs - Some degree of concurrent processing - Some, but not all, replica managers contacted before control returns to client * Causality schemes - Some request may be processed in different orders at different replicas, if it does not lead to inconsistencies - Casual ordering of messagesPerformance issues
    * No performance loss with read-only data
    * High ratio of update (vs read) operations may allow fewer number of replicas
    * Efficient communication
    Process groups
    - Logical destinations for multicast messages
    - A set of replica managers constitutes a group
    - Membership is transparent to the sender
  6. 6Basic replication architecture:- Each client and each replica manager is a separate process
    - Replica manager
    * Process containing replicas + the operation on them
    * Maintains a physical copy of the (data) item
    * Can be server or application
    Front end
    - May be a separate process or included in client
    - Vehicle for transparency
    * Accepts client's requests
    * Communicated with (one or more) replica managers
    * May collate results of requests performed
    Basic replication architecture:
  7. 7Serial or serial equivalent processing of messages: - Only one message is processed at a time * If processed in parallel (multi-thread) the result should be the same - Data values depend only on their initial values and the operations applied to them - Order of requests processed * May effect correctness * Has additional processing (ordering) overheadMessage ordering
    - Total ordering
    * The order of 2 events is the same at every replica
    * If r1 and r2 are requests then
    - either r1 is processed before r2 at all replica managers
    - or r2 is processed before r1 at all replica managers
    Casual ordering
    - Happened before ordering
    - Potential casual relationships: information has flown between the 2 events (in form of messages or sequential actions)
    * If r1 'happened before' r2
    - then r1 is processed before r2 at all replica managers
    - Total order is not necessarily casual order
  8. 8—Implementing ordering:
    (Applicable to any multicast)
    * Hold-back queue: a message is not processed (held back) until ordering constraints can be met
    * Stable messages: all prior requests have been processed
    * Processing queue: Messages extracted in a FIFO order
    * Properties
    - Safety: no message is delivered out of order
    - Liveness: no message is kept in the hold-back queue indefinitely
    Implementing ordering: (Applicable to any multicast) * Hold-back queue: a message is not processed (held back) until ordering constraints...
  9. 9—Total ordering - centralised approach:
    Assigning totally ordered identifiers to requests
    * Independent sequencer assigns identifier
    * Steps:
    1. All requests are sent to the sequencer and to the RMs (multicast group members)
    2. Sequencer assigns consecutive increasing IDs and sends the IDs to the RMs
    3. Requests at the RMs are held back until they are next in sequence
    * Advantage: simple
    * Drawback: bottleneck, critical point of failure
    Total ordering - centralised approach: Assigning totally ordered identifiers to requests * Independent sequencer assigns identifier * Ste...
  10. 10—Total ordering - distributed approach
    * Advantages
    - Straightforward to implement
    - No bottleneck or single point of failure (for transmitting messages) : if an FE site fails, one of the other RM sites can take over coordination
    * Drawbacks
    - Expensive
    - The ordering is NOT casual: even if a multicast happened - before another, the messages are delivered in arbitrary total order
    Total ordering - distributed approach * Advantages - Straightforward to implement - No bottleneck or single point of failure (for transmi...
  11. 11—Casual ordering issues:
    - Problem - timestamps alone do not provide info about causality relationships between messages
    - Solution - vector timestamps
    * Version (timestamp)
    - Counter of update events on a particular replica
    - List of counters of an item (one for each replica
    - List of counters of an item (one for each replica): vector timestamp
    Casual ordering issues: - Problem - timestamps alone do not provide info about causality relationships between messages - Solution - vect...
  12. 12Logical time - Happened before relation (Potential causality) 1. a --> b a and b are events of the same process and a happened before b 2. send(message) --> receive(message) Always true 3. if a-->b, and b-->c, then a-->c '-->' relation is transitive - Concurrent events a || b if -->b and b--> aLogical clock algorithms
    - Logical clock: monotonically increasing software counter. It has no relationship with physical time
    Logical time - Happened before relation (Potential causality) 1. a --> b a and b are events of the same process and a happened before b 2...
  13. 13—
  14. 14—
  15. 15Timestamp and causality - Machine causality * Each FE reads from a version that is at least as advanced as the version which it last read - A new item should be added to a replica only when a replica already reflects all casually prior updtaesTimestamp and causality - Machine causality * Each FE reads from a version that is at least as advanced as the version which it last read...
  16. 16—
  17. 17—

Information

Description
Distributed systems Flashcards on Lecture 7 - Basics of replication, created by minal Kotwal on 25/10/2016.
Created by
minal Kotwal
Views
2
Rating

Feedback

What is it about?

What should we add next?