d ynamo g oogle f ile s ystem
play

[D YNAMO & G OOGLE F ILE S YSTEM ] Shrideep Pallickara Computer - PDF document

CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University CS 555: D ISTRIBUTED S YSTEMS [D YNAMO & G OOGLE F ILE S YSTEM ] Shrideep Pallickara Computer Science Colorado State University CS555: Distributed


  1. CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University CS 555: D ISTRIBUTED S YSTEMS [D YNAMO & G OOGLE F ILE S YSTEM ] Shrideep Pallickara Computer Science Colorado State University CS555: Distributed Systems [Fall 2019] November 14, 2019 L24.1 Dept. Of Computer Science , Colorado State University Frequently asked questions from the previous class survey ¨ Are there entries for each virtual node (and the range it manages) in the zero-hop DHT? L24. 2 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L24.1 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA

  2. CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University Topics covered in this lecture ¨ Dynamo ¤ Quorums and consistency ¨ Google File System L24. 3 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA D YNAMO Q UORUMS AND C ONSISTENCY CS555: Distributed Systems [Fall 2019] November 14, 2019 L24.4 Dept. Of Computer Science , Colorado State University L24.2 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA

  3. CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University A client must specify which version it is updating ¨ Pass context from an earlier read operation ¤ Context contains vector clock information ¨ Requests with branches that cannot be reconciled? ¤ Returns all objects with versioning info in context ¤ Update done using this context reconciles and collapses all branches L24. 5 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA Execution of get() and put() operations ¨ Read and write operations involve the first N healthy nodes ¨ During failures, nodes lower in priority are accessed L24. 6 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L24.3 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA

  4. CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University To maintain consistency, Dynamo uses a quorum protocol ¨ Uses configurable settings for replicas that must participate in ¤ Reads ¤ Writes L24. 7 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA Quorum-based protocols: When there are N replicas ¨ Read quorum N R ¨ To modify a file write-quorum N W ¨ N R + N W > N ¤ Prevent read-write conflict ¨ N W > N/2 ¤ Prevent write-write conflict L24. 8 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L24.4 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA

  5. CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University Quorum-based protocols: Example A B C D A B C D E F G H E F G H I J K L I J K L N R =3 N W =10 N R =7 N W =6 J Write-write conflict L Concurrent writes to Read Quorum: {A, B, C, E, F, G} and {D, H, I, J, K, L} Write Quorum: will be accepted L24. 9 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA Upon receiving a put() request for a key ¨ Coordinator generates a vector clock for new version ¤ Sends new version to N highest-ranked reachable nodes ¤ If at least N W -1 nodes respond: write is successful! L24. 10 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L24.5 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA

  6. CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University External Discovery: During node adds ¨ When A and B join, it might be a while before they know each other’s existence ¤ Logical partitioning ¨ Use seed nodes that are known to all nodes ¤ All nodes reconcile membership with seed L24. 11 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA D YNAMO : E XPERIENCES CS555: Distributed Systems [Fall 2019] November 14, 2019 L24.12 Dept. Of Computer Science , Colorado State University L24.6 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA

  7. CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University Popular reconciliation strategies ¨ Business logic specific ¨ Timestamp ¤ Last write wins ¨ High performance read engine ¤ High read rates ¤ Small update rates n N R =1 and N W =N L24. 13 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA Quorum-based protocols: Example 2 A B C D E F G H I J K L N R =1 N W =12 J Read Quorum: Write Quorum: L24. 14 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L24.7 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA

  8. CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University Common configuration of the quorum ¨ N R =2 ¨ N W =2 ¨ N=3 L24. 15 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA Balancing performance and durability ¨ Some services not happy with 300 ms SLA ¤ Writes tend to be slower than reads ¨ To cope with this, nodes maintain object buffer ¤ Main memory ¤ Periodically written to storage L24. 16 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L24.8 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA

  9. CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University S ANJAY G HEMAWAT , H OWARD G OBIOFF , S HUN -T AK L EUNG : The Google file system. Proceedings of SOSP 2003: 29-43 T HE G OOGLE F ILE S YSTEM CS555: Distributed Systems [Fall 2019] November 14, 2019 L24.17 Dept. Of Computer Science , Colorado State University Broad brushstroke themes in current extreme scale storage systems ¨ Voluminous data ¨ Commodity hardware ¨ Distributed Data ¨ Expect failures ¨ Tune for access by applications ¨ Optimize for dominant usage ¨ Tradeoff between consistency and availability L24. 18 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L24.9 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA

  10. CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University Demand pulls in GFS: I ¨ Component failures are the norm ¨ Files are huge by traditional standards ¨ File mutations predominantly through appends ¤ Not overwrites ¨ Applications and File system API designed in lock-step L24. 19 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA Demand pulls in GFS - II ¨ Hundreds of producers will concurrently append to a file ¤ Many-way merging ¨ High sustained bandwidth is more important than low latency L24. 20 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L24.10 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA

  11. CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University The file system interface ¨ Does not implement standard APIs such as POSIX ¨ Supports create create , delete delete , open open , close close , read read and write write ¨ snapshot snapshot ¤ Create a fast copy of file and directory tree ¨ record append record append ¤ Multiple writers can concurrently append records to the same file n Without additional locking L24. 21 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA Architecture of GFS Client Client GFS Master ... Client GFS Chunk GFS Chunk GFS Chunk ... Server Server Server Linux File Linux File Linux File System System System L24. 22 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L24.11 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA

  12. CS555: Distributed Systems [Fall 2019] Dept. Of Computer Science , Colorado State University In GFS a file is broken up into fixed-size chunks ¨ Obvious reason ¤ The file is too big Map-Reduce ¨ Set the stage for computations that operate on this data ¤ Parallel I/O ¤ I/O seek times are 14 x 10 6 slower than CPU access times L24. 23 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA In GFS a file is broken up into fixed-size chunks ¨ Each chunk has a 64-bit globally unique ID ¤ Assigned by the Master ¨ Chunks are stored by chunk servers ¤ On local disks as L INUX files ¨ Each chunk is replicated ¤ Default is 3 L24. 24 CS555: Distributed Systems [Fall 2019] November 14, 2019 Dept. Of Computer Science , Colorado State University Professor: S HRIDEEP P ALLICKARA L24.12 S LIDES C REATED B Y : S HRIDEEP P ALLICKARA

Recommend


More recommend