Lecture 2 Flashcards
Application Layer
What does HTTP stand for?
HyperText Transfer Protocol.
What is the application-layer protocol that is at the center of the Internet?
The hypertext transfer protocol.
What transport protocol does HTTP use? Can you explain the how it uses it?
TCP.
To use it, the client initiates a TCP connection through sockets with the server on port 80. The messages are exchanged between the client and server. The connection is then closed.
What does it mean that HTTP is a stateless protocol?
It doesn’t store any data about the clients or requests.
What is Non-persistant HTTP?
When only one object is sent over a TCP connection for HTTP(Requests are not included as objects). Once the first response object acknowledged by the client, the server will close the connection.
What is persistant HTTP?
When multiple objects are transfered over the connection (Requests made on the clients part are not objects). A server will leave the connection open after sending a response object, and will wait for another request. The server will close the connect if not used for a long time.
What is round trip time (RTT)?
The time it takes a packet of data to travel from the client to the server then back to the client.
What is the response time for Non-persistant HTTP?
2RTT + transmission time.
One round trip time (RTT) to initiate the TCP connection with the server. Another RTT to make the request and have receive the response from the server. We also add the file transmission time to this.
Name 3 disadvantages of Non-persistant HTTP?
- Each object requires a minimum of 2RTT. Thus it can take a long time.
- Operating system overhead required for each TCP connection.
- Browsers can open multiple TCP connections at a time.
What is included in a HTTP request?
The request line. The header lines. A blank line. The entity body. And an end of message marker.
What is included in a HTTP response?
The status line. The header lines. A blank line. The entity body. An end of message marker.
Since HTTP is stateless, how does it succeed when a persistant user state or client information is needed?
It uses cookies to store the information. The client keeps a cookie file and the server keeps a back-end database. Both the HTTP request and response pass cookie ID.
What is the goal of Web caching?
To satisfy user requests without involvement of the origin server. A browser/client will instead communicate will a proxy server. Clients are configured to use these proxys.
Explain how Web caching is carried out on a connection.
- The browser sets up a TCP connection with a proxy server/Web cache and sends a HTTP request for a Web object.
- The Web cache checks if it has the object stored locally. If so, it sets the object back as a HTTP response.
- If it doesn’t have the object, it will then connect to the origin server and request the object.
- Once the Web cache receives the object from the origin server, it will sent it to the client and store the object for future requests.
Advantages of Web caching?
It reduces the response times for the client requests by having requested objects stored locally.
It can reduce the work load on the origin server.
Substantially reduces the amount of traffic on institutional access links.
It is used to filter unsuitable and unsafe content.