Modern HTTP Knowledge Check 1
Modern HTTP Knowledge Check 1
animation
http
protocols
InlineKnowledgeCheck({
containerId: "kc-http-modern-1",
question: "A smart building gateway needs to send data from 50 HVAC sensors to a cloud API that only supports HTTP. Which protocol version would provide the BEST performance improvement over HTTP/1.1?",
options: [
{"text": "HTTP/2 - multiplexing enables all 50 requests over a single connection", "feedback": "Correct for the stated gateway: one reused HTTP/2 connection can carry concurrent request streams. HTTP/1.1 can also reuse and pool connections; the chapter’s 50× figure only compares a deliberately sequential baseline."},
{"text": "HTTP/3 - QUIC transport is always faster than TCP", "feedback": "Incorrect. HTTP/3 is not always faster; on stable LAN/Wi-Fi HTTP/2 performs comparably with better library support."},
{"text": "HTTP/1.1 with connection pooling - simpler and equally effective", "feedback": "Incorrect. Pooling still opens several TCP+TLS connections (often ~6 per host), each carrying one request at a time; HTTP/2 carries all 50 on one connection."},
{"text": "WebSocket - better suited for multiple data streams", "feedback": "WebSocket can carry application messages, but this cloud endpoint is an HTTP request/response API. HTTP/2 keeps those semantics while multiplexing requests."}
],
correctIndex: 0,
explanation: "A reused HTTP/2 connection multiplexes concurrent requests while preserving the cloud API’s HTTP semantics. HTTP/3 also works, but HTTP/2 is more widely supported on stable networks. HTTP/1.1 can pool and reuse connections; the chapter’s 50× timing is only a sequential-versus-concurrent illustrative comparison.",
difficulty: "intermediate"
})