mod_h2 icon indicating copy to clipboard operation
mod_h2 copied to clipboard

mod_proxy_http2 slower?

Open gfrankliu opened this issue 10 months ago • 1 comments

Simply changing the Apache proxy configuration from "http://backend" to "h2c://backend", client/browser sees response time jump from 2s to 10s for getting a file about 1.1MB. Rest Apache configuration remains the same. Anything I could do to tune the performance of mod_proxy_http2? I am already using mod-h2 v2.0.29.

I also confirmed it is not a backend issue. curl --http2-prior-knowledge http://backend/largefile.js and curl --http1.1 http://backend/largefile.js have about the same response time.

gfrankliu avatar Feb 28 '25 23:02 gfrankliu

There are no "hidden" tuning options for mod_proxy_http2. As you probably noticed, there is only ever one request on the backend connection at a time. That is due to the internal architecture of the server. But it is difficult in general to do that right. Many CDNs are not really supporting this either.

In general, I would recommend to stay with http/1.1 on the backend.

icing avatar Mar 01 '25 10:03 icing