distributed systems naming. naming names are used to share resources name uniquely identify entities...

60
Distributed Systems Naming

Upload: miles-douglas

Post on 04-Jan-2016

225 views

Category:

Documents


0 download

TRANSCRIPT

  • Distributed SystemsNaming

  • NamingNames are used to share resourcesName uniquely identify entitiesNames refer to locationIf we have named entity, then we can access itThe organisation and implementation of human-friendly naming systems.

  • Names or Codes, or Numbers?Names (when meaningful) are easier to remember than codes or numbersNumber (or sequence codes) are more useful for structuring data and locating resources by a program..Example: IPv4128.250.29.30marg.csse.unimelb.edu.auCSSE networkLevel 5 subnetMachine IdentifierAustraliaEducation InstitutionsThe University of MelbourneComputer Science and Software EngineeringMachine name

  • NamingNaming as it relates to mobile entities Name is a string of bits or characters refer to an entity.Entity may be host, printer, disk, file, user, mailbox, web page, message,..

  • Names or Codes? or Numbers?As discussed in file system (hierarchical naming of files) and mounting at right location.

    Which one is better?

  • NamingEach entity has access pointThe name of access point is called address of entity or entity access pointIdentifier a reference to an entity that is often unique and never reused E.g. any person has a name and telephone number (access point)

  • NamingThe name of entity is independent of its addressName should be:An identifier (name) refer to only one entityThe name always refers to the same entity

  • Name SpacesThe name space is the way that names in a particular system are organized. This also defines the set of all possible names.Examples:Phone numbersCredit card numbersDNSHuman names in the USRobert Ludlum booksFiles in UNIX, WindowsURLs

  • Name SpaceName space is the set of all names in distributed systemName space is a directed graph with a single root node.Root node of naming graph is a node with no incoming edges

  • Role of Names and Naming Services - Name ResolutionClient

    nameIPattributeswww.google.comwww.hotmail.com..

  • NamespacesWithin distributed systems, a namespace is represented by a labelled, directed graph with two types of nodes:leaf nodes: information on an entity.directory nodes: a collection of named outgoing edges (which can lead to any other type of node).Nodes can be referred to by path names (with absolute or relative).File systems are a classic example

  • Name Spaces (1)Leaf node represents named entityDirectory node is entity in distributed system

  • Name space examplesFile system is a name space where leaf is a fileDirectory node represents file directoryURL is identifier name for web services

  • Name Space DistributionThe name space is partitioned into three layers:Global layerIt is the root node and some other related nodesIt is not changedIt represented organizations,.

  • Name Space DistributionAdministrational layerRepresents departments in such organizationIt is relatively stableManagerial layerNodes change regularlyRepresents shared files,

  • Name Space Distribution Comparing the features/characteristics of name servers that implement nodes within a large-scale name space (partitioned into a global, administrational and managerial layer). Availability and performance requirements are met by replication and caching at each of the various layers (more on caching later).

    Feature/CharacteristicGlobalAdministrationalManagerialGeographical scale of networkWorldwideOrganizationDepartmentTotal number of nodesFewManyVast numbersResponsiveness to lookupsSecondsMillisecondsImmediateUpdate propagationLazyImmediateImmediateNumber of replicasManyNone or fewNoneIs client-side caching applied?YesYesSometimes

  • Name Space Distribution

  • Name Space DistributionA comparison between name servers for implementing nodes from a large-scale name space partitioned into a global layer, as an administrational layer, and a managerial layer.

    ItemGlobalAdministrationalManagerialGeographical scale of networkWorldwideOrganizationDepartmentTotal number of nodesFewManyVast numbersResponsiveness to lookupsSecondsMillisecondsImmediateUpdate propagationLazyImmediateImmediateNumber of replicasManyNone or fewNoneIs client-side caching applied?YesYesSometimes

  • Name ResolutionThe process of looking up a name is called name resolutionLet the number 0031204430784 does not mean any thing for people but when we give information that this is telephone number then name resolution can startThis help information is called closure mechanism

  • More on Name ResolutionA name resolver provides a local name resolution service to clients it is responsible for ensuring that the name resolution process is carried out.

    Two Common Approaches:

    1. Iterative Name Resolution.2. Recursive Name Resolution.

  • Iterative Name ResolutionThe name resolver queries each name server (at each layer) in an iterative fashion. Note: the client is doing all the work here (and generating a lot of traffic, too).

  • Name ResolutionIf distributed system is in LAN only, then it implements name space by means of single name serverIn WAN, Distributed system implements name space over multiple name servers

  • Recursive Name ResolutionThe name resolver starts the process, then each server temporarily becomes a client of the next name server until the resolution is satisfied. The results are then returned to the client.

  • Caching and Recursive Name ResolutionRecursive name resolution of . Name servers cache intermediate results for subsequent lookups. This is seen as a key advantage to the recursive name resolution approach, even though the workload has been moved from the client to the servers. Nevertheless, think about subsequent lookups

    Server for nodeShould resolveLooks upPasses to childReceives and cachesReturns to requestercs#----#vu### #ni## ## # #root## # ## # # #

  • Iterative vs. Recursive ResolutionThe comparison between recursive and iterative name resolution with respect to communication costs. Again, the recursive technology is generally regarded to have an advantage in this situation (especially over longer, more expensive WAN links).

  • Two Naming ExamplesThe Domain Name Service (DNS)

    The X.500 Directory Service

  • Domain Name System (DNS)P. Mockapetris, K. Dunlap: Development of the domain name system, Proc. SIGCOMM88 SymposiumAddress/name translationDNS is used for looking up host address and mail serversHierarchical name spacedistributed databaseDistributed set of serversReplicated for reliabilityThe name space consists of set of labels (each of length 63 char) and the complete path name is 255 char

  • DNS NamesA subtree within DNS is referred to as a domain.

    A path name is referred to as a domain name.

    These can be relative or absolute.

    A DNS server operates at each node (except those at the bottom). Here, the information is organised into resource records.

  • DNS Name ServersWhy not have a central DNS server?single point of failuretraffic volumemay be farmaintenance difficultAlternativeno server has all name-to-IP address mappings

  • Resolver and name serverAn application program on a host accesses the domain system through a DNS client, called the resolverResolver contacts DNS server, called name server DNS server returns IP address to resolver which passes the IP address to application

    Reverse lookups are also possible, i.e., find the hostname given an IP address

    HTTP

    Resolver

    Hostname (neon.tcpip-lab.edu)

    IP address (128.143.71.21)

    Name server

    Hostname (neon.tcpip-lab.edu)

    IP address (128.143.71.21)

  • Authoritative DNS ServersNo server has all name-to-IP mappingslocal name servers:Each institution/company/ ISP has a local (default) name serverHost DNS query first tries the local name serverauthoritative name server:For a host: stores that hosts IP address & nameCan perform name/address translation

  • DNS name servers

    Note: Name server names are in italics, and the corresponding domains are in parentheses. Arrows denote name server entries

  • Composed naming domains used to access a resource from a UR

  • URL exampleIf the URL http://www.cdk3.net:8888/web_examples/earth.html is given to DNS and it looks up for it, so:URL will be 55.55.55.55 +8888+web_examples/earth.htmlIP + port # + path nameIP to get the server addressPort# to get socketTrace the path name to get the file earth.html from the socket

  • DNS example: mail addressNameServerMail Transfer [email protected] for ics.forth.gr ?User139.91.157.50139.91.157.50

  • DNSmaster file (hosts.txt) of host names & their IPsmaintained by Network Information Center (NIC)distributed by email, or downloaded by FTPThe global layer of DNS are:.com, .edu, .gov, .mil, .net, .org, .uk, .eg,DNS is stored in files with set of records (internet database) as A, NS, .

  • Domain HierarchyDomain := context for defining/resolving nameseducomgovmilorgnetukgribmyahooieeeuoccsdsoceconCrete

  • The DNS Name SpaceThe most important types of resource records forming the contents of nodes in the DNS name space.

    Type of recordAssociated entityDescriptionSOAZoneHolds information on the represented zoneAHostContains an IP address of the host this node representsMXDomainRefers to a mail server to handle mail addressed to this nodeSRVDomainRefers to a server handling a specific serviceNSZoneRefers to a name server that implements the represented zoneCNAMENodeSymbolic link with the primary name of the represented nodePTRHostContains the canonical (Pointer) name of a hostHINFOHostHolds information on the host (Machine architecture & OS)TXTAny kindContains any entity-specific information considered useful

  • DNS ImplementationAn excerpt from the DNS database for the zone cs.vu.nl.

    The database is a small collection of files maintained within each DNS zone.

  • DNS recordsDNS: distributed db storing resource records (RR)Type=NSname is domain (eg., foo.com)value is hostname of authoritative name server for this domainEg: (foo.com, dns.foo.com, NS)

    Type=Aname is hostnamevalue is IP addressEg: (relay1.bar.foo.com, 145.37.93.126, A)

    Type=CNAMEname is alias name for some canonical (the real) name, eg., www.ibm.com is really servereast.backup2.ibm.comvalue is canonical name

    Type=MXvalue is name of mailserver associated with name

  • DNS example (I)Host sci.alexu.edu.eg wants IP address of gaia.cs.umass.edu1. Contacts its local DNS server, dns.alexu.edu.eg2. dns.alexu.edu.eg contacts root name server, if necessary3. root name server contacts authoritative name server, dns.umass.edu, if necessary

    requesting hostSci.alexu.edu.eg

  • DNS example (II)Root name server:may not know authoritative name servermay know intermediate name server: who to contact to find the authoritative name serverrequesting hostsci.alexu.edu.eg

  • DNS example (III): Iterated queriesrecursive query:puts burden of name resolution on contacted name serverheavy load?iterated query:contacted server replies with name of server to contactI dont know this name, but ask this serverrequesting hostSci.alexu.edu.eg

  • DNS Root Servers (I)Contacted by local name server that can not resolve a nameRoot name server:contacts authoritative name server if name mapping not knowngets mappingreturns mapping to local name server13 root name servers worldwide{a, b, c, , m}.root-servers.orgCritical part of the Internet infrastructure !

  • DNS Root Servers (III)F: Internet Systems Consortium, Inc. Sites: Ottawa, TorontoSan Jose, San Francisco, Los AngelesNew York CityRome, Paris, Lisbon, Madrid, MunichSao Paulo Beijing, Seoul, Taipei, Hong Kong, Singapore, DubaiMoscowDubaiBrisbane, AucklandMonterreyJohannesburgTel AvivJakarta

  • Addresses of root serversA.ROOT-SERVERS.EDU. (formerly NS.INTERNIC.NET) 10.0.2.32A.ROOT-SERVERS.NET. (formerly NS1.ISI.EDU) 198.41.0.4B.ROOT-SERVERS.NET. (formerly C.PSI.NET) 128.9.0.107C.ROOT-SERVERS.NET. (TERP.UMD.EDU) 192.33.4.12D.ROOT-SERVERS.NET. (NS.NASA.GOV)128.8.10.90E.ROOT-SERVERS.NET. (NS.ISC.ORG)192.203.23F.ROOT-SERVERS.NET. (NS.NIC.DDN.MIL) 192.5.5.241G.ROOT-SERVERS.NET. (AOS.ARL.ARMY.MIL) 192.112.36.4H.ROOT-SERVERS.NET. (NIC.NORDU.NET)128.63.2.53I.ROOT-SERVERS.NET. (at NSI (InterNIC))192.36.148.17J.ROOT-SERVERS.NET. (operated by RIPE NCC) 198.41.0.10K.ROOT-SERVERS.NET. (at ISI (IANA)) 193.0.14.129 L.ROOT-SERVERS.NET. (operated by WIDE, Japan)198.32.64M.ROOT-SERVERS.NET. 202.12.27.33

  • DNS Implementation - BIND (I)Developed at BerkeleyUDP-based avoid the overhead of TCP connection2 parts:resolverhandles the queries issued by applicationsclient for up to 3 name serversname serverimplements referrals, canonical name substitution, etc

  • DNS Implementation - BIND (II)Resolver:Up to 3 names servers, in fixed orderedqueried in sequenceTry 2nd server if 1st does not respond, try 3rd server if 2nd does not respondinitial timeout: 1 sectimeout := 2*timeout, if none of the servers respondsA server is tried up to 4 times Max. #queries before giving up: 12The query ID is not changed upon retransmissionsThe resolver does not care which server responds nor which query packet generated a response

  • DNS Implementation - BIND (III)Name server:list of up to 16 addresses of name serversalways sorted by the servers expected response timeCycle through list of servers, up to 3 timesInitial timeout: 4 secMax. timeout: 45 secTimeout is doubled after each cycleA single query destined to an unreachable, unreplicated name server would lead up to 9 query datagramsUp to 20 referrals protection against looping ! or up to 8 canonical name substitutions

  • Example: X.500 Naming ServiceA traditional naming service (like DNS) operates very much like the Telephone Directory. Find B, then find Barry, then find Paul, then get the number.

    With a directory service, the client can look for an entity based on a description of its properties instead of its full name. This is more like the Yellow Pages.

    Find Perl Consultants, obtain the list, search the list, find Paul Barry, then get the number.

  • X.500 principlesOrganizes directory entries into a hierarchical namespacePowerful search capabilitiesOften used for interfacing incompatible directory servicesUsed DAP for client-server communicationDAP (App. Layer) requires entire OSI stack to operateToo heavy for small environments

  • More on X.500Directory entries in X.500 are roughly equivalent to domain names in DNS.

    The entries are organised as a series of

    Attribute/Value Pairings

    A collection of directory entries is referred to as a Directory Information Base (DIB).

  • The X.500 Name Space (1)A simple example of a X.500 directory entry using X.500 naming conventions.

    AttributeAbbr.ValueCountryCEGLocalityLAlexandriaOrganizationLAlexu UniversiteitOrganizationalUnitOUMath. & Comp. Sc.CommonNameCNMain serverMail_Servers--130.37.24.6, 192.31.231,192.31.231.66FTP_Server--130.37.21.11WWW_Server--130.37.21.11

  • Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5Hierarchical Implementations: LDAP (2)Figure 5-23. (a) Part of a directory information tree.

    Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

  • *Part of the X.500 Directory Information Tree (DIT)X.500 Service (root)Australia (country)IndiaUSANSW (state)Vic (state)GovtPrivateEducationalMonashUniMelbCSSEMedicineStaffStudentsObject class for NSW govt.

  • The X.500 Name Space (3)Two directory entries having Host_Name as RDN.

    AttributeValueAttributeValueCountryNLCountryNLLocalityAmsterdamLocalityAmsterdamOrganizationVrije UniversiteitOrganizationVrije UniversiteitOrganizationalUnitMath. & Comp. Sc.OrganizationalUnitMath. & Comp. Sc.CommonNameMain serverCommonNameMain serverHost_NamestarHost_NamezephyrHost_Address192.31.231.42Host_Address192.31.231.66

  • Naming versus Locating EntitiesDirect, single level mapping between names and addresses.T-level mapping using identities.

  • Mobile IP Traditional routingbased on IP destination addressnetwork prefix determines physical subnetchange of physical subnet implies change of IP address (conform to new subnet), orspecial routing table entries to forward packets to new subnet Changing of IP addressDNS updates take to long timeTCP connections breaksecurity problemsChanging entries in routing tablesdoes not scale with the number of mobile hosts and frequent changes in the locationsecurity problemsSolution requirementsretain same IP address, use same layer-2 protocolsauthentication of registration messages,

  • Mobile IP A tunnel is established bet. the home agent & a reachable point for the mobile node.Association bet. Home IP & Care-of address

    ******************************************