Vous êtes sur la page 1sur 40

Distributed Systems

Naming Services

Prof. Dr.-Ing. Torben Weis


Universitt Duisburg-Essen
Outline

Introduction and Definition of Terms


Challenges
Types of Naming Services
Examples
Uniform Resource Identifier
X.500 Directory Service
Domain Name System (DNS)

Universitt Duisburg-Essen Torben Weis 2


Verteilte Systeme
Architecture of Distributed Systems

Application

Distributed Data Management:


Distributed File System
Distributed Data Base

Naming
Security

Other Process Clock Transaction Data


Fundamental Synchronization Synchronization Management Replication
Services

Interprocess Communication:
Unicast
Broadcast

Universitt Duisburg-Essen Torben Weis 3


Verteilte Systeme
Name and Address

Name
Refers to an entity or object of interest
Name
E.g. Host name

Address
Address Special kind of a name
Identifies the objects location
(physical or logical)
E.g. IP address

Universitt Duisburg-Essen Torben Weis 4


Verteilte Systeme
Why do we need Naming Services?

Identification
Names specify objects (unambiguously?)
Example: c:\virus.exe, ISBN 0-201-61918-0
Objects can be: files, users, database objects,
variables, communication links, etc.
Naming systems of different application areas
are usually disjoint
Data Sharing
Shared access to the same object
Example: http://www.somewhere.org/index.html
Exchange of names among users

Universitt Duisburg-Essen Torben Weis 5


Verteilte Systeme
Why do we need Naming Services?

Indirection
Mapping between name and address spaces
E.g. from an easy memorable host name to IP address

Addresses of objects can change, names can


stay the same
A name can identify a set of objects
E.g. replicated servers at www.google.com

An object can have multiple names


E.g. www.uni-due.de and www.uni-duisburg-essen.de
Universitt Duisburg-Essen Torben Weis 6
Verteilte Systeme
Why do we need Naming Services?

Naming is a prerequisite for distribution transparency


Location transparency
WWW servers can be located anywhere in the world
DNS names provide location transparency

Relocation transparency
Location and address changes while name remains
E.g. moving a server to a different location or ISP

Replication transparency
www.microsoft.com You can get a response from EU
servers, US servers, etc.
Universitt Duisburg-Essen Torben Weis 7
Verteilte Systeme
Definitions

Name
Sequence of characters
Out of a character set
May be subject to rules that describe valid names
Generally limited in length
Name space
Set of all possible names
Name resolution
Get object that is referred to by name
Universitt Duisburg-Essen Torben Weis 8
Verteilte Systeme
Desired Objectives of a Naming Service

Global
Names are globally unique
Not subject to a local context
Distributed, not managed by a single authority
Memorable
Human-friendly names that can be easily memorized
Not a randomly chosen number
Securely unique
Always points to the right object
Attackers cannot hijack a name
Universitt Duisburg-Essen Torben Weis 9
Verteilte Systeme
Centralized Name Space

Properties:
+ Easy to implement

- Single point of failure


- Performance bottleneck

Universitt Duisburg-Essen Torben Weis 10


Verteilte Systeme
Distributed Name Space
Properties:
+ No Single point of
failure
+ Load sharing between
several name servers
- Failure of a name server
prevents name
generation and
resolution for its
corresponding partition
- Far more complex
implementation
Universitt Duisburg-Essen Torben Weis 11
Verteilte Systeme
Distributed Name Space with Replication

Properties:
+ High availability
+ Efficient access
+ Load sharing between
several name servers
- Replication
management necessary
- Possible inconsistencies
(stale data)
Universitt Duisburg-Essen Torben Weis 12
Verteilte Systeme
Replication vs. Caching

Replication
Server-driven: actively copy data to other components
How to keep all copies consistent?

Caching
Client-driven: store results after resolving a name
Look into cache before asking name server
When to remove stale entries?

Universitt Duisburg-Essen Torben Weis 13


Verteilte Systeme
Flat Name Space

Flat names
Have no structure
Contain no information about the location of or
the authority for an object
Examples:
412
#9B3FB1C8
4f6ab58014adf4785fe5fcce498145aecbe4d2fa

Universitt Duisburg-Essen Torben Weis 14


Verteilte Systeme
Hierarchical Name Space

Hierarchically structured names


Concatenation of nodes
E.g. /node1/files/peter/File1

Absolute path name


Full sequence of nodes

Relative path name


Part of sequence subject to local context
E.g. peter/File1 (if folder is /node1/files/)
E.g. pc02 (if domain is vs.uni-due.de)
Universitt Duisburg-Essen Torben Weis 15
Verteilte Systeme
Outline

Introduction and Definition of Terms


Challenges
Types of Naming Services
Examples
Uniform Resource Identifier
X.500 Directory Service
Domain Name System (DNS)

Universitt Duisburg-Essen Torben Weis 16


Verteilte Systeme
UNIFORM RESOURCE
IDENTIFIER
Universitt Duisburg-Essen Torben Weis 17
Verteilte Systeme
Uniform Resource Identifier

URI

URL URN

General naming scheme for the Internet


Supports different syntaxes (schemes)
Two subsets:
URL = URI that provides information how to locate a
resource
URN = URI without location information

Universitt Duisburg-Essen Torben Weis 18


Verteilte Systeme
Examples

http://joe:pw@example.net/index.php?action=view#section2

user +
scheme host path query fragment
password

mailto:joe@example.net?subject=clickable

scheme domain Header field


local part

urn:ISBN:0-395-36341-1

scheme Name ISBN number


space id (has inner
structure)
Universitt Duisburg-Essen Torben Weis 19
Verteilte Systeme
X.500

Universitt Duisburg-Essen Torben Weis 20


Verteilte Systeme
X.500 Directory

Stores information about objects (e.g. people,


services, organizations, ...)
Attribute-based name space
Objects are identified by their unique names
User can add, read, compare, change or delete
information about an object

Directory User Directory Server

Universitt Duisburg-Essen Torben Weis 21


Verteilte Systeme
X.500 Information Model

An entry contains one or


more attributes
An attribute consists of a
type and one or more
values
A type defines
characteristics of the
attribute
its abstract syntax
(ASN.1)

In case of multiple values:


Distinguished value
Universitt Duisburg-Essen Torben Weis 22
Verteilte Systeme
X.500 Directory Information Tree (DIT)

The DIT represents hierarchical relations


between objects

Universitt Duisburg-Essen Torben Weis 23


Verteilte Systeme
X.500 Directory Information Tree (DIT)
Relative distinguished name (RDN)
Uniquely identifies an entry
among its sibling nodes in the
DIT
Composed of one or more
attribute names and their
distinguished values.
Example: ORG = Uni-Stuttgart

Distinguished name (DN)


Uniquely identifies an entry in the
DIT
DN of an entry E:
Concatenation of all RDNs on the
path [root E]

Universitt Duisburg-Essen Torben Weis 24


Verteilte Systeme
X.500 Example

DN for Rothermel:
C = FRG; ORG = Uni-Stuttgart; F = Informatik;
I = IPVR; N = Rothermel
Universitt Duisburg-Essen Torben Weis 25
Verteilte Systeme
LDAP

X.500 is part of the ISO/OSI protocol suite


Impractical like the OSI model

LDAP: practical adaptation of X.500


Standardized network protocol
Purpose: get user/device/object data from directory
Used e.g. by Microsoft Active Directory

Search("&(C=NL)(O=Vrije Universiteit)
(OU=*)(CN=Main Server)")

Universitt Duisburg-Essen Torben Weis 26


Verteilte Systeme
DOMAIN NAME SYSTEM

Universitt Duisburg-Essen Torben Weis 27


Verteilte Systeme
Domain Name System (DNS)

Primary task
Mapping from symbolic domain names to IP
addresses
www.vs.uni-due.de 134.91.78.133

address?

Universitt Duisburg-Essen Torben Weis 28


Verteilte Systeme
Namespace

com org de nl

google uni-due

vs inf

mail www

Universitt Duisburg-Essen Torben Weis 29


Verteilte Systeme
Namespace (2)

Hierarchical name space


Domain: sequence of labels
Delimited by dot (last dot typically omitted)

Right-to-left significance
root is right, leaf is left
Second-level root (empty label)

www.vs.uni-due.de.

top-level

Universitt Duisburg-Essen Torben Weis 30


Verteilte Systeme
Zones

Name space cut into zones


.
Non-overlapping parts

Each zone is served by


de nl
authoritative name servers
Delegation of
google uni-due
subdomains to
other name servers
vs inf

mail www

Universitt Duisburg-Essen Torben Weis 31


Verteilte Systeme
Resource Records

www.vs.uni-due.de. 3600 IN A 134.91.78.133

Domain Name Time-to-live Type Data


Class

Field Description
Domain Name Name
Time-to-Live Caching duration in seconds
Class Practically always IN (Internet)
Type Data type of record
Data The actual information

Universitt Duisburg-Essen Torben Weis 32


Verteilte Systeme
Record Types (selection)
Type Description Data
A Address resolution 32 Bit address
www.vs.uni-due.de. IN A 134.91.78.133
AAAA IPv6 address resolution 128 Bit address
www.heise.de. IN AAAA 2a02:2e0:3fe:100::8
CNAME Canonical Name (Alias) Host Name
www.google.de. IN CNAME www.l.google.com.
MX Mail Transfer Agent for Domain Priority & Host Name
vs.uni-due.de. IN MX 10 mail.vs.uni-due.de.
NS Authoritative Nameserver for Domain Host Name
vs.uni-due.de. IN NS dns1.vs.uni-due.de.

Universitt Duisburg-Essen Torben Weis 33


Verteilte Systeme
Delegations

Context: uni-due.de servers


Delegate vs.uni-due.de to other name servers
vs.uni-due.de. IN NS dns1.vs.uni-due.de.
vs.uni-due.de. IN NS dns2.vs.uni-due.de.

dns1.vs.uni-due.de. IN A 134.91.78.133
dns2.vs.uni-due.de. IN A 134.91.78.131

Zone may be served by multiple uni-due


servers
Replicate zone data
vs

Universitt Duisburg-Essen Torben Weis 34


Verteilte Systeme
Example Lookup (1)

Query root
www.example.net. IN A ? .

net

Delegates net to another server


example
net. IN NS a.gtld-servers.net.
a.gtld-servers.net. IN A 192.5.6.30
www

Universitt Duisburg-Essen Torben Weis 35


Verteilte Systeme
Example Lookup (2)

www.example.net. IN A ?
net

Delegates example.net example

example.net. IN NS ns.example.net.
ns.example.net. IN A 193.0.0.236
www

Universitt Duisburg-Essen Torben Weis 36


Verteilte Systeme
Example Lookup (3)

net
www.example.net. IN A ?

example
Response from
authoritative name server
www
www.example.net. IN A 192.168.1.3

Universitt Duisburg-Essen Torben Weis 37


Verteilte Systeme
Query Types

Recursive: ask other nameservers if necessary


Iterative: dont ask other nameservers

recursive iterative
query queries

Universitt Duisburg-Essen Torben Weis 38


Verteilte Systeme
Query Types

Recursive: ask other nameservers if necessary


Iterative: dont ask other nameservers
Zone
Data

recursive iterative
query queries
Zone
Data

Cache
Cache
Zone
Data

Universitt Duisburg-Essen Torben Weis 39


Verteilte Systeme
DNS Summary

Resolves domain names to IP addresses


Hierarchical name space
Distributed but not decentralized: one root

Client-side caching
Maximum storage time: time-to-live

Server-side replication
Good scalability and performance

Universitt Duisburg-Essen Torben Weis 40


Verteilte Systeme

Vous aimerez peut-être aussi