Lesson 10 of 30
A lot of performance folklore — concatenate everything, shard assets across domains — was a real, necessary workaround for a protocol limitation that mostly stopped existing years ago. Knowing the history is what stops you reaching for a fix your CDN already made unnecessary.
11 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
A legacy performance guide recommends splitting image assets across several subdomains to get more parallel downloads. Why was this actually necessary under HTTP/1.1, specifically?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
Under HTTP/1.1, a single TCP connection could only have one request in flight at a time; browsers worked around this by opening a handful of parallel connections per domain (commonly six), but that cap was still real and still limiting. Two performance techniques existed specifically because of this constraint:
img1.example.com, img2.example.com) specifically to get more parallel connections, since the six-per-domain cap was per-domain, not per-page.HTTP/2 introduced multiplexing: many requests can now travel over a single connection concurrently, interleaved, instead of queueing one at a time. That directly removed the specific problem both workarounds existed to solve — which is a real part of why aggressive bundling and domain sharding are now often net-negative under HTTP/2 rather than a free win: sharding now just adds unnecessary extra connection setups, and monolithic bundling now just delays smaller, independently-cacheable files that could otherwise load concurrently.
HTTP/3 goes further, replacing TCP with QUIC, a transport built on UDP. This targets HTTP/2's one remaining weakness: on a single TCP connection, one dropped packet blocks every multiplexed stream on that connection until it's retransmitted — a problem called head-of-line blocking, and it exists at the TCP layer, below where HTTP/2's own multiplexing operates, so multiplexing alone couldn't fix it. QUIC's streams are independent at the transport level, so a dropped packet on one stream doesn't stall the others.
$ curl -I --http2 https://example.com/
HTTP/2 200
...
The practical takeaway is plain: before reaching for an HTTP/1.1-era workaround, check what protocol your actual deployment serves over. Most CDNs and modern hosts serve HTTP/2 or HTTP/3 by default today, which means the connection-parallelism problem bundling/sharding were built to solve may simply not apply to your deployment anymore — and applying the old technique anyway adds real cost (unnecessary domain lookups, monolithic bundles that can't be split or cached independently) for a problem that no longer exists on your infrastructure.
"Why doesn't this app shard its images across multiple domains anymore?" or "should we still bundle everything into one file?" are real questions that test whether a candidate understands why an old technique existed, not just that it's out of fashion — tracing the reasoning back to HTTP/1.1's one-request-per-connection limit is what makes the answer land as understanding instead of trend-following.