Apache · Configuration and operations

How does Apache support HTTP/2 and what should you watch?

Mediumhttp2protocolperformanceUpdated Oct 2026
Quiz this track

Short answer

Enable mod_http2 and set Protocols to h2 and http/1.1. Browsers negotiate HTTP/2 over TLS using ALPN, so HTTP/2 is effectively a TLS deployment concern as well as a module one.

HTTP/2 multiplexes many requests over one connection, reducing connection setup and head-of-line blocking at the HTTP layer. Apache implements it in mod_http2. The event MPM is the recommended pairing because HTTP/2 connections are long-lived and benefit from asynchronous handling.

apache
LoadModule http2_module modules/mod_http2.so
Protocols h2 http/1.1
ProtocolsHonorOrder On

<IfModule http2_module>
  H2MaxSessionStreams 100
  H2WindowSize 65535
  H2MinWorkers 10
  H2MaxWorkers 100
</IfModule>
HTTP/2 enabled on TLS with bounded worker limits.

What changed over time

  • Server push was removed from major browsers, so do not design around it
  • Multiplexing makes aggressive domain sharding counterproductive
  • Response compression still needs BREACH-style scrutiny on sensitive pages
  • Cleartext h2c is not negotiated by browsers; expect HTTP/2 over TLS in production
  • Long-lived streams consume worker capacity, so size H2MaxWorkers against real traffic

Verify with curl --http2, browser developer tools or the ALPN result from openssl s_client. If clients still use HTTP/1.1, check that mod_http2 is loaded, Protocols includes h2, TLS is terminating at Apache and no intermediate proxy is downgrading the protocol.

HTTP/2 does not replace application-level performance work. Slow backends, large payloads and chatty APIs remain slow regardless of multiplexing.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1How does a browser negotiate HTTP/2 with Apache?
  2. 2Why is server push no longer recommended?
  3. 3What is the relationship between HTTP/2 and the event MPM?
  4. 4How would you confirm that HTTP/2 is actually in use?

Say it in the interview

I enable mod_http2 and add h2 to Protocols, with the event MPM underneath. Browsers negotiate it over TLS with ALPN. I watch worker limits because HTTP/2 connections are long-lived, and I do not rely on server push since browsers removed it. I verify with curl or ALPN output rather than assuming the module is enough.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live Apache mock interview and get scored feedback on depth, clarity and confidence.