Computer Networks · TEE · mocks

Q3C · Application-layer mechanism

TEE mock A · full paper

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

TEE practice mock · Q3C. Explain with a diagram how the WWW uses HTTP when a user enters http://www.example.com. Describe components and the client-server mechanism. [10 mock marks]

Answer

The World Wide Web (WWW) is an information system of linked resources identified by URLs and accessed using Web clients and servers. A browser is a client; a Web server hosts or generates representations such as HTML, images or JSON. HTTP defines request/response semantics between these components. The Web is one application of the Internet, not a synonym for the entire Internet.

Swipe across the diagram to read its labels ↔
Opening a plain HTTP/1.1 URL
Diagram: Opening a plain HTTP/1.1 URL. Labels: Opening a plain HTTP/1.1 URL | Opening a plain HTTP/1.1 URL | Browser parses http://www.example.com/ | Scheme=http, host=www.example.com, path=/, default port=80. | DNS resolves the host | A cached or newly resolved address identifies the target endpoint. | TCP establishes the connection | For this HTTP/1.1 example, client connects to server port 80. | HTTP request → HTTP response | GET / with Host header → status, headers and representation body. | Browser parses and displays | HTML may refer to extra objects, each needing retrieval or cache lookup.
URL → DNS → connection → HTTP request/response → displayed document.
  1. Interpret the URL http://www.example.com/: scheme=http; host=www.example.com; path=/; absent explicit port, plain HTTP uses default port 80. A fragment identifier, if present, is handled by the client and is not sent as part of an HTTP target.
  2. Resolve the hostname using DNS, often via cached results and a recursive resolver. DNS finds an address; it does not download the Web page.
  3. For this plain HTTP/1.1 example, establish a TCP connection to the server on port 80. HTTPS additionally protects HTTP using TLS; do not add TLS to an explicitly plain-http example without stating a redirect or change of scheme.
  4. Send a request such as GET / HTTP/1.1 with Host: www.example.com. The server identifies the target resource, processes the request and prepares a response.
  5. Receive a status line such as HTTP/1.1 200 OK, response headers such as Content-Type, and the response body. A 404 response indicates no matching resource was found; redirects instruct the client to another target.
  6. The browser parses HTML, retrieves referenced objects as needed and renders the page. Caching may avoid transfers; persistent connections can serve multiple requests.
Message componentPurpose
Request method / targetRequested action and resource; GET retrieves a representation, POST submits data for processing
HeadersMetadata, routing context, representation preferences and cache/connection information
Status codeResult class: 2xx success, 3xx redirection, 4xx client error, 5xx server error
BodyRepresentation or submitted content when present

HTTP semantics are stateless: each request has its own meaning. Cookies/tokens can let an application maintain a login session; stateless does not mean “users cannot log in”. HTTP/1.1 and HTTP/2 commonly use TCP; HTTP/3 uses QUIC over UDP, so “HTTP always uses TCP” is not a universal statement.