Скачать презентацию 15 -744 Computer Networking L-15 Naming Srinivasan Скачать презентацию 15 -744 Computer Networking L-15 Naming Srinivasan

36c189cdee3343f5504aa8542a3c63c6.ppt

  • Количество слайдов: 33

15 -744: Computer Networking L-15 Naming © Srinivasan Seshan, 2001 LH-1; 1 -15 -00 15 -744: Computer Networking L-15 Naming © Srinivasan Seshan, 2001 LH-1; 1 -15 -00

Naming DNS • Assigned reading • • • [MD 88] P. Mockapetris and K. Naming DNS • Assigned reading • • • [MD 88] P. Mockapetris and K. Dunlap, Development of the Domain Name System [JSBM 01] Jaeyeon Jung, Emil Sit, Hari Balakrishnan, and Robert Morris, DNS Performance and the Effectiveness of Caching © Srinivasan Seshan, 2002 L -15; 3 -6 -02 2

Naming • How do we efficiently locate resources? • • • DNS: name IP Naming • 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? © Srinivasan Seshan, 2002 L -15; 3 -6 -02 3

Overview • DNS • Service location © Srinivasan Seshan, 2002 L -15; 3 -6 Overview • DNS • Service location © Srinivasan Seshan, 2002 L -15; 3 -6 -02 4

Obvious Solutions (1) Why not centralize DNS? • Single point of failure • Traffic Obvious Solutions (1) Why not centralize DNS? • Single point of failure • Traffic volume • Distant centralized database • Doesn’t scale! © Srinivasan Seshan, 2002 L -15; 3 -6 -02 5

Obvious Solutions (2) Why not use /etc/hosts? • Original Name to Address Mapping • Obvious 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 updates © Srinivasan Seshan, 2002 L -15; 3 -6 -02 6

Domain Name System (DNS) Goals • • • Basically building a wide area distributed Domain Name System (DNS) 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 consistency © Srinivasan Seshan, 2002 L -15; 3 -6 -02 7

DNS Design • DB contains tuples called resource records (RRs) • • • RR DNS Design • DB contains tuples called resource records (RRs) • • • RR contains type, class and application data Classes = Internet (IN), Chaosnet (CH), etc. Each class defines types, e. g. for IN: • • A = address, NS = name server, CNAME = canonical name (for aliasing), HINFO = CPU/OS info, MX = mail exchange, PTR = pointer for reverse mapping of address to name Administrative hierarchy • • “. ” as separator Zone = contiguous section of name space • Complete tree, single node or subtree © Srinivasan Seshan, 2002 L -15; 3 -6 -02 8

DNS Design • Zones are created by convincing owner node to create/delegate a subzone DNS Design • Zones are created by convincing owner node to create/delegate a subzone • • Each zone contains multiple redundant servers Primary/master name server updated manually Secondary/redundant servers updated by zone transfer of name space Host name to address section • • • Top-level domains edu, gov, ca, us, etc. Sub-domains = subtrees Human readable name = leaf root path © Srinivasan Seshan, 2002 L -15; 3 -6 -02 9

Hierarchical Name Space • barracuda. cmcl. cs. cmu. edu root org gwu edu net Hierarchical Name Space • barracuda. cmcl. cs. cmu. edu root org gwu edu net com cmu ucb cs uk bu ca mit ece cmcl barracuda © Srinivasan Seshan, 2002 L -15; 3 -6 -02 10

Servers/Resolvers • Each host has a resolver • • • Typically a library that Servers/Resolvers • Each host has a resolver • • • Typically a library that applications can link Local name servers hand-configured (e. g. /etc/resolv. conf) Name servers • Configured with well-known root servers • • Currently {a-m}. root-servers. net Local servers • • Do recursive lookup of distant host names for local hosts Typically answer queries about local zone © Srinivasan Seshan, 2002 L -15; 3 -6 -02 11

Caching • DNS responses are cached • • Quick response for repeated translations Other Caching • DNS responses are cached • • Quick response for repeated translations Other queries may reuse some parts of lookup • • DNS negative queries are cached • • • NS records for domains Don’t have to repeat past mistakes E. g. misspellings Cached data periodically times out • • Lifetime (TTL) of data controlled by owner of data TTL passed with every record © Srinivasan Seshan, 2002 L -15; 3 -6 -02 12

Lookup Methods • Iterative • • Recursive • • • Server responds with as Lookup Methods • Iterative • • Recursive • • • Server responds with as much as it knows (iterative) Server goes out and searches for more info (recursive) Only returns final answer or “not found” Impact on caching? workload? • • Local server typically does recursive Root/distant server does iterative © Srinivasan Seshan, 2002 L -15; 3 -6 -02 13

Typical Resolution Find name based on knowledge of root of name space • Steps Typical Resolution Find name based on knowledge of root of name space • Steps for resolving www. cmu. edu • • Application calls gethostbyname() Resolver contacts local name server (S 1) S 1 queries root server (S 2) for (www. cmu. edu) S 2 returns NS record for cmu. edu (S 3) S 1 queries S 3 for www. cmu. edu S 3 returns A record for www. cmu. edu Can return multiple addresses what does this mean? © Srinivasan Seshan, 2002 L -15; 3 -6 -02 14

DNS Lookup Example www. cs. cmu. edu . cm cs ww. w u u. DNS Lookup Example www. cs. cmu. edu . cm cs ww. w u u. ed . cmu S root & edu DNS server edu N Client Local DNS server NS cs. cmu. edu ww w= © Srinivasan Seshan, 2002 IPa dd L -15; 3 -6 -02 r cmu. edu DNS server cs. cmu. edu DNS server 15

Subsequent Lookup Example root & edu DNS server ftp. cs. cmu. edu Client Local Subsequent Lookup Example root & edu DNS server ftp. cs. cmu. edu Client Local DNS server cs. cm u ftp . ed =IP © Srinivasan Seshan, 2002 cmu. edu DNS server ftp. ad dr L -15; 3 -6 -02 u cs. cmu. edu DNS server 16

Reliability • DNS servers are replicated • • • Name service available if one Reliability • 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 Why not TCP? Try alternate servers on timeout Exponential backoff when retrying same server Same identifier for all queries • Don’t care which server responds © Srinivasan Seshan, 2002 L -15; 3 -6 -02 17

Reverse Name Lookup • 128. 2. 206. 138? • • Lookup 138. 206. 2. Reverse Name Lookup • 128. 2. 206. 138? • • Lookup 138. 206. 2. 128. in-addr. arpa Why is the address reversed? Happens to be www. seshan. org and mammoth. cmcl. cs. cmu. edu what will reverse lookup return? Both? Why is it that forward lookup can have multiple answers but not reverse? © Srinivasan Seshan, 2002 L -15; 3 -6 -02 18

Prefetching Name servers can addition data on any response • Typically used for prefetching Prefetching Name servers can addition data on any response • Typically used for prefetching • • • CNAME/MX/NS typically point to another host name Responses include address of host referred to in “additional section” © Srinivasan Seshan, 2002 L -15; 3 -6 -02 19

Mail Addresses • MX records point to mail exchanger for a name • • Mail Addresses • MX records point to mail exchanger for a name • • E. g. mail. acm. org is MX for acm. org Addition of MX record type proved to be a challenge • • How to get mail programs to lookup MX record for mail delivery? Needed critical mass of such mailers © Srinivasan Seshan, 2002 L -15; 3 -6 -02 20

DNS Experience • One of the greatest challenges seemed to be getting good name DNS Experience • One of the greatest challenges seemed to be getting good name server implementations • • Developers were typically happy with “good enough” implementation Challenging, large scale, wide area distributed system • Like routing, but easier to have broken implementations that work © Srinivasan Seshan, 2002 L -15; 3 -6 -02 21

DNS Experience • Common bugs • • Looped NS/CNAME record handling Poor static configuration DNS Experience • Common bugs • • Looped NS/CNAME record handling Poor static configuration (root server list) Lack of exponential backoff No centralized caching per site • • • Each machine runs on caching local server Why is this a problem? Solution • Monitor for misbehaving name servers? © Srinivasan Seshan, 2002 L -15; 3 -6 -02 22

DNS Experience - Client performance • 23% of lookups with no answer • Inverse DNS Experience - Client performance • 23% of lookups with no answer • Inverse lookups and bogus NS records 13% error response most = no name exists • Retransmit aggressively most packets in trace for unanswered lookups • Increasing share of low TTL records • Worst 10% lookup latency got much worse • © Srinivasan Seshan, 2002 L -15; 3 -6 -02 23

DNS Experience - Cache effectiveness • • • Hit rates = 80 – 86% DNS Experience - Cache effectiveness • • • Hit rates = 80 – 86% Name distribution = Zipf-like = 1/xa A records TTLs = 10 minutes similar to TTLs = infinite 10 client hit rate = 1000+ client hit rate Only 20% of requests go to root/g. TLD servers NS record caching is much more important to scalability © Srinivasan Seshan, 2002 L -15; 3 -6 -02 24

Overview • DNS • Service location © Srinivasan Seshan, 2002 L -15; 3 -6 Overview • DNS • Service location © Srinivasan Seshan, 2002 L -15; 3 -6 -02 25

Service Location • What if you want to lookup services with more expressive descriptions Service Location • What if you want to lookup services with more expressive descriptions than DNS names • E. g. please find me printers in cs. cmu. edu instead of laserjet 1. cs. cmu. edu What do descriptions look like? • How is the searching done? • How will it be used? • • Search for particular service? Browse available services? Composing multiple services into new service? © Srinivasan Seshan, 2002 L -15; 3 -6 -02 26

Service Descriptions • Typically done as hierarchical valueattribute pairs • • • Hierarchy based Service Descriptions • Typically done as hierarchical valueattribute pairs • • • Hierarchy based on attributes or attributesvalues? • • Type = printer memory = 32 MB, lang = PCL Location = CMU building = We. H E. g. Country state or country=USA state=PA and country=Canada province=BC? Can be done in something like XML © Srinivasan Seshan, 2002 L -15; 3 -6 -02 27

Service Discovery (Multicast) Services listen on well known discovery group address • Client multicasts Service Discovery (Multicast) Services listen on well known discovery group address • Client multicasts query to discovery group • Services unicast replies to client • Tradeoffs • • • Not very scalable effectively broadcast search Requires no dedicated infrastructure or bootstrap Easily adapts to availability/changes Can scope request by multicast scoping and by information in request © Srinivasan Seshan, 2002 L -15; 3 -6 -02 28

Service Discovery (Directory Based) • Services register with central directory agent • Soft state Service Discovery (Directory Based) • Services register with central directory agent • Soft state registrations must be refreshed or the expire Clients send query to central directory replies with list of matches • Tradeoffs • • How do you find the central directory service? • • • Typically using multicast based discovery! SLP also allows directory to do periodic advertisements Need dedicated infrastructure How do directory agents interact with each other? Well suited for browsing and composition knows full list of services © Srinivasan Seshan, 2002 L -15; 3 -6 -02 29

Service Discovery (Routing Based) • Client issues query to overlay network • Query can Service Discovery (Routing Based) • Client issues query to overlay network • Query can include both service description and actual request for service Overlay network routes query to desired service[s] • If query only description, subsequent interactions can be outside overlay (early-binding) • If query includes request, client can send subsequent queries via overlay (late-binding) • • Subsequent requests may go to different services agents Enables easy fail-over/mobility of service Tradeoffs • • • Routing on complex parameters can be difficult/expensive Can work especially well in ad-hoc networks Can late-binding really be used in many applications? © Srinivasan Seshan, 2002 L -15; 3 -6 -02 30

Wide Area Scaling • How do we scale discovery to wide area? • • Wide Area Scaling • How do we scale discovery to wide area? • • Hierarchy must be based on attribute of services • • • Hierarchy? All services must have this attribute All queries must include (implicitly or explicitly) this attribute Tradeoffs • • • What attribute? Administrative (like DNS)? Geographic? Network Topologic? Should we have multiple hierarchies? Do we really need hierarchy? Search engines seem to work fine! © Srinivasan Seshan, 2002 L -15; 3 -6 -02 31

Other Issues • Dynamic attributes • • • Many queries may be based on Other Issues • Dynamic attributes • • • Many queries may be based on attributes such as load, queue length E. g. , print to the printer with shortest queue Security • • Don’t want others to serve/change queries Also, don’t want others to know about existance of services • Srini’s home SLP server is advertising the $50, 000 MP 3 stereo system (come steal me!) © Srinivasan Seshan, 2002 L -15; 3 -6 -02 32

Next Lecture: Midterm Closed book • Up through fair queuing • Last year’s exam Next Lecture: Midterm Closed book • Up through fair queuing • Last year’s exam posted on Web page • © Srinivasan Seshan, 2002 L -15; 3 -6 -02 33