15-744: Computer NetworkingDNS and the WebNamingOverviewObvious Solutions (1)Obvious Solutions (2)Domain Name System GoalsDNS RecordsDNS Design: Hierarchy DefinitionsDNS Design: Zone DefinitionsDNS Design: Cont.Servers/ResolversDNS: Root Name ServersTypical ResolutionLookup MethodsWorkload and CachingSlide 20Subsequent Lookup ExampleReliabilityReverse Name LookupPrefetchingRoot ZoneNew gTLDsNew RegistrarsDo you trust the TLD operators?Protecting the Root NameserversDNS Hack #1: Load BalanceDNS Hack #3: Blackhole ListsDNS ExperienceSlide 34Some Interesting AlternativesSlide 36CDNServer SelectionRouting BasedRouting BasedApplication BasedNaming BasedHow Akamai WorksSlide 44Slide 45Slide 46Akamai – Subsequent RequestsCoral: An Open CDNUsing CoralCDNCoralCDN componentsFunctionality neededUse a DHT?Coral distributed indexKey-based XOR routingPrevent insertion hotspotsCoral Contributions15-744: Computer NetworkingL-17 DNS and the Web2DNS and the Web•DNS•CDNs•Readings•DNS Performance and the Effectiveness of Caching•Development of the Domain Name System3Naming•How do we efficiently locate resources?•DNS: name IP address•Service location: description host•Other issues•How do we scale these to the wide area?•How to choose among similar services?4Overview•DNS•Server Selection and CDNs5Obvious Solutions (1)Why not centralize DNS?•Single point of failure•Traffic volume•Distant centralized database•Single point of update•Doesn’t scale!6Obvious Solutions (2)Why not use /etc/hosts?•Original Name to Address Mapping•Flat namespace•/etc/hosts •SRI kept main copy•Downloaded regularly•Count of hosts was increasing: machine per domain machine per user•Many more downloads•Many more updates7Domain Name System Goals•Basically building a wide area distributed database•Scalability•Decentralized maintenance•Robustness•Global scope •Names mean the same thing everywhere•Don’t need•Atomicity•Strong consistency8DNS RecordsRR format: (class, name, value, type, ttl)•DB contains tuples called resource records (RRs)•Classes = Internet (IN), Chaosnet (CH), etc.•Each class defines value associated with typeFOR IN class:•Type=A•name is hostname•value is IP address•Type=NS•name is domain (e.g. foo.com)•value is name of authoritative name server for this domain•Type=CNAME•name is an alias name for some “canonical” (the real) name•value is canonical name•Type=MX•value is hostname of mailserver associated with name9DNS Design: Hierarchy Definitionsrootedunetorgukcomgwu ucb cmu bumitcsececmcl•Each node in hierarchy stores a list of names that end with same suffix•Suffix = path up tree•E.g., given this tree, where would following be stored:•Fred.com•Fred.edu•Fred.cmu.edu•Fred.cmcl.cs.cmu.edu•Fred.cs.mit.edu10DNS Design: Zone Definitionsrootedunetorgukcomcagwu ucb cmu bumitcsececmclSingle nodeSubtreeComplete Tree•Zone = contiguous section of name space•E.g., Complete tree, single node or subtree•A zone has an associated set of name servers11DNS Design: Cont.•Zones are created by convincing owner node to create/delegate a subzone•Records within zone stored multiple redundant name servers•Primary/master name server updated manually•Secondary/redundant servers updated by zone transfer of name space•Zone transfer is a bulk transfer of the “configuration” of a DNS server – uses TCP to ensure reliability•Example:•CS.CMU.EDU created by CMU.EDU administrators12Servers/Resolvers •Each host has a resolver•Typically a library that applications can link to•Local name servers hand-configured (e.g. /etc/resolv.conf)•Name servers•Either responsible for some zone or…•Local servers•Do lookup of distant host names for local hosts•Typically answer queries about local zone13DNS: Root Name Servers•Responsible for “root” zone•Approx. dozen root name servers worldwide•Currently {a-m}.root-servers.net•Local name servers contact root servers when they cannot resolve a name•Configured with well-known root servers16Typical ResolutionClientLocal DNS serverroot & edu DNS serverns1.cmu.edu DNS serverwww.cs.cmu.eduNS ns1.cmu.eduwww.cs.cmu.eduNS ns1.cs.cmu.eduA www=IPaddrns1.cs.cmu.eduDNSserver18Lookup MethodsRecursive query:•Server goes out and searches for more info (recursive)•Only returns final answer or “not found”Iterative query:•Server responds with as much as it knows (iterative)•“I don’t know this name, but ask this server”Workload impact on choice?•Local server typically does recursive•Root/distant server does iterativerequesting hostsurf.eurecom.frgaia.cs.umass.eduroot name serverlocal name serverdns.eurecom.fr123456authoritative name serverdns.cs.umass.eduintermediate name serverdns.umass.edu78iterated query19Workload and Caching•What workload do you expect for different servers/names?•Why might this be a problem? How can we solve this problem?•DNS responses are cached •Quick response for repeated translations•Other queries may reuse some parts of lookup•NS records for domains •DNS negative queries are cached•Don’t have to repeat past mistakes•E.g. misspellings, search strings in resolv.conf•Cached data periodically times out•Lifetime (TTL) of data controlled by owner of data•TTL passed with every record20Typical ResolutionClientLocal DNS serverroot & edu DNS serverns1.cmu.edu DNS serverwww.cs.cmu.eduNS ns1.cmu.eduwww.cs.cmu.eduNS ns1.cs.cmu.eduA www=IPaddrns1.cs.cmu.eduDNSserver21Subsequent Lookup ExampleClientLocal DNS serverroot & edu DNS servercmu.edu DNS servercs.cmu.eduDNSserverftp.cs.cmu.eduftp=IPaddrftp.cs.cmu.edu22Reliability•DNS servers are replicated•Name service available if ≥ one replica is up•Queries can be load balanced between replicas•UDP used for queries•Need reliability must implement this on top of UDP!•Why not just use TCP?•Try alternate servers on timeout•Exponential backoff when retrying same server•Same identifier for all queries•Don’t care which server responds23Reverse Name Lookup•128.2.206.138?•Lookup 138.206.2.128.in-addr.arpa•Why is the address reversed?•Happens to be www.intel-iris.net and mammoth.cmcl.cs.cmu.edu what will reverse lookup return? Both?•Should only return name that reflects address allocation mechanism24Prefetching•Name servers can add additional data to any response•Typically used for prefetching•CNAME/MX/NS
View Full Document