Fa18-Bse-029 Huzaifa Waheed Assignment 1:: Web Caching
Fa18-Bse-029 Huzaifa Waheed Assignment 1:: Web Caching
Fa18-Bse-029 Huzaifa Waheed Assignment 1:: Web Caching
Huzaifa Waheed
Assignment 1:
Q#1.
Describe how Web caching can reduce the delay in receiving a requested object. Will Web
caching reduce the delay for all objects requested by a user or for only some of the objects?
Why?
Answer:
Web caching:
Basically web caching is the temporary storage of documents , images , video files and html
pages to reduce bandwidth usage. Web caching is activity of storing data for reuse. It is stored
when the user first time visits the page and the next time a user requests the same page then a
cache will serve the copy so this process keeps the origion server from getting overloaded.
how Web caching can reduce the delay in receiving a requested object:
when the user requests an object first time from origin server then the response from the
server is stored in the proxy server . now when the user requests the same object again then
the proxy server will respond and proceed the user request instead of origin server. web
caching can reduce the response time for clients requests only when the cache has requested
object. So this will reduce the delay in receiving a requested objects.
Will Web caching reduce the delay for all objects requested by a user or for
only some of the objects:
No web caching will not reduce the delay for all objects it will only reduce the delay for
requests when the cache or proxy server has requested object otherwise it will not reduce the
response time.
For reducing response time the proxy server or cache must have client requested object. The
whole procedure is discussed above.
Q#2.
Suppose you wanted to do a transaction from a remote client to a server as fast as
possible. Would you use UDP or TCP? Why?
Answer:
I would use UDP. With UDP, the transaction can be completed in one roundtrip time (RTT) - the
client sends the transaction request into a UDP socket, and the server sends the reply back to
the client's UDP socket. But With TCP, a minimum of two RTTs are needed - one to set-up the
TCP connection, and another for the client to send the request, and for the server to send back
the reply. As client is in remote area and for fast transaction I will prefer UDP.
----------------------------------------------------------------------------------------