CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University CS 555: D ISTRIBUTED S YSTEMS [R EPLICATION & C ONSISTENCY ] Shrideep Pallickara Computer Science Colorado State University CS555: Distributed Systems [Fall 2019] November 5, 2019 L21.1 Dept. Of Computer Science , Colorado State University Frequently asked questions from the previous class survey L21. 2 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L21.1 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA
CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University Topics covered in this lecture ¨ Replica Management ¨ Consistency protocols ¨ Primary based protocols ¨ Replicated write protocols L21. 3 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA R EPLICA M ANAGEMENT CS555: Distributed Systems [Fall 2019] November 5, 2019 L21.4 Dept. Of Computer Science , Colorado State University L21.2 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA
CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University Key issues in replication within a distributed system ¨ Placement of replicas ¤ When, where and by whom ¨ Placement of content ¨ Mechanisms to keep replicas consistent L21. 5 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA Replica-Server Placement ¨ K out of N possible locations ( K < N ) ¨ Optimization problem ¤ Computationally complex ¨ Solved only through heuristics L21. 6 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L21.3 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA
CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University Replica-Server placements: Distance between client and locations ¨ In terms of latency or bandwidth ¨ If k servers have been placed, there are N-k locations ¤ Select server one at a time ¤ Minimize average distance between server and its client L21. 7 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA Replica Server placements Use Internet topology ¨ Autonomous Systems ¤ Network in which all nodes run the same protocol ¤ About 20,000 AS ¨ Within an AS place server on router with largest NIC/links ¤ Recursively repeat for other AS L21. 8 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L21.4 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA
CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University Problems with these approaches ¨ Computing placements is expensive ¨ Does not work well with flash-crowds L21. 9 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA Arriving at quick replica placements ¨ Region/cell is a collection of nodes accessing the same content ¤ Inter-node latency is low ¨ Select most demanding regions ¤ With largest number of nodes ¤ One of the nodes acts as a replica L21. 10 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L21.5 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA
CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University Quick replica server placements ¨ Nodes are in an m -dimensional geometric space ¨ Identify K largest clusters ¤ Assign node from each cluster to host replica L21. 11 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA T YPES OF R EPLICAS CS555: Distributed Systems [Fall 2019] November 5, 2019 L21.12 Dept. Of Computer Science , Colorado State University L21.6 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA
CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University Types of Replicas Permanent Replicas Server-initiated Replicas Client initiated Replicas L21. 13 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA Permanent Replicas ¨ Initial set of replicas that comprise data store ¤ Usually a small set ¨ Files stored across servers at a single location ¤ Request forwarded using round-robin strategy ¨ Files copied to mirror sites ¤ Geographically dispersed L21. 14 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L21.7 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA
CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University Server initiated replicas ¨ Copies that exist to enhance performance ¨ Created at the initiative of the owner of data store L21. 15 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA Server initiated replicas: Example ¨ Web server in NYC ¤ Can handle dissemination loads effectively ¨ Bursts of traffic over 2-3 days may come in ¤ From some specific location (or set of locations) ¨ Install temporary replicas in regions where requests originate L21. 16 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L21.8 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA
CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University Server initiated replicas: Issues in dynamic replications ¨ Replication takes place to reduce load at server ¨ Specific files on server migrated/replicated to servers in proximity of requesting clients L21. 17 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA Dynamic replication: Migrating/replicating files ¨ Each server tracks access counts per file ¤ And also who initiates accesses ¨ Given a client C ¤ Each server can determine which of the servers is closest to C L21. 18 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L21.9 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA
CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University Counting access requests from clients: C1 and C2 share closest server P C1 Server P Without copy of F Server Q File F C2 • Accesses from C 1 , C 2 for file F at server Q are registered as if they are from P § count Q (P, F) L21. 19 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA Replication threshold: rep(S, F) ¨ Indicates number of requests for file is high ¨ Might be worth replicating it L21. 20 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L21.10 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA
CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University Deletion thresholds ¨ When requests for file F at server S drops below deletion threshold, del(S,F) ¤ File F removed from S ¨ Number of replicas reduce ¨ Higher loads at the other servers ¨ Ensure at least one copy of file continues to exist L21. 21 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA More on replication and deletion thresholds ¨ rep(S, F) always chosen to be higher than the del(S, F) ¨ If a number of requests lie between deletion and replication threshold ¤ File can only be migrated ¤ Number of replicas for file should be the same L21. 22 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L21.11 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA
CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University Reevaluating the placement of files at a server Q ¨ Check access count for each file ¨ If number of accesses < del(Q, F) ? ¤ File deleted unless it is the last copy ¨ For some server P , if count Q (P, F) is more than ½ of requests for F at Q ? ¤ Server P is requested to take over copy of F ¤ Migration L21. 23 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA Migration/replication of a file may not always succeed ¨ Server P might already be heavily overloaded ¨ Q will then attempt to replicate F elsewhere § Number of access > rep(Q, F) ¨ If count Q (R, F) exceeds a certain fraction of all requests for F at Q ¤ Try to replicate at R L21. 24 CS555: Distributed Systems [Fall 2019] November 5, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L21.12 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA
Recommend
More recommend