Back to the 2024 paper

Module II — Browser and Apache Web Server Architecture

20247m

Describe commonly used protocols like HTTP, FTP, SMTP, and POP. How does each protocol serve different purposes in web communications?

Worked SolutionAI Assisted

Web protocols

Protocols are agreed rules for communication. Each one below works at the application layer and typically runs over TCP.

1. HTTP (HyperText Transfer Protocol)

  • Purpose: transfers web pages and resources between browser and web server.
  • Port: 80 (HTTPS = HTTP over TLS, port 443).
  • Model: request/response and stateless.
  • Methods: GET (retrieve), POST (submit), PUT (update), DELETE (remove), HEAD.
  • Status codes: 200 OK, 301 redirect, 404 Not Found, 500 Server Error.
GET /index.html HTTP/1.1
Host: www.example.com

2. FTP (File Transfer Protocol)

  • Purpose: uploading and downloading files between a client and a server (e.g. publishing a site to a host).
  • Ports: 21 (control), 20 (data).
  • Uses two connections (control and data), needs username/password authentication, and is unencrypted (use SFTP or FTPS for security).

3. SMTP (Simple Mail Transfer Protocol)

  • Purpose: sending email from a client to a mail server and between mail servers (push protocol).
  • Port: 25 (587 for submission with TLS).
  • Handles routing and delivery of the outgoing message.

4. POP (Post Office Protocol, POP3)

  • Purpose: retrieving email from the server to the client (pull protocol).
  • Port: 110 (995 with SSL).
  • Downloads messages to the local device, and normally deletes them from the server. Simple, but less suited to multiple devices than IMAP.

Comparison

Protocol Purpose Port Direction
HTTP Web pages/resources 80 / 443 Client ↔ web server
FTP File transfer 20, 21 Client ↔ file server
SMTP Send email 25 / 587 Client → server, server → server
POP3 Receive email 110 / 995 Mail server → client

Working together: the user browses with HTTP, uploads site files with FTP, sends mail through SMTP, and reads mail through POP3 (or IMAP).

Similar questions

Budget AppAndroid App

Pocketly on Android

Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.