cscd58 w inter 2018
play

CSCD58 W INTER 2018 W EEK 3 - A PPLICATION L AYER Brian Harrington - PowerPoint PPT Presentation

Admin Protocol Stack Application Layer Break HTTP DNS P2P CSCD58 W INTER 2018 W EEK 3 - A PPLICATION L AYER Brian Harrington University of Toronto Scarborough January 23, 2018 Admin Protocol Stack Application Layer Break HTTP DNS P2P


  1. Admin Protocol Stack Application Layer Break HTTP DNS P2P CSCD58 W INTER 2018 W EEK 3 - A PPLICATION L AYER Brian Harrington University of Toronto Scarborough January 23, 2018

  2. Admin Protocol Stack Application Layer Break HTTP DNS P2P A DMIN • Midterm • Feb 27 • In class • More info closer to the date

  3. Admin Protocol Stack Application Layer Break HTTP DNS P2P A IR T RAVEL A NALOGY

  4. Admin Protocol Stack Application Layer Break HTTP DNS P2P P OSTAL A NALOGY

  5. Admin Protocol Stack Application Layer Break HTTP DNS P2P W HY L AYERING ? • Each layer can provide a service • Don’t care about layers above • Don’t worry about layers below • Modular Design • Changes to baggage handling procedures doesn’t affect ticketing • Changes to postal routing doesn’t affect addressing

  6. Admin Protocol Stack Application Layer Break HTTP DNS P2P I NTERNET P ROTOCOL S TACK

  7. Admin Protocol Stack Application Layer Break HTTP DNS P2P I NTERNET P ROTOCOL S TACK • Application: • User-end application protocols • FTP , SMTP , HTTP • Transport: • Process to process data transfer • TCP , UDP • Network: • Routing from source to destination • IP • Link: • Transferring data between adjacent points • Ethernet, WiFi, PPP • Physical: • Moving bits “Along the wire”

  8. Admin Protocol Stack Application Layer Break HTTP DNS P2P A PPLICATION L AYER • Example Network Applications • E-mail • Web Pages • Instant Messaging (IM) • P2P File Sharing • Multiplayer Games • Streaming Store Video (Netflix, YouTube, etc) • Voice over IP (Skype) • Video over IP (Skype) • Facebook • Google Search • Google... everything else

  9. Admin Protocol Stack Application Layer Break HTTP DNS P2P A PPLICATION L AYER • Remember: Assume that Transport (& Below) layers are present & working • Run on different end systems • Don’t have to care about network core • Just “post the letter” and assume it will get there • Or not... • Application Layer protocols define messages sent between end systems and actions taken • Deployment controlled by users, not network

  10. Admin Protocol Stack Application Layer Break HTTP DNS P2P A PPLICATION A RCHITECTURES • Client-Server • Always-on server • Constant address • More traffic = More data centres • Peer-to-Peer (P2P) • Arbitrary end systems communicating • Peers come and go/change IPs • Quid-pro-quo • Self-scalable • Hybrid • Skype (central server, calls are P2P) • Most instant messaging (user data on server, chats are P2P) • Napster (oops)

  11. Admin Protocol Stack Application Layer Break HTTP DNS P2P P ROCESS C OMMUNICATION • Process: Program running on a specific host (computer) • same host: inter-process communication defined by OS • different hosts: need to pass messages • Client Process: • Initiates communication • Server Process: • Waits to be contacted • IP address uniquely identifies host • To identify a process, need to add a port number • HTTP: 80 • Mail: 25

  12. Admin Protocol Stack Application Layer Break HTTP DNS P2P S OCKETS • Socket: “door” through which process sends/receives messages • Mailbox analogy

  13. Admin Protocol Stack Application Layer Break HTTP DNS P2P W HAT DO WE NEED FROM THE T RANSPORT LAYER ? • Data Integrity • Can we tolerate some loss? • Timing • Can we tolerate some delay? • Throughput • Do we need a minimum amount of bandwidth? • Security • Do we need encryption/redundancy/authentication?

  14. Admin Protocol Stack Application Layer Break HTTP DNS P2P A PPLICATION L AYER : R EQUIREMENTS Application Data Integrity Throughput Time Sensitive File transfer no loss elastic no E-mail no loss elastic no Static web pages no loss elastic no voice over IP loss-tolerant 5Kb:Audio yes (~100msec) 10Kb:Video stored video loss-tolerant 10Kb yes (~2 sec) stock trading no loss elastic (Time=money)

  15. Admin Protocol Stack Application Layer Break HTTP DNS P2P W HAT SERVICES DOES THE T RANSPORT L AYER OFFER ? • UDP • Connectionless: Doesn’t try to set up connection first • Unreliable: Send it out and hope for the best • No flow or congestion control • TCP • Connection Oriented: Sets up a connection between server and client • Reliable Transport: Sending process can count on receiving process getting message • Flow Control: Sender won’t overwhelm receiver • Congestion Control: throttle sender when network is overloaded • Note: Neither protocol provides: • Timing • Min Bandwidth • Security

  16. Admin Protocol Stack Application Layer Break HTTP DNS P2P SSL • Secure Socket Layer • Application Layer protocol • Sits “on top” of TCP • Pseudo-Transport layer • Encrypts data before sending it via TCP • What about Timing/Bandwidth? • Tough luck!

  17. Admin Protocol Stack Application Layer Break HTTP DNS P2P B REAK

  18. Admin Protocol Stack Application Layer Break HTTP DNS P2P HTTP: H YPER T EXT T RANSFER P ROTOCOL • Basic application layer protocol for the web • Client-Server based • Client: Web browser • Server: Web server • Uses TCP connection (Port 80) • Stateless (server doesn’t remember client requests) • Keeping state is hard • Cookies used instead

  19. Admin Protocol Stack Application Layer Break HTTP DNS P2P HTTP V ERSIONS • Non-persistent • 2RTT + File transfer time per object • A good browser will open parallel TCP connections • A good server may stop it • Persistent • 1RTT (connection) + 1RTT/object • Need timeout for connection

  20. Admin Protocol Stack Application Layer Break HTTP DNS P2P HTTP R EQUEST

  21. Admin Protocol Stack Application Layer Break HTTP DNS P2P HTTP R ESPONSE

  22. Admin Protocol Stack Application Layer Break HTTP DNS P2P HTTP: R ESPONSE C ODES • 200 OK • request succeeded, requested object later in this msg • 301 Moved Permanently • requested object moved, new location specified later in this msg (Location:) • 400 Bad Request • request msg not understood by server • 404 Not Found • requested document not found on this server • 505 HTTP Version Not Supported

  23. Admin Protocol Stack Application Layer Break HTTP DNS P2P HTTP: C OOKIES

  24. Admin Protocol Stack Application Layer Break HTTP DNS P2P W EB C ACHING • Majority of WWW is asymmetric • Accessed much more frequently than updated • Origin server may be (physically) far away (propagation delay) • Solution: Web Caching • Typically installed by ISP • Less traffic on access link • Faster response time for users • Reduce stress on “poor” content providers

  25. Admin Protocol Stack Application Layer Break HTTP DNS P2P W EB C ACHING • Assumptions • Avg object size: 1Mb • Avg request rate: 15/sec • Avg LAN bandwidth: 1 Gbps • Avg RTT from router to origin server: 2 sec • Access Link Rate: 15Mbps • Results: • LAN utilization: 1.5% • Access link utilization: 100% • Delay: RTT + Access + LAN • 2sec + infinite + negligible

  26. Admin Protocol Stack Application Layer Break HTTP DNS P2P W EB C ACHING • Solution #1: Upgrade • Upgrade to 100Mbps access link • Access link traffic intensity = 15% • Delay: RTT + Access + LAN • 2sec + negligible + negligible • VERY expensive • Solution #2: Web Cache • Assume we can satisfy 40% of requests (typical) • Access link traffic intensity = 60% • Still results in negligible access time • Delay: 0.6 * (RTT + Access + LAN) + 0.4 * (LAN) • 0.6 * (2sec + negligible) + 0.4 * (negligible) • ~1.2sec

  27. Admin Protocol Stack Application Layer Break HTTP DNS P2P DNS (D OMAIN N AME S YSTEM ) • Every server has an IP address • Can just type: http://74.125.224.72 • But we’re not very good at memorizing • “I don’t know, why don’t you 74.125.224.72 it?” • Need a way to translate between the two

  28. Admin Protocol Stack Application Layer Break HTTP DNS P2P DNS (D OMAIN N AME S YSTEM ) • Why not just have one centralized system? • Single point of failure • Traffic volume • Distance • Maintenance/updates?

  29. Admin Protocol Stack Application Layer Break HTTP DNS P2P DNS (D OMAIN N AME S YSTEM ) • Want to find IP for web.cs.toronto.edu? • Start at top, work your way down

  30. Admin Protocol Stack Application Layer Break HTTP DNS P2P R OOT N AME S ERVERS • 13 Root Name servers • Authoritative resource for top level domain servers • Now replicated: ~350 mirrored servers

  31. Admin Protocol Stack Application Layer Break HTTP DNS P2P DNS E XAMPLE : R ECURSIVE M ODE • Try local first • Local DNS requests from root • root requests from intermediate • etc... • What’s wrong with this picture? • Too much work for top level servers

  32. Admin Protocol Stack Application Layer Break HTTP DNS P2P DNS: I TERATIVE M ODE • Push burden of work back to querier • Lower traffic for top level domains • “I don’t know, ask that server” vs. “I don’t know, I’ll go ask”

Recommend


More recommend