Skip to content

Set enablereuse with mod_proxy_http2 #295

@gfrankliu

Description

@gfrankliu

Here is the sample config:

...

  ServerAlias *.external

  RewriteCond "%{HTTP_HOST}"   "^([-_a-z0-9]+)\.external" [NC]
  RewriteCond "%{REQUEST_URI}" "!^/static" [NC]
  RewriteRule "^/(.*)$" "h2c://%1.internal/$1" [P,NC,QSA]

...

mod_proxy_http2 doesn't seem to reuse the connections to backend servers. A quick test against server1.external causes 200+ connections to server1.internal. If I turn on enablereuse, the connections drop to < 10. For my test, I hard code below in my config:

  <Proxy "h2c://server1.internal">
    ProxySet enablereuse=on
  </Proxy>

Since my list of backend servers may change, is there a way to not hardcode every server? Can we enablereuse=on globally, or make it default? Or is there a wildcard? something like

  <Proxy "h2c://*.internal">
    ProxySet enablereuse=on
  </Proxy>

If none of above exists, where is the source can I set the default enablereuse to be on and build my own custom binary?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions