26 October 2019
Network(12) -- DNS
by Jerry Zhang
DNS caching
DNS extensively exploits DNS caching in order to improve the delay performance and to reduce the number of DNS messages
In fact, because of caching, root servers are bypassed for all but a very small fraction of DNS queries.
DNS Records and Messages
resource records (RRs)
A resource record is a four-tuple that contains the following fields:
(Name, Value, Type, TTL)
- If Type=A , then Name is a hostname and Value is the IP address for the hostname.
- If Type=NS , then Name is a domain (such as foo.com ) and Value is the hostname of an authoritative DNS server that knows how to obtain the IP addresses for hosts in the domain.
- If Type=CNAME , then Value is a canonical hostname for the alias hostname Name .
- If Type=MX , then Value is the canonical name of a mail server that has an alias hostname Name .
DNS Messages
- The first 12 bytes is the header section, which has a number of fields.
- The question section contains information about the query that is being made.
- In a reply from a DNS server, the answer section contains the resource records for the name that was originally queried.
- The authority section contains records of other authoritative servers.
- The additional section contains other helpful records.
Peer-to-Peer File Distribution
Dcs >= Max{NF/us,Fdmin}
Dp2p = Max{F/us,F/dmin,NF/(us + ΣuN)}
In deciding which chunks to request, Alice uses a technique called rarest first.
Alice gives priority to the neighbors that are currently supplying her data at the highest rate. Specifically, for each of her neighbors, Alice continually measures the rate at which she receives bits and determines the four peers that are feeding her bits at the highest rate.
tags: Network