Lecture 3 To Lecture 5 (HTTP) PDF
Lecture 3 To Lecture 5 (HTTP) PDF
(Computer Networks)
Vishal Gupta
Department of Computer Science and Information Systems
BITS Pilani Birla Institute of Technology and Science
Pilani|Dubai|Goa|Hyderabad
Pilani Campus, Pilani
BITS Pilani
Pilani|Dubai|Goa|Hyderabad
The slides aretaken from the slides made available for Computer Networking:ATop DownApproach 6th edition Jim Kurose,Keith RossAddison-Wesley
Network Vocabulary
• Hosts / End-Systems
• Communication Links
• Packet Switches (Routers, Link Layer
Switches)
• Transmission rate
• Packets
• Access Network
• Network Core
• Path
• Connection Oriented Service vs.
Connection Less Service
• ISP
• IETF (Internet Engineering Task Force)
• RFC
• IEEE (eg IEEE 802 LAN/MAN Standards
Committee)
VISHAL GUPTA, PhD 3 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
What is a Protocol
VISHAL GUPTA, PhD 4 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
What is a Protocol
a human protocol and a computer network protocol:
VISHAL GUPTA, PhD 5 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Creating a Network
Application
application
transport
write programs that: network
data link
VISHAL GUPTA, PhD 7 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Client-server architecture
server:
• always-on host
• permanent IP address
• data centers for scaling
clients:
• communicate with server
client/server
• may be intermittently connected
• may have dynamic IP addresses
• do not communicate directly
with each other
VISHAL GUPTA, PhD 8 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
P2P architecture
• no always-on server peer-peer
• 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
• peers are intermittently
connected and change IP
addresses
– complex management
VISHAL GUPTA, PhD 9 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Processes communicating
process: program running clients, servers
within a host client process: process
• within same host, two that initiates
communication
processes communicate
using inter-process server process: process
communication (defined by that waits to be contacted
OS)
• processes in different hosts aside: applications with P2P
communicate by architectures have client
exchanging messages processes & server
processes
application application
socket controlled by
process process app developer
transport transport
network network controlled
link by OS
link Internet
physical physical
HTTP Protocol
Hyper Text Transfer Protocol
Web and HTTP
First, a review…
• web page consists of objects
• object can be HTML file, JPEG image, Java
applet, audio file,…
• web page consists of base HTML-file which
includes several referenced objects
• each object is addressable by a URL, e.g.,
www.someschool.edu/someDept/pic.gif
Application Layer 2-14 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
HTTP overview
HTTP: hypertext transfer
protocol
• Web’s application layer
protocol PC running
Firefox browser
• client/server model
– client: browser that
requests, receives,
(using HTTP protocol) server
and “displays” Web running
objects Apache Web
– server: Web server server
sends (using HTTP
protocol) objects in iphone running
response to requests Safari browser
time
6. Steps 1-5 repeated for each of
10 jpeg objects
~
~ entity body ~
~ body
Application Layer 2-26 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
HTTP response status codes
status code appears in 1st line in server-to-
client response message.
some sample codes:
200 OK
– request succeeded, requested object later in this msg
301 Moved Permanently
– requested object moved, new location specified later in this msg
(Location:)
400 Bad Request
– request msg not understood by server
404 Not Found
– requested document not found on this server
505 HTTP Version Not Supported
Application Layer 2-27
Trying out HTTP (client side) for yourself
1. Telnet to your favorite Web server:
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
msecs
Cost: increased access link speed (not cheap!)
Application Layer 2-35
Caching example: install local cache
assumptions:
avg object size: 100K bits
avg request rate from browsers to origin
origin servers:15/sec servers
public
avg data rate to browsers: 1.50 Mbps Internet
RTT from institutional router to any
origin server: 2 sec
access link rate: 1.54 Mbps
consequences: 1.54 Mbps
LAN utilization: 15% access link
access link utilization = 100% institutional
total delay = Internet delay + access network
delay + LAN delay ? 1 Gbps LAN
= 2 sec + minutes? + usecs
local web
How to compute link cache
utilization, delay?
Cost: web cache (cheap!)
Application Layer 2-36
Caching example: install local cache
Calculating access link
utilization, delay with cache:
• suppose cache hit rate is 0.4 origin
– 40% requests satisfied at cache, 60% servers
requests satisfied at origin public
Internet
January 17, 2020 COMPUTER NETWORKS 39 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
• What is the use of cookies ??
• What is the difference between web caching and proxy server ??
• Conditional Get.
January 17, 2020 COMPUTER NETWORKS 40 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani
Pilani|Dubai|Goa|Hyderabad