summaryrefslogtreecommitdiff
path: root/comp347
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-09-07 14:07:31 -0600
committermo khan <mo@mokhan.ca>2025-09-07 14:07:31 -0600
commit9dd3524edcdbd8d320f1a3d172842e46f902b649 (patch)
tree90b84a2ca50c7815534cff36802c261ca210fd0d /comp347
parentd4a8859262d9408e3aaf81dcfc95efdf752ffcbf (diff)
feat: complete section 1.5
Diffstat (limited to 'comp347')
-rw-r--r--comp347/assignment1/assignment1.md48
1 files changed, 47 insertions, 1 deletions
diff --git a/comp347/assignment1/assignment1.md b/comp347/assignment1/assignment1.md
index e0fddd6..ace6045 100644
--- a/comp347/assignment1/assignment1.md
+++ b/comp347/assignment1/assignment1.md
@@ -133,7 +133,53 @@ A safety margin (typically ρ ≤ 0.7-0.8) is often used to account for traffic
### 1.5 Web Caching (5%)
-[To be completed]
+#### What is Web Caching?
+
+**Web caching** is a technique where frequently requested web content (HTML pages, images, videos, etc.) is stored temporarily in locations closer to users than the origin server. When a user requests cached content, it can be served from the cache instead of fetching it from the distant origin server, reducing response time and network traffic.
+
+**Components:**
+- **Web cache/proxy server:** Intermediate server that stores copies of web objects
+- **Cache hit:** When requested content is found in the cache
+- **Cache miss:** When requested content is not in cache and must be fetched from origin server
+
+#### Web Caching Usefulness in Universities:
+
+Web caching is particularly useful in university environments due to:
+
+**1. Shared Content Patterns:**
+- Multiple students often access the same educational resources, research papers, and popular websites
+- High likelihood of cache hits for commonly accessed materials
+
+**2. Bandwidth Optimization:**
+- Universities typically have limited internet bandwidth shared among thousands of users
+- Caching reduces external traffic, preserving bandwidth for unique requests
+
+**3. Cost Reduction:**
+- Reduces bandwidth costs by serving content locally instead of repeatedly downloading from internet
+- Improves network efficiency during peak usage periods (class times, assignment deadlines)
+
+**4. Performance Improvement:**
+- Faster response times for students accessing cached educational content
+- Reduced load on university's internet connection during high-traffic periods
+
+#### Conditional GET in HTTP:
+
+**Problem Addressed:**
+The conditional GET mechanism solves the problem of **cache consistency** - ensuring that cached content is up-to-date without unnecessarily downloading unchanged content.
+
+**How it works:**
+1. **Initial Request:** When a web object is first cached, the cache stores the object along with its `Last-Modified` date or `ETag` (entity tag)
+2. **Subsequent Requests:** When the same object is requested again, the cache sends a conditional GET request to the origin server with:
+ - `If-Modified-Since: <last-modified-date>` header, or
+ - `If-None-Match: <etag>` header
+3. **Server Response:**
+ - **304 Not Modified:** If content hasn't changed, server responds with minimal 304 status (no content body)
+ - **200 OK:** If content has changed, server sends the updated object with new Last-Modified/ETag
+
+**Benefits:**
+- Maintains cache freshness without wasting bandwidth on unchanged content
+- Reduces server load and network traffic
+- Provides efficient mechanism for cache validation
### 1.6 Email Protocol Analysis (5%)