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

HTTP2 cannot be disabled #68

Closed
pereorga opened this issue Nov 9, 2023 · 2 comments
Closed

HTTP2 cannot be disabled #68

pereorga opened this issue Nov 9, 2023 · 2 comments

Comments

@pereorga
Copy link

pereorga commented Nov 9, 2023

I see in https://github.com/varnish/docker-varnish/blob/master/stable/debian/scripts/docker-varnish-entrypoint that HTTP2 is enabled by default, and that can't be disabled.

I have Traefik before Varnish, so I don't need TLS, nor HTTP2 in Varnish. I believe this is a common scenario.

Disabling unnecessary features should help in optimizing the resource usage (albeit in a small way, I guess).

@pereorga
Copy link
Author

pereorga commented Nov 15, 2023

@gquintard
Copy link
Collaborator

Hi,

Sorry for the delay, things were a bit busy this last week.

So:

  • disabling HTTP2 shouldn't yield any measurable gain in resource usage, but I'm willing to be proven wrong
  • you can absolutely disable disable HTTP2, if only by starting the container with the full command line (please see the "Extra arguments" section of on the hub page)
  • command line arguments are processed sequentially, and the rightmost parameters will override the leftmost ones. so you can easily disable HTTP2 support:
$ sudo docker run -itd --rm --name varnish_test varnish:7.4 -p feature=-http2
ac67143d26778377bf39e5021a7f943d0111294b42cf9af6b3db92918ac80396
$ sudo docker exec varnish_test varnishadm param.show feature
feature
        Value is: +validate_headers,+vcl_req_reset (default)
...

This is a general varnishd behavior rather than a docker-specific one, which is why I opted to not document it here. BUT, you already got bit by this, so maybe there a need for some more explicit documentation, and if you feel the same way, I would encourage you to open a PR to the documentation repository and to tag me, I will gladly review it and push for its inclusion.

I believe this should resolve the original intent of this issue, so I'll close it, but please do reopen it if I missed something

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

2 participants