<div dir="auto"><p dir="ltr">Hi Tom,</p>
<p dir="ltr">This is a base behavior, so Varnish Enterprise inherits it, but it's present in Varnish Cache too.</p>
<p dir="ltr">Piping involves foregoing HTTP parsing and just passing all the connection bytes back and forth. It's possible on HTTP 1.x since there's only at most one request per connection, but this breaks with HTTP2 multiplexing, so Varnish does the best thing it can and uses a pass instead.</p>
<p dir="ltr">Interestingly, H/2 didn't plan an upgrade path to websockets (or to anything else, really) for a relatively sane reason: H/2 requires TLS and TLS has ALPN that allows you to go to websockets directly, without the upgrade hop.</p><p dir="ltr">So, to my (maybe outdated) knowledge of H/2, upgrading to websockets isn't possible.</p>
<p dir="ltr">Please let me know if I'm not being clear.</p><div data-smartmail="gmail_signature"><div dir="ltr"><div>-- <br></div><div>Guillaume Quintard<br></div></div></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Jun 20, 2025, 11:15 Tom Anheyer | BerlinOnline <<a href="mailto:Tom.Anheyer@berlinonline.de">Tom.Anheyer@berlinonline.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I don't know if this is specific to varnish plus:<br>
<br>
<br>
If I enable pipe-mode for server sent events in vcl_recv this way:<br>
<br>
if (…) {<br>
    set req.http.connection = "close";<br>
    return(pipe);<br>
}<br>
<br>
the log shows:<br>
<br>
-   VCL_return     pipe<br>
-   VCL_call       HASH<br>
-   VCL_return     lookup<br>
-   VCL_Error      vcl_recv{} returns pipe/connect for HTTP/2 request.  Doing pass.<br>
-   VCL_call       PASS<br>
<br>
<br>
Is it possible to use server sent events, websockets with http/2 requests?<br>
<br>
<br>
I've opened a varnish software ticket but I think that's public interest.<br>
<br>
tom  <br>
<br>
-- <br>
Tom Anheyer<br>
Senior Developer<br>
<br>
BerlinOnline GmbH<br>
Stefan-Heym-Platz 1<br>
10367 Berlin<br>
Germany<br>
<br>
Tel.: +49-30-5771180-62<br>
Fax: +49 30 5771180-95<br>
E-Mail: <a href="mailto:tom.anheyer@berlinonline.de" target="_blank" rel="noreferrer">tom.anheyer@berlinonline.de</a><br>
<br>
<a href="http://berlin.de" rel="noreferrer noreferrer" target="_blank">berlin.de</a> | <a href="http://berlinonline.net" rel="noreferrer noreferrer" target="_blank">berlinonline.net</a><br>
<br>
Amtsgericht Berlin-Charlottenburg, HRB 266384<br>
Sitz der Gesellschaft: Berlin, Deutschland<br>
USt.-IdNr.: DE219483549<br>
<br>
Geschäftsführung: Andreas Mängel, Katrin Dorgeist<br>
Vorsitzender des Aufsichtsrats: Nicolas Zimmer<br>
<br>
<br>
_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org" target="_blank" rel="noreferrer">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" rel="noreferrer noreferrer" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</blockquote></div>