HTTP - Web Caching and Conditional Request
HTTP - Web Caching and Conditional Request
HTTP - Web Caching and Conditional Request
For those popular Web pages visited frequently in a local area, how to
improve the Web service?
Web caching
Page 2
Outline
1. Web 5. Cookies
2. HTTP overview 6. Web caching
3. HTTP connections 7. Conditional request
4. HTTP messages 8. Streaming multimedia
Page 3
Web caching
Goal: satisfying HTTP request without responding from origin server
A proxy server caches copies of
Web objects that are requested
recently
Amy
Client (browser) sends all HTTP Client
requests to proxy server response
Requested object is in cache: proxy Proxy Origin
server returns object server server
Otherwise, proxy server requests
object from origin server, then returns
Bob
it to client Client
browser setting
Page 4
Proxy server
Proxy server acts as both
client and server
Server for original Amy
requesting client Client
Client for origin server response
Proxy Origin
Proxy servers are usually server server
located closed to client
Installed by ISP Bob
Client
(university, company,
residential ISP)
Page 5
Why Web caching?
Advantages of Web caching
Shorten response time for client request
Reduce traffic on institution's WAN link, backbone network,
server located in data center
Page 6
Web caching example
Scenario:
Average object size: 1M bits
Origin
Average request rate from browsers to origin servers
servers:15 times/sec
Average data rate to browsers: 15 Mbps Public Internet
Size of HTTP request message is negligible
RTT between institutional router and any
origin server: 2 secs 15Mbps
Result: WAN
Institutional
LAN utilization = 15% network 100Mbps
WAN utilization = 100% LAN
Response delay = Internet delay + WAN
delay (queuing) + LAN delay
= 2 secs + minutes + msecs Local Web cache
Page 7
Cache update
Conditional request
Page 8
Outline
1. Web 5. Cookies
2. HTTP overview 6. Web caching
3. HTTP connections 7. Conditional request
4. HTTP messages 8. Streaming multimedia
Page 9
Conditional request
Goal: Server will respond with object if the condition is met
Advantages
No object transmission delay
Lower link utilization
Page 10
Conditional request (continued)
• Client (Cache): specify date of Client Server
cached copy in HTTP request
HTTP request msg
If-modified-since: <date> If-modified-since: Mon, 29 Object not
Jun 2020 00:00:00 GMT
modified
• Server: HTTP response HTTP response msg after <date>
message contains no object if HTTP/1.1 304 Not Modified
Page 11
Thanks!
工科类 20 号
教师:唐晓岚
Page 12