CSE 3711 Lecture-No. 3 (Summer 2023)
CSE 3711 Lecture-No. 3 (Summer 2023)
CSE 3711 Lecture-No. 3 (Summer 2023)
Summer 2023
Outline
2.4 DNS
Spring 2006
Chapter 2: application layer
2-5
Some Network Apps
• e-mail • voice over IP (e.g.,
• web Skype)
• text messaging • real-time video
• remote login conferencing
• P2P file sharing • social networking
• multi-user network
games
• search
• streaming stored video • …
(YouTube, Hulu, • …
Netflix)
Application Layer 2-6
Creating a network app
application
transport
network
2-8
Client-server architecture
In a client-server architecture, there is
an always-on host, called the server,
which services requests from many
other hosts, called clients.
Server:
• always-on host
• permanent IP address
• data centers for scaling
• E.g., Web Server
client/server
Clients:
• Do not communicate directly with each other
– e.g. browsers don’t talk to each other.
• communicate with server
• may be intermittently/irregularly connected
• may have dynamic IP addresses 2-9
• In a client-server application, a single-server host is incapable of
keeping up with all the requests from clients.
– A popular social-networking site can quickly become overwhelmed
if it has only one server handling all of its requests.
– A data center, housing a large number of hosts, is often used to
create a powerful virtual server.
– For example,
• Search engines (e.g., Google, Bing, Baidu),
• Internet commerce (e.g., Amazon, eBay, Alibaba),
• Web-based e-mail (e.g., Gmail and Yahoo Mail),
• Social media (e.g., Facebook, Instagram, Twitter, and WeChat), etc.
• Run in one or more data centers.
– Google has 19 data centers distributed around the world,
• To collectively handle search, YouTube, Gmail, and other services.
– A data center can have hundreds of thousands of servers, which
must be powered and maintained.
P2P architecture
• In a P2P architecture, there is minimal (or no) reliance
on dedicated servers in data centers. peer-peer
• Instead the application exploits direct communication
between pairs of intermittently connected hosts, called
peers.
• No always-on server
• Arbitrary end systems directly communicate
• Peers request service from other peers, provide service
in return to other peers
– Self scalability – new peers bring new
service capacity, as well as new service
demands
• For example, in a P2P file-sharing application,
although each peer generates workload by
requesting files, each peer also adds service
capacity to the system by distributing files to
other peers.
• Peers are intermittently connected and change IP
addresses 2-11
Processes communicating
• It is not actually programs clients, servers
but processes that A network application consists of pairs
of processes that send messages to
communicate each other over a network.
• A process: client process: process that initiates
communication
– is a program running within server process: process that waits to be
an end system or host contacted
Timing
• some apps (e.g., Internet telephony, interactive games) require low delay to be
“effective”
Throughput
some apps (e.g., multimedia) require minimum amount of throughput to be
“effective”
other apps (“elastic apps”) make use of whatever throughput they get
Security
encryption, data integrity, …
2-16
Transport service requirements: common apps
application underlying
application layer protocol transport protocol
protocol) objects in
response to Application Layer 2-24
requests
HTTP overview (continued)
uses TCP: HTTP is
client initiates TCP “stateless”
connection (creates socket) to • server maintains no
information about
server, port 80 past client requests
server accepts TCP aside
connection from client protocols that maintain
HTTP messages (application- “state” are complex!
layer protocol messages) past history (state) must be
maintained
exchanged between browser if server/client crashes, their
(HTTP client) and Web server views of “state” may be
(HTTP server) inconsistent, must be
reconciled
TCP connection closed
Application Layer 2-25
HTTP connections
non-persistent HTTP persistent HTTP
• at most one object sent over TCPobjects
• multiple connection
– connection then closed can be sent over
singlerequired
• downloading multiple objects TCP
multiple connections connection
between client,
server
time
6. Steps 1-5 repeated for each of 10
jpeg objects
• https://www.geeksforgeeks.org/http-non-persistent-persistent-connection-set-2/
Comparison
Persistent Non-Persistent
• 1 RTT for TCP • 1 RTT for TCP
Connection Connection
• 1 RTT for the Base File • 1 RTT for the Base File
• 1 RTT for all objects • For each Object do
– 1 RTT for TCP
Connection
– 1 RTT for the Object
HTTP request message
• two types of HTTP messages: request, response
• HTTP request message:
– ASCII (human-readable format)
carriage return character
line-feed character
request line
(GET, POST, GET /index.html HTTP/1.1\r\n
HEAD commands) Host: www-net.cs.umass.edu\r\n
User-Agent: Firefox/3.6.10\r\n
Accept: text/html,application/xhtml+xml\r\n
headerAccept-Language: en-us,en;q=0.5\r\n
linesAccept-Encoding: gzip,deflate\r\n
carriage return, Accept-Charset: ISO-8859-1,utf-8;q=0.7\r\n
line feed at start Keep-Alive: 115\r\n
Connection: keep-alive\r\n
of line indicates \r\n
end of header lines
ebay 8734
usual http request msg Amazon server
cookie file creates ID
usual http response
1678 for user create backend
ebay 8734
set-cookie: 1678 entry database
amazon 1678
usual http request msg
cookie: 1678 cookie- access
specific
usual http response msg action
• If a server requires data for a zone, it will request a transfer of that data from an
authoritative server for that zone. The process of transferring DNS data between
servers is known as zone transfer.
DNS: a distributed, hierarchical database
Root DNS Servers
… …
gaia.cs.umass.edu
gaia.cs.umass.edu
type=A type=CNAME
name is hostname name is alias name for some
value is IP address “canonical” (the real) name
www.ibm.com is really
type=NS servereast.backup2.ibm.com
– name is domain (e.g., value is canonical name
foo.com)
– value is hostname of
authoritative name server type=MX
for this domain value is name of mailserver
associated with name
Question The question for the server. It contains the domain name to be resolved, the class of
domain, and the query type.
The DNS resource record, or RR, for the query including the resolved IP address
Answer
depending on the RR type.
Authority Contains the RRs for the domain authority.
Relevant to query responses only. Consists of RRs that hold additional information
Additional
that will make query resolution more efficient
DNS protocol, messages
• query and reply messages, both with same message format
2 bytes 2 bytes
2 bytes 2 bytes
identification flags
msecs