HTTP connections: Non-persistent vs Persistent

InstrumentalOlivine avatar
InstrumentalOlivine
·
·
Download

Start Quiz

Study Flashcards

10 Questions

What does a '200 OK' response code indicate in the context of HTTP messages?

The request succeeded, and the requested object is later in the message.

When a client receives a '301 Moved Permanently' response code, what action should it take based on the information provided?

Request the object from the new location specified in the message.

What purpose does a '404 Not Found' response code serve when received by a client?

Signal that the requested document was not found on the server.

In the context of Web caching, what role does a proxy server play?

Handles all HTTP requests and responses without involving the origin server directly.

Why do many websites use cookies as described in the text?

To improve user-server state management by storing information on the user's host.

What is one of the functions of a cookie file kept on a user's host as mentioned in the text?

Manage user preferences and state information during sessions.

How does a cache function in web browsing when serving as a proxy server?

It satisfies client requests without directly involving the origin server by caching objects.

What entity typically installs a cache for Web caching purposes as mentioned in the text?

Internet Service Providers (ISPs) like universities or companies.

'User-server state: cookies' refers to which of the following components mentioned in the text?

'Cookie file kept on user's host.'

'505 HTTP Version Not Supported' indicates what issue in an HTTP connection based on the text?

'505 HTTP Version Not Supported' due to incompatible versions between client and server.

Study Notes

HTTP Basics

  • Past history (state) must be maintained if a server/client crashes, and their views of "state" may be inconsistent, requiring reconciliation.
  • Non-persistent HTTP: at most one object sent over a TCP connection, which is then closed.

Non-persistent HTTP

  • Steps to retrieve an object:
    • Client initiates a TCP connection to the HTTP server.
    • Client sends an HTTP request message containing the URL.
    • HTTP server receives the request, forms a response message, and sends it back.
    • HTTP server closes the TCP connection.
  • Response time: 2RTT + file transmission time (where RTT = time for a small packet to travel from client to server and back).

Persistent HTTP

  • Multiple objects can be sent over a single TCP connection between client and server.
  • Server leaves the connection open after sending the response.
  • Subsequent HTTP messages between the same client/server are sent over the open connection.

HTTP Request Methods

  • POST method: upload form input to the server in the entity body.
  • URL method: uses GET method, and input is uploaded in the URL field of the request line.
  • Method types:
    • HTTP/1.0: GET, POST, HEAD
    • HTTP/1.1: GET, POST, HEAD, PUT, DELETE

HTTP Response Status Codes

  • Status code appears in the first line of the server-to-client response message.
  • Sample codes:
    • 200 OK: request succeeded, requested object later in the message.
    • 301 Moved Permanently: requested object moved, new location specified later in the message.
    • 400 Bad Request: request message not understood by the server.
    • 404 Not Found: requested document not found on this server.
    • 505 HTTP Version Not Supported

Cookies and Web Caches

  • Cookies: used to maintain user-server state, consisting of a cookie header line in the HTTP response message, a cookie header line in the next HTTP request message, a cookie file kept on the user's host, and a back-end database at the Web site.
  • Web caches (proxy server): goal is to satisfy client requests without involving the origin server.
    • Cache acts as both client and server.
    • Typically installed by ISP (university, company, residential ISP).

Learn about the differences between non-persistent and persistent HTTP connections, including the handling of state maintenance, sending multiple objects over TCP connections, and the impact on user experience when downloading multiple objects. Explore the concepts of state reconciliation and inconsistency in server/client views.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Untitled
2 questions

Untitled

SupportiveCatSEye6941 avatar
SupportiveCatSEye6941
HTTP Connection Management Models
10 questions
HTTP Request Methods and Structure
16 questions
Use Quizgecko on...
Browser
Browser