Web Technology Basics
1.5 MB of text data is compressed with gzip to one third of its size and sent. The bandwidth is 10 Mbps and the RTT is 100 ms, and before the data starts to be sent, the TCP connection, the TLS handshake and the HTTP request take three round trips in total. Assume 1 MB = 10^6 bytes, and ignore compression and decompression time, headers and waiting caused by TCP congestion control. Which of the following is closest to the time until all the data has been received?
- AAbout 0.4 s
- BAbout 0.7 s
- CAbout 1.5 s
Show answer and explanation
Answer: B. About 0.7 s
The compressed size is 1.5 ÷ 3 = 0.5 MB, which is 0.5 × 8 = 4 Mbit. Sending this at 10 Mbps takes 4 ÷ 10 = 0.4 s, and adding the 3 × 0.1 = 0.3 s of the three round trips before sending begins gives about 0.7 s in total. Without compression, transferring 1.5 MB = 12 Mbit takes 12 ÷ 10 = 1.2 s, for a total of about 1.5 s.
- A. This is only the 0.4 s of data transfer, without adding the 0.3 s of the three round trips before sending begins.
- B. Correct. 0.4 + 0.3 = 0.7 s.
- C. This is 1.2 + 0.3 = 1.5 s, for sending the 1.5 MB without compression.