DOC PREVIEW
UCSD CSE 123B - Content Distribution Networks

This preview shows page 1-2-3-24-25-26 out of 26 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CSE 123bCSE 123bCommunications SoftwareCommunications SoftwareSpring 2002Spring 2002Lecture 13: Content Distribution NetworksLecture 13: Content Distribution Networks(plus some other applications)(plus some other applications)Stefan SavageStefan SavageSome slides courtesy Srini SeshanMay 31, 2002 CSE 123b – Lecture 11 -- DNS 2Today’s classToday’s classz Quick examples of other application protocols◆ Mail, telnet, NFSz Content Distribution Networks (CDN)May 31, 2002 CSE 123b – Lecture 11 -- DNS 3Quick descriptions of some other Quick descriptions of some other sample applicationssample applicationsz Sending E-mail◆ SMTPz Remote terminal◆ Telnet, SSHz Distributed File Systems◆ NFSMay 31, 2002 CSE 123b – Lecture 11 -- DNS 4Simple Message Transfer Simple Message Transfer Protocol (SMTP)Protocol (SMTP)Like HTTP: TCP connection (port 25), ASCII string commandsSample session:HELO cs.ucsd.eduHello cs.ucsd.edu [132.239.4.64]MAIL FROM: [email protected] OKRCPT TO: [email protected] OKDATA354 Startup mail input; end with <CRLF>.<CRLF>Hi Joe… how’re you doing?<CRLF><CRLF>250 OKQUIT221 Closing connectionMay 31, 2002 CSE 123b – Lecture 11 -- DNS 5TelnetTelnetz TCP-based protocol (port 23)◆ Telnet client and telnet serverz First negotiate capabilities (e.g. terminal size, speed, line and a time vs character at a time, etc.)z Then simply send keystrokes from client to server and send data strings from server to client◆ Characters transmitted as 7 bits (8thbit 0)◆ In-band signalling» Byte 0xff means “interpret as command”» What if you need to send the symbol 0xff? Send it twice.May 31, 2002 CSE 123b – Lecture 11 -- DNS 6Network File System (NFS)Network File System (NFS)z UDP-based protocolz Remote Procedure Call (RPC) design◆ READ, WRITE, LOOKUP, REMOVE, RENAME, MKDIR, etc…◆ Header describes method and data types, followed by data◆ All requests fit in a single UDP datagram (up to 8k in v2, 64k in V3); fragmentation◆ Errors in data stream?◆ Security?May 31, 2002 CSE 123b – Lecture 11 -- DNS 7Content Distribution NetworksContent Distribution Networksz Goal: Improve performance/scalability for downloading content (i.e. Web pages)z Approach: Replicate content (particularly Web content) on many serversz Challenges◆ How to replicate content◆ Where to replicate content◆ How to find replicated content◆ How to choose among known replicas◆ How to direct clients towards replica» DNS, HTTP 304 response, anycast, etc.z AkamaiMay 31, 2002 CSE 123b – Lecture 11 -- DNS 8How to replicate contentHow to replicate contentz Push model◆ Proactively copy content to specific replicas◆ How to choose these?z Pull model◆ Reactively replicate content to nodes that request it◆ Content is replicated to places where it is popularMay 31, 2002 CSE 123b – Lecture 11 -- DNS 9Server SelectionServer Selectionz How do direct clients to a particular server?◆ As part of routing Æ anycast, cluster load balancing◆ As part of application Æ HTTP redirect◆ As part of naming Æ DNSz Which server?◆ Lowest load Æ to balance load on servers◆ Best performance Æ to improve client performance» Based on Geography? RTT? Throughput? Load?◆ Any alive node Æ to provide fault toleranceMay 31, 2002 CSE 123b – Lecture 11 -- DNS 10Routing Based Routing Based z Anycast◆ Give service a single IP address◆ Each node implementing service advertises route to address◆ Packets get routed routed from client to “closest” service node» Closest is defined by routing metrics» May not mirror performance/application needs◆ This is done today (sometimes by accident)May 31, 2002 CSE 123b – Lecture 11 -- DNS 11Routing BasedRouting Basedz Cluster load balancing◆ Router in front of cluster of nodes directs packets to server◆ Must be done on connection by connection basis –why?» Forces router to keep per connection state◆ How to choose server» Easiest to decide based on arrival of first packet in exchange» Primarily based on local load» Can be based on later packets (e.g. HTTP Get request) but makes system more complexMay 31, 2002 CSE 123b – Lecture 11 -- DNS 12Application BasedApplication Basedz HTTP support simple way to indicate that Web page has movedz Server receivess GET request from client◆ Decides which server is best suited for particular client and object◆ Returns HTTP redirect to that serverz Can make informed application specific decisionz May introduce additional overhead Æ multiple connection setup, name lookups, etc.May 31, 2002 CSE 123b – Lecture 11 -- DNS 13Naming BasedNaming Basedz Client does name lookup for servicez Name server chooses appropriate server addressz What information can it base decision on?◆ Server load/location Æ must be collected◆ Source address in DNS request◆ Round-robin» Randomly choose replica» Avoid hot-spots◆ [Semi-]static metrics» Geography» Route metricsMay 31, 2002 CSE 123b – Lecture 11 -- DNS 14Naming BasedNaming Basedz Predicted application performance◆ How to predict? ◆ Only have limited info at name resolutionz Multiple techniques◆ Static metrics to get coarse grain answer◆ Current performance among smaller groupz How does this affect caching?◆ Typically want low TTL to adapt to load changes◆ What do the first and subsequent lookups do?May 31, 2002 CSE 123b – Lecture 11 -- DNS 15How How AkamaiAkamaiWorksWorksz Content is prepared by rewriting URLs for replicated content◆ <img src=“http://cnn.com/af/x.gif”> replaced with <imgsrc=“http://a73.g.akamaitech.net/7/23/cnn.com/af/x.gif”> z Clients fetch html document from server◆ E.g. fetch index.html from cnn.comz Client is forced to resolve aXYZ.g.akamaitech.net hostname for replicated contentMay 31, 2002 CSE 123b – Lecture 11 -- DNS 16How How AkamaiAkamaiWorksWorksz gTLD/root server gives NS record for akamai.netz Akamai.net name server returns NS record for g.akamaitech.net◆ Name server chosen to be in region of client’s name server (based on IP address of request)◆ TTL is largez G.akamaitech.net name server choses a content server in region and returns it to client◆ Uses aXYZ name & hash function over request to pick◆ TTL is smallMay 31, 2002 CSE 123b – Lecture 11 -- DNS 17AkamaiAkamaiContent ServersContent Serversz Are really caches◆ Modified name contains file name◆ If content server doesn’t have that object then it is requested from primary server and cachedz Tricky issue is


View Full Document

UCSD CSE 123B - Content Distribution Networks

Download Content Distribution Networks
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Content Distribution Networks and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Content Distribution Networks 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?