1 / 22

CS162 Section

CS162 Section. Lecture 9. Project 3. Client Side Program. Client Side Program. Client Side Program. KVClient (Library). KVClient (Library). KVClient (Library). KVMessage. KVMessage. Socket Server. What port will you listen on?. KVInterface. KVInterface. KVStore.

amandla
Download Presentation

CS162 Section

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS162 Section Lecture 9

  2. Project 3 Client Side Program Client Side Program Client Side Program KVClient (Library) KVClient (Library) KVClient (Library) KVMessage KVMessage Socket Server What port will you listen on? KVInterface KVInterface KVStore KVCache(LRU Cache) Asynchronous! NeworkHandler Job Queue Available Threads Thread Pool Write Through Cache! KeyValue Server

  3. “A distributed system is one in which the failure of a computer you didn't even know existed can render your own computer unusable” -- Leslie Lamport

  4. What is Bandwidth? What is Latency?

  5. RTT of 100ms • Packet size of 1 KB • Initial handshake of 2 RTTs • Bandwidth is 1.5 Mbps 1 2 How long does it take to transfer a 1000 KB file. Packet Transfer is continuous

  6. RTT of 100ms • Packet size of 1 KB • Initial handshake of 2 RTTs • Bandwidth is 1.5 Mbps 1 2 How long does it take to transfer a 1000 KB file. Packet Transfer is one at a time

  7. 385,000 km Transfer data at speed of light (3 x 108 m/s) What is the RTT of the link? 1 2

  8. How is a packet generated inside the Operating System? 1 Router 2 Packet

  9. Data User Space Data Kernel Space Device Space

  10. Time to process an interrupt, Tint = 1.5 ms • CPU cycle time, TCPU = 10 ns • Packet size, Npkt = 1000B (ignore headers) • Time to copy or DMA one byte, Tcopy = 1 μs • Latency of a link, Tlink = 3 ms • Bandwidth of links, B = 8Mbps 1 Router 2 How many buffer copies are there to transmit a single packet?

  11. Time to process an interrupt, Tint = 1.5 ms • CPU cycle time, TCPU = 10 ns • Packet size, Npkt = 1000B (ignore headers) • Time to copy or DMA one byte, Tcopy = 1 μs • Latency of a link, Tlink = 3 ms • Bandwidth of links, B = 8Mbps 1 Router 2 How many interrupts are generated to transmit a single packet?

  12. Time to process an interrupt, Tint = 1.5 ms • CPU cycle time, TCPU = 10 ns • Packet size, Npkt = 1000B (ignore headers) • Time to copy or DMA one byte, Tcopy = 1 μs • Latency of a link, Tlink = 3 ms • Bandwidth of links, B = 8Mbps 1 Router 2 What is the time to reliably send a single packet from Node 1 to Node 2?

  13. Time to process an interrupt, Tint = 1.5 ms • CPU cycle time, TCPU = 10 ns • Packet size, Npkt = 1000B (ignore headers) • Time to copy or DMA one byte, Tcopy = 1 μs • Latency of a link, Tlink = 3 ms • Bandwidth of links, B = 8Mbps 1 Router 2 What is the maximum rate possible between Node 1 to Node 2?

  14. Application Layer Application Layer Data Data Transport Layer Transport Layer Trans. Hdr. Data Trans. Hdr. Data Network Layer Network Layer Net. Hdr. Trans. Hdr. Data Net. Hdr. Trans. Hdr. Data Datalink Layer Datalink Layer Frame Hdr. Net. Hdr. Trans. Hdr. Data Frame Hdr. Net. Hdr. Trans. Hdr. Data Physical Layer Physical Layer 10101010011010111 10101010011010111

  15. TCP • Connection Setup – 3 way handshake • Byte Stream Oriented (NOTE!) • Reliable data transfer • Flow control • Congestion control • Connection tear down (4 way)

  16. SYN, SeqNum = x TCP Connection Setup Server Client (initiator) ActiveOpen connect() listen() PassiveOpen

  17. SYN, SeqNum = x SYN and ACK, SeqNum = y and Ack = x + 1 ACK, Ack = y + 1 TCP Connection Setup Server Client (initiator) ActiveOpen connect() listen() PassiveOpen accept() allocatebuffer space

  18. TCP Connection Teardown • 4-ways tear down connection Host 1 Host 2 FIN close FIN ACK data • Avoid reincarnation • Can retransmit FIN ACK if it is lost close FIN FIN ACK closed timeout closed

  19. Key Value Stores • Very large scale storage systems • Two operations • put(key, value) • value = get(key) • Challenges • Fault Tolerance  replication • Scalability  serve get()’s in parallel; replicate/cache hot tuples • Consistency  quorum consensus to improve put() performance

  20. Key Value Stores • Also called a Distributed Hash Table (DHT) • Main idea: partition set of key-values across many machines key, value …

  21. Chord Lookup lookup(37) 4 58 8 node=44 is responsible for Key=37 15 44 20 35 32 Each node maintains pointer to its successor Route packet (Key, Value) to the node responsible for ID using successor pointers E.g., node=4 lookups for node responsible for Key=37

  22. Chord • Highly scalable distributed lookup protocol • Each node needs to know about O(log(M)), where M is the total number of nodes • Guarantees that a tuple is found in O(log(M)) steps • Highly resilient: works with high probability even if half of nodes fail

More Related