CS FundamentalsVery hardProduct company interview · GATE level

A browser with nothing cached fetches a page made of a base HTML file and 9 small images, all on one server. Resolving the server's name takes two DNS queries of 25 ms each. The round-trip time to the server is 40 ms and transmission times are negligible. The browser uses non-persistent HTTP and, after receiving the base file, opens at most 4 parallel TCP connections at a time. How long does it take to fetch the whole page?

  1. A. 850 ms
  2. B. 370 ms
  3. C. 290 ms
  4. D. 170 ms

Correct answer: B. 370 ms

DNS: 2 x 25 = 50 ms. Each non-persistent fetch costs 2 RTT = 80 ms (one RTT for the TCP handshake, one for the request and response). Base file: 80 ms. The 9 images need ceil(9/4) = 3 batches of parallel connections, each 80 ms: 240 ms. Total 50 + 80 + 240 = 370 ms. 850 ms fetches the images one after another (10 x 80 + 50); 290 ms assumes two batches are enough; 170 ms would need a persistent pipelined connection (50 + 80 + 40).

More Computer Networks questions

Exams that ask this topic