Computer Networks · TEE · papers

Q5(a) · Persistent HTTP cache delay

2024-12-06 · AI-only Sem V variant

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

Q5(a). HTTP/1.1 client/server RTT=1 second; server object transmission=4 seconds. Local cache delay to the client and local object transmission are zero; cache-to-server RTT=1 second. Client makes 200 sequential requests, waiting for each reply before the next; 50% are cache hits. No If-Modified-Since is used. Find time from first request to final object. [10 marks]

Answer

Source note: The paper does not explicitly state whether the origin TCP connection already exists. Both the established persistent-connection convention and one new shared connection are distinguished.

Given

200 sequential requests;50%hits;hit delay0;miss RTT1s and object transmission4s.

To find

Total time, making connection setup assumption explicit.

Formula and why

T=N_{hit}T_{hit}+N_{miss}(RTT+T_{object})+T_{setup}LaTeX: T=N_{hit}T_{hit}+N_{miss}(RTT+T_{object})+T_{setup}

Sequential requests cannot overlap, and without conditional validation a cache hit needs no origin round trip.

Solution

Step 1. Count hits and misses

Hits=200×0.5=100; misses=100.

Step 2. Add response delays

Each miss costs1+4=5s. Total response time=100×0+100×5=500s.

Step 3. State the setup convention

With an already-established persistent origin connection, answer500s. If the model instead includes one new reusable origin TCP connection, add1RTT once:501s. The paper does not state that initial condition; do not add100 separate handshakes to a persistent connection or silently assume one connection per object. Multiple origin connections would require their setup count.