Application Layer - Overview and Protocols
Application Layer - Overview and Protocols
Application Layer
Recall / Basics
Computer Networking: A
Top-Down Approach
8th edition n
Jim Kurose, Keith Ross
Pearson, 2020
Application Layer: 2-1
1
9/18/2024
Client-server paradigm
server: mobile network
always-on host national or global ISP
permanent IP address
often in data centers, for scaling
clients: local or
regional ISP
contact, communicate with server
may be intermittently connected home network content
provider
may have dynamic IP addresses network datacenter
network
2
9/18/2024
Peer-peer architecture
no always-on server mobile network
arbitrary end systems directly national or global ISP
communicate
peers request service from other
peers, provide service in return to
other peers local or
regional ISP
• self scalability – new peers bring new
service capacity, as well as new service home network content
demands provider
network datacenter
Processes communicating
process: program running clients, servers
within a host client process: process that
initiates communication
within same host, two server process: process
processes communicate that waits to be contacted
using inter-process
communication (defined by
OS) note: applications with
P2P architectures have
processes in different hosts client processes &
communicate by exchanging server processes
messages
Application Layer: 2-6
3
9/18/2024
Sockets
process sends/receives messages to/from its socket
socket analogous to door
• sending process shoves message out door
• sending process relies on transport infrastructure on other side of
door to deliver message to socket at receiving process
• two sockets involved: one on each side
application application
socket controlled by
process process app developer
transport transport
network network controlled
link by OS
link Internet
physical physical
Addressing processes
to receive messages, process identifier includes both IP address
must have identifier and port numbers associated with
host device has unique 32-bit process on host.
IP address example port numbers:
Q: does IP address of host on • HTTP server: 80
which process runs suffice for • mail server: 25
identifying the process? to send HTTP message to
A: no, many processes gaia.cs.umass.edu web server:
can be running on • IP address: 128.119.245.12
same host • port number: 80
4
9/18/2024
5
9/18/2024
6
9/18/2024
Securing TCP
Vanilla TCP & UDP sockets: TLS implemented in
no encryption application layer
cleartext passwords sent into socket apps use TLS libraries, that
traverse Internet in cleartext (!) use TCP in turn
Transport Layer Security (TLS) cleartext sent into “socket”
provides encrypted TCP connections traverse Internet encrypted
data integrity more: Chapter 8
end-point authentication
7
9/18/2024
Thank You
8
9/18/2024
HTTP overview
HTTP: hypertext transfer protocol
Web’s application-layer protocol
client/server model: PC running
• client: browser that requests, Firefox browser
receives, (using HTTP protocol) and
“displays” Web objects
server running
• server: Web server sends (using Apache Web
HTTP protocol) objects in response server
to requests
iPhone running
Safari browser
9
9/18/2024
10
9/18/2024
time time
Non-persistent HTTP response time = 2RTT+ file transmission time
Application Layer: 2-21
11
9/18/2024
~
~ entity body ~
~ body
12
9/18/2024
13
9/18/2024
14
9/18/2024
3 4
6 5
HTTP GET
Referrer: NY Times Sports
4
7493: NY Times sports, 2/15/22
5
“third party” cookie – HTTP reply
from website you did not NY Times: 1634 Set cookie: 7493
choose to visit AdX: 7493
AdX.com
15
9/18/2024
nytimes.com AdX:
tracks my web browsing
socks.com over sites with AdX ads
2
HTTP 1 can return targeted ads
GET based on browsing history
HTTP GET
Referrer: socks.com, cookie: 7493
4
7493: NY Times sports, 2/15/22
5 7493: socks.com, 2/16/22
HTTP reply
NY Times: 1634 Set cookie: 7493
AdX: 7493
AdX.com
nytimes.com (arts)
socks.com HTTP HTTP
GET reply
cookie: 1634 Set cookie: 1634
HTTP GET
Referrer: nytimes.com, cookie: 7493
4
7493: NY Times sports, 2/15/22
5 7493: socks.com, 2/16/22
HTTP reply 7493: NY Times arts, 2/15/22
NY Times: 1634 Set cookie: 7493
AdX: 7493 Returned ad for socks!
AdX.com
16
9/18/2024
Web caches
Goal: satisfy client requests without involving origin server
user configures browser to
point to a (local) Web cache Web
cache
browser sends all HTTP client
origin
server
requests to cache
• if object in cache: cache
returns object to client
• else cache requests object
client
from origin server, caches
received object, then
returns object to client
Application Layer: 2-33
17
9/18/2024
HTTP Versions
HTTP/1.1
18
9/18/2024
HTTP/2
Key goal: decreased delay in multi-object HTTP requests
HTTP/2: [RFC 7540, 2015] increased flexibility at server in sending
objects to client:
methods, status codes, most header fields unchanged from HTTP 1.1
transmission order of requested objects based on client-specified
object priority (not necessarily FCFS)
push unrequested objects to client
divide objects into frames, schedule frames to mitigate HOL blocking
HTTP/3
HTTP/3: adds security, per object error- and congestion-
control (more pipelining) over UDP
19
9/18/2024
Thank You
20