HTTP & DNS Flashcards

1
Q

HTTP (HyperText Transfer Protocol)

A

Imagine HTTP as the language that web browsers (like Google Chrome or Mozilla Firefox) use to talk to web servers when you want to fetch a web page or send data to a server. When you type a website address into your browser, it uses HTTP to request the web page’s data from the server, and then the server responds with the necessary data to display the page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

HTTP is stateless

A

the server maintains no information about past client requests

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

HTTP Connections

A

Non-persistent HTTP & persistent HTTP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Non-persistent HTTP - friendly overview

A

Eeach HTTP request requires a separate TCP connection to the server. This means that for every resource (like an image, JavaScript file, or stylesheet) your browser needs to load from a website, it makes a new connection, uses it to fetch the resource, and then closes it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Non-persistent - Technical insight

A

A single connection is used for only one HTTP request and response. After the response is delivered, the connection is terminated.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Persistent HTTP - Friendly overview

A

Persistent HTTP improves upon the limitations of non-persistent HTTP. Using persistent HTTP, the connection to the server stays open, allowing multiple requests and responses to be sent over the same connection. It’s like keeping the line open with your friend and having a full conversation without hanging up after each sentence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

DNS stands for

A

Domain Name System

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a Domain Name System:

A

-> Distributed database implemented
in hierarchy of many name
servers.
-> Application-layer protocol: hosts,
name servers communicate to
resolve names (address/name
translation)
-> Uses UDP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Why not centralize DNS?

A

Single point of failure
traffic volume
distant centralized database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Services provided by DNS

A

Hostname to IP address translation
Load distribution: replicated web servers (many IP address correspond to one name)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

DNS: a distributed, hierarchical database

A

When you type a web address into your browser, DNS resolution involves several steps:

  • DNS Recursive Resolver: Initiated by your ISP, this server makes queries on your behalf.
  • Root Name Servers: The query starts at the root level, which directs the resolver to a TLD server based on the suffix of the domain.
  • TLD Name Servers: These servers direct the query to the authoritative name servers for the domain.
  • Authoritative Name Servers: These have the final mapping of the domain name to its IP address.

Example:
suppose client wants IP for www.amazon.com
▪ client queries root server to find com DNS server
▪ client queries .com DNS server to get amazon.com DNS server
▪ client queries amazon.com DNS server to get IP address for www.amazon.com

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

DNS: root name servers

A

Contacted by local name server that can not resolve name.
What it does is it contacts authoritative name server if name mapping not known
* gets mapping
* returns mapping to local name server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

TLD, authoritative servers |top-level domain (TLD) servers:

A

Responsible for com, org, net, edu …
* all top-level country domains, e.g.: uk, fr, ca, jp, …

Authoritative DNS servers:
* organization’s own DNS server(s)
* provides authoritative hostname to IP mappings for organization’s named hosts
* can be maintained by organization or service provider

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Local DNS name server

A

does not strictly belong to hierarchy
▪ each ISP (residential ISP, company, university) has one
* also called “default name server”
▪ when host makes DNS query, query is sent to its local DNS server
* local cache of recent name-to-address translation pairs (but may be out of
date!)
* acts as proxy, forwards query into hierarchy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Two ways of DNS resolution

A

Iterative and Recursive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Iterative Resolution

A

the client (usually a DNS resolver) makes a query to a DNS server, which responds with the best answer it can provide. If the server does not have the exact answer, it refers the resolver to another DNS server that is closer to the information requested. The resolver then queries the referred DNS server, and this process continues until the resolver reaches an authoritative server that can provide the actual IP address or until an error occurs.

17
Q

Key aspect so iterative resolution

A
  • Client Responsibility: The client is responsible for making multiple queries to different DNS servers.
  • Less Load on Servers: Since each server provides the best answer it has and does not perform additional queries on its own, this method puts less processing load on the DNS servers.
  • Potential for Delay: Each referral means that the client has to make an additional network request, potentially increasing the total resolution time.
18
Q

Recursive Resolution

A

Recursive DNS resolution simplifies the client’s role. When the client (usually your computer or local network’s DNS resolver) makes a request to a recursive DNS server, that server takes on the responsibility of resolving the domain name all the way to fetching the IP address. The recursive server will query other DNS servers on behalf of the client, following the chain of referrals until it retrieves the final answer from an authoritative server. It then returns this answer back to the client.

19
Q

Key aspects of Recursive Resolution

A
  • Server Responsibility: The recursive server handles all the queries required to resolve the domain, significantly simplifying the client’s role.
  • Higher Load on Recursive Server: This method can put more load on the recursive server, as it has to manage and maintain the state of multiple queries and responses.
  • Potentially Faster for Clients: Clients receive a quicker resolution from their perspective because they make only one query and receive one response, regardless of how many steps the recursive server had to take.
20
Q

DNS records

A

Distributed database storing resource records

21
Q

type=A

A

▪ name is hostname
▪ value is IP address

22
Q

type=NS

A
  • name is domain (e.g., trincoll.edu)
  • value is hostname of authoritative
    name server for this domain
23
Q

type=CNAME

A

▪ name is alias name for some “canonical” (the
real) name
* www.ibm.com is really
www.ibm.com.cs186.net
▪ value is canonical name

24
Q

type=MX

A

▪ value is name of mail server associated with name