HTTP & DNS Flashcards
HTTP (HyperText Transfer Protocol)
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
HTTP is stateless
the server maintains no information about past client requests
HTTP Connections
Non-persistent HTTP & persistent HTTP
Non-persistent HTTP - friendly overview
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.
Non-persistent - Technical insight
A single connection is used for only one HTTP request and response. After the response is delivered, the connection is terminated.
Persistent HTTP - Friendly overview
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
DNS stands for
Domain Name System
What is a Domain Name System:
-> Distributed database implemented
in hierarchy of many name
servers.
-> Application-layer protocol: hosts,
name servers communicate to
resolve names (address/name
translation)
-> Uses UDP
Why not centralize DNS?
Single point of failure
traffic volume
distant centralized database
Services provided by DNS
Hostname to IP address translation
Load distribution: replicated web servers (many IP address correspond to one name)
DNS: a distributed, hierarchical database
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
DNS: root name servers
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
TLD, authoritative servers |top-level domain (TLD) servers:
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
Local DNS name server
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
Two ways of DNS resolution
Iterative and Recursive