Podcast
Questions and Answers
Which HTTP methods are considered to be safe?
Which HTTP methods are considered to be safe?
What defines an idempotent request?
What defines an idempotent request?
Which statement is true about the HTTP methods POST and PATCH?
Which statement is true about the HTTP methods POST and PATCH?
What does the URI in a PUT request identify?
What does the URI in a PUT request identify?
Signup and view all the answers
Which of the following headers indicates the estimated age of the entity?
Which of the following headers indicates the estimated age of the entity?
Signup and view all the answers
When should you use the GET method?
When should you use the GET method?
Signup and view all the answers
Which header field specifies whether the server can handle partial requests?
Which header field specifies whether the server can handle partial requests?
Signup and view all the answers
In the structure of an HTTP response message, what comes after the status-line?
In the structure of an HTTP response message, what comes after the status-line?
Signup and view all the answers
Which statement accurately differentiates the Web from the Internet?
Which statement accurately differentiates the Web from the Internet?
Signup and view all the answers
What role does the Transport layer play in the TCP/IP model?
What role does the Transport layer play in the TCP/IP model?
Signup and view all the answers
What is a characteristic of Internet Service Providers (ISPs)?
What is a characteristic of Internet Service Providers (ISPs)?
Signup and view all the answers
What is the primary purpose of Internet Exchange Points (IXPs)?
What is the primary purpose of Internet Exchange Points (IXPs)?
Signup and view all the answers
Which option describes the influence of the last mile on user-perceived bandwidth?
Which option describes the influence of the last mile on user-perceived bandwidth?
Signup and view all the answers
What is a significant challenge in computer science related to web engineering?
What is a significant challenge in computer science related to web engineering?
Signup and view all the answers
What does the Internet layer's role involve in the TCP/IP model?
What does the Internet layer's role involve in the TCP/IP model?
Signup and view all the answers
What concept is illustrated by the phrase 'not an actual network but a collection of heterogeneous networks'?
What concept is illustrated by the phrase 'not an actual network but a collection of heterogeneous networks'?
Signup and view all the answers
What is the primary purpose of a Uniform Resource Identifier (URI)?
What is the primary purpose of a Uniform Resource Identifier (URI)?
Signup and view all the answers
Which of the following statements is true about URLs?
Which of the following statements is true about URLs?
Signup and view all the answers
What does a URN signify about a resource?
What does a URN signify about a resource?
Signup and view all the answers
What is the default port number commonly used by the HTTP protocol?
What is the default port number commonly used by the HTTP protocol?
Signup and view all the answers
What is meant by 'connection oriented' in the context of HTTP?
What is meant by 'connection oriented' in the context of HTTP?
Signup and view all the answers
What are query components used for in a URI?
What are query components used for in a URI?
Signup and view all the answers
How does HTTP achieve reliability?
How does HTTP achieve reliability?
Signup and view all the answers
Which of these represents a hierarchical structure in URI schemes?
Which of these represents a hierarchical structure in URI schemes?
Signup and view all the answers
What is the primary function of a proxy in the HTTP protocol?
What is the primary function of a proxy in the HTTP protocol?
Signup and view all the answers
Which role in HTTP acts as an intermediary that translates requests?
Which role in HTTP acts as an intermediary that translates requests?
Signup and view all the answers
What distinguishes a tunnel from other roles in HTTP?
What distinguishes a tunnel from other roles in HTTP?
Signup and view all the answers
Which HTTP role is responsible for processing requests and sending responses?
Which HTTP role is responsible for processing requests and sending responses?
Signup and view all the answers
In the client-server architectural pattern, why is the client also referred to as a User Agent?
In the client-server architectural pattern, why is the client also referred to as a User Agent?
Signup and view all the answers
What is the primary benefit of caching for content providers?
What is the primary benefit of caching for content providers?
Signup and view all the answers
What mechanism is essential for ensuring that cached copies remain up to date?
What mechanism is essential for ensuring that cached copies remain up to date?
Signup and view all the answers
How does the HTTP mechanism ensure cache consistency?
How does the HTTP mechanism ensure cache consistency?
Signup and view all the answers
What does semantic transparency imply in the context of HTTP?
What does semantic transparency imply in the context of HTTP?
Signup and view all the answers
What does the expiry model for cache correctness define about cached responses?
What does the expiry model for cache correctness define about cached responses?
Signup and view all the answers
Which of the following is NOT an exception for serving outdated responses from the cache?
Which of the following is NOT an exception for serving outdated responses from the cache?
Signup and view all the answers
What is the purpose of the 'Age' response header field in caching?
What is the purpose of the 'Age' response header field in caching?
Signup and view all the answers
What is a challenge associated with maintaining cache consistency?
What is a challenge associated with maintaining cache consistency?
Signup and view all the answers
Which of the following statements regarding the cache with zero lifetime is correct?
Which of the following statements regarding the cache with zero lifetime is correct?
Signup and view all the answers
What can happen if the clocks of caches and origin servers are not synchronized?
What can happen if the clocks of caches and origin servers are not synchronized?
Signup and view all the answers
What is the primary purpose of the Date header field in response messages?
What is the primary purpose of the Date header field in response messages?
Signup and view all the answers
Which header field takes precedence if both Expires and Cache-Control are specified?
Which header field takes precedence if both Expires and Cache-Control are specified?
Signup and view all the answers
What should a server do if it wants to prevent caching of a response that changes frequently?
What should a server do if it wants to prevent caching of a response that changes frequently?
Signup and view all the answers
What does the freshness period of a cached response depend on?
What does the freshness period of a cached response depend on?
Signup and view all the answers
In the absence of defined expiry headers, how can caches determine the validity of a response?
In the absence of defined expiry headers, how can caches determine the validity of a response?
Signup and view all the answers
Which of the following statements about Expires and Cache-Control headers is false?
Which of the following statements about Expires and Cache-Control headers is false?
Signup and view all the answers
What happens if a cache receives a response with Cache-Control set to no-cache?
What happens if a cache receives a response with Cache-Control set to no-cache?
Signup and view all the answers
What indicates that a cached response is still fresh?
What indicates that a cached response is still fresh?
Signup and view all the answers
Study Notes
Web Engineering (WBCS008-05) Set 2: Foundations of the Web
- The World Wide Web is an information system to retrieve resources.
- Resources are identified by Uniform Resource Locators (URLs).
- Resources are connected to each other by (hyper)links.
- Resources are accessible over the Internet.
- Resources are mainly hypertext but also include any type of (hyper)media.
Outline
- Internet in a nutshell
- URIs
- HTTP
- Basics
- Caching
- Authentication
- Content delivery
- Web Technologies
- Software Architecture on the Web
- Foundations of the Web
What is the Web?
- The World Wide Web is an information system for retrieving resources.
- Resources are identified by Uniform Resource Locators (URLs).
- Resources are connected to each other by (hyper)links.
- The Web is accessible over the Internet.
- Resources include any type of (hyper) media but mainly hypertext.
The Internet
- The Internet is a collection of heterogeneous networks, not a single network.
- It evolved organically from predecessors, including ARPANET in the late 60s/70s and CSNET/NSFNET in the early 80s.
- The Internet has continued to evolve since the late 80s.
Global IP Traffic by Application Type (2017-2022)
- By 2022, video accounted for 82% of global IP traffic.
- Video had a 26% Compound Annual Growth Rate (CAGR) from 2017-2022.
The TCP/IP Model
- Layer: Application, Transport, Internet, Link
- Role: Contains all high-level protocols, allows sources and targets to converse, allows hosts to inject packets, interface between hosts and transmission links.
- Protocols: HTTP, SMTP, DNS, TCP, UDP, IP, ICMP, DSL, SONET, 802.11, Ethernet
Internet Architecture in a Nutshell
- Internet Service Providers (ISPs) provide connectivity.
- User-perceived bandwidth is limited by the "last mile" of the network (analog or digital).
- Points of Presence (POPs) are locations where customer packets enter the ISP network.
- ISPs peer at Internet eXchange Points (IXPs).
URIs
- Defined as references that identify abstract or physical resources.
- URIs have the form
<scheme>:<authority><path>[?<query>]
. - A URI can be a URL (locator), a URN (name), or both.
URI Schemes
- URL: A subset of URIs; identifies resources by their primary access mechanism (e.g., network location).
- URN: A subset of URIs; uniquely identifies a resource independent of its storage location.
HTTP in a nutshell
- HTTP is a simple request/response protocol.
- It relies on TCP (default port: 80).
- HTTP messages consist of a header and a body.
- HTTP is reliable and connection oriented.
- No state is maintained between request / response pairs.
- Connections can persist.
- Three major versions: 1.0, 1.1, 2
Roles in HTTP
- Client (or User Agent): Submits a request.
- Server: Processes a request and returns a response.
- Origin Server: Where a resource resides.
- Proxy: Acts on behalf of an origin server. May rewrite or forward requests.
- Gateway: Acts as an intermediary for another server.
- Tunnel: Acts as a blind relay between two connections (e.g., through a firewall).
HTTP Connection Management
- HTTP/1.0: One transaction per connection.
- HTTP/1.1: Multiple transactions over a persistent connection with pipelined processing.
- HTTP/2: Multiplexed requests over the same connection (highly different transport model).
Content Negotiation
- Resources are available in multiple representations (variants).
- Specific representation is chosen by negotiation mechanism.
Types of Content Negotiation
- Server-driven: Client provides headers and server delivers "best effort" response.
- Client-agent-driven: Server provides a list of variants and client chooses the best.
- Transparent: No standard support in HTTP
HTTP Messages & Methods
- HTTP messages have a structure consisting of request-line, headers, and a message body.
- Various methods for interaction, such as GET, POST, PUT, DELETE, HEAD, OPTIONS, TRACE, CONNECT.
- Specific headers provide detailed information about the request or response.
HTTP Request Messages
- request = request-line (general-header | request-header | entity-header) CRLF message-body?*
- request-line = method SP requestURI SP HTTP-Version CRLF
HTTP Request Message (cont.)
- Method specifies action e.g. 'GET', 'POST', 'PUT', 'DELETE'
- Header provides further details about the request (e.g., 'Accept', 'Host', 'If-Modified-Since', 'User-Agent')
Sample Request Headers
- Host
- If-Match
- If-Modified-Since
- User-Agent
Request URIs
- Request applies to particular resource or to server itself.
- Use absoluteURI if request is made to a proxy.
- Use abs-path if request is to origin server.
- Use authority if used by CONNECT method for tunneling.
Request Methods (supportive)
-
CONNECT, HEAD, OPTIONS and TRACE.
-
CONNECT: used for tunneling
-
HEAD: no body but header to validate caching
-
OPTIONS: to get properties of a server
-
TRACE: to see response headers
Request Methods (main)
- DELETE, GET, POST, PUT, PATCH
Request Properties
- Safe Requests: Non-state-altering (e.g., GET, HEAD, OPTIONS, TRACE)
- Idempotent Requests: Side-effects of multiple identical requests remain the same (e.g., GET, HEAD, OPTIONS, PUT, DELETE when implemented correctly). POST, PATCH are not idempotent
PUT vs POST
- PUT: Semantic relation different to POST
- POST: URI in POST points to service handling entity.
- PUT: URI in PUT points to the entity itself.
- GET vs POST: GET typically used for safe interactions, possibly longer URIs in POST.
HTTP Response Messages
- response = status-line (general-header | response-header | entity-header) CRLF message-body**
- status-line = HTTP-version SP status-code SP reason-phrase CRLF
Sample Response Headers
- Age
- Server
- Accept-Ranges
- Retry-After
- WWW-Authenticate
Status Codes Categories
- 1xx: Informational
- 2xx: Success
- 3xx: Redirection
- 4xx: Client Error
- 5xx: Server Error
HTTP Caching
- Cache is storage for temporary response messages.
- Improves response time by providing copies for repeat requests.
- Client-cache (browser), separate caches on proxies
- Topology: client, server, and separate caches on proxies
Web Proxies and Caching Pipelines
- Forward proxy: External facing proxy; acts as a stand-in for origin servers (N:1 proxy to server relation).
- Reverse proxy: Internal facing proxy; usual single entry point to origin servers with load balancing and security (1:N server to proxy relation).
CDN use in practice
- Using CDN involves a server that stores copies of resources and delivers them to clients.
CDN Benefits
- Reduced latency (less hops).
- Scalability to demand.
- Increased reliability.
- Separation from data transfer.
- Security against DDoS attacks.
Source Material
- Andrew Tanenbaum and David Wetherall, Computer Networks, 5th edition
- Mozilla Developer Network
Self-evaluation Questions
- Acronyms (ISP, POP, IXP) purpose
- Definitions and relations between URI, URL, URN
- Proxy, gateway, and tunnel differences
- Conditions for safe/idempotent HTTP requests
- PUT vs POST Differences
- Proxy types and functions
- Benefits of caching
- Semantic transparency in HTTP
- How server stops proxy/client from caching response
- Cache freshness, no Expires header
- Basic Authentication
- How CDNs work and benefits
Next Lecture: REST
Appendix: A Short History of the Internet
- ARPANET (distributed switching system for US DoD)
- ARPANET successors (CSNET/NSFNET, ANSNET)
- TCP/IP model (invented and adopted to deal with internetwork communication)
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
Test your knowledge on web engineering concepts and HTTP methods with this quiz. Explore the definitions of safe HTTP methods, idempotent requests, and the structure of HTTP response messages. Additionally, learn about the roles of different layers in the TCP/IP model and the characteristics of Internet Service Providers.