Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set enablereuse with mod_proxy_http2 #295

Open
gfrankliu opened this issue Feb 28, 2025 · 0 comments
Open

Set enablereuse with mod_proxy_http2 #295

gfrankliu opened this issue Feb 28, 2025 · 0 comments

Comments

@gfrankliu
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant