# Q2(a) · Persistent HTTP delay

Subject: Computer Networks

Exam: TEE

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q2a

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q2a/

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

### Q2(a). An HTTP client knows the server IP, but has no recent TCP connection. GET transmission time is zero; each object takes 1/2 RTT to transmit. Include connection setup, request/response propagation and object transmission. (1) Find the delay for the base object alone. (2) The base object references one JPEG downloaded afterwards on the same persistent HTTP/1.1 connection. Find the total delay for both objects. [10 marks]

### Answer

### Given

Known IP; new initial TCP connection; zero GET transmission; each object transmission=0.5 RTT.

### To find

Time to obtain the base object and then the pair of objects.

### Formula and why



$$
T_{object}=T_{setup}+RTT+T_{transmission}
$$



A referenced object cannot be requested until the HTML reveals it. HTTP/1.0 here uses a fresh connection per object; persistent HTTP/1.1 reuses one.

### Solution

### Step 1. Download base HTML

1 RTT for TCP setup + 1 RTT for GET/first response bit + 0.5 RTT to transmit = **2.5 RTT**.

### Step 2. Download referenced JPEG

Existing TCP connection: 0 setup + 1 RTT for GET/response + 0.5 RTT transmission = 1.5 RTT.

### Step 3. Add sequential delays

**Total = 2.5+1.5=4 RTT**. DNS adds zero here because the IP address is already known.
