<div dir="auto"><p dir="ltr">Hi Tom,</p>
<p dir="ltr">I have a hard time believing this doesn't work with pass, but let's check.</p><p dir="ltr">Would you be able to run `varnishlig -g raw` as the transaction is going on ? (You don't want extra traffic otherwise things will be hard to follow)</p><p dir="ltr"><br></p><p dir="ltr">-- </p><div data-smartmail="gmail_signature"><div dir="ltr"><div>Guillaume Quintard<br></div></div></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Jun 23, 2025, 08:31 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"><div><div>Good morning,</div><div><br></div><div>OK, one more. Server-Sent-Events are streaming GET requests. I've tried</div><div><br></div><pre>sub vcl_recv {</pre><pre><span style="white-space:pre-wrap"> </span>…</pre><pre><span style="white-space:pre-wrap"> </span>return(pass);</pre><pre>}</pre><pre><br></pre><pre>sub vcl_backend_fetch {</pre><pre><span style="white-space:pre-wrap"> </span>set bereq.first_byte_timeout = 30s;</pre><pre><span style="white-space:pre-wrap"> </span>set bereq.between_bytes_timeout = 30s;</pre><pre>}</pre><pre><br></pre><pre>sub vcl_backend_response {</pre><pre><span style="white-space:pre-wrap"> </span>set beresp.do_esi = false;</pre><pre><span style="white-space:pre-wrap"> </span>set beresp.do_stream = true;</pre><pre>}</pre><div><br></div><div>without success. The request is forwarded to the SSE server but comes never back and does not show up in varnishlog. Is there any chance to get this work without `pipe`? </div><div><br></div><div>thanks in advance </div><div>tom</div><div><br></div><div>Am Freitag, dem 20.06.2025 um 15:05 +0200 schrieb Guillaume Quintard:</div><blockquote type="cite" style="margin:0 0 0 .8ex;border-left:2px #729fcf solid;padding-left:1ex"><div dir="auto"><div>Always a pleasure! Let us know if you have any further questions!</div><div><br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div>-- <br></div><div>Guillaume Quintard<br></div></div></div></div><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 20, 2025, 13:30 Tom Anheyer | BerlinOnline <<a href="mailto:Tom.Anheyer@berlinonline.de" target="_blank" rel="noreferrer">Tom.Anheyer@berlinonline.de</a>> wrote:<br></div><blockquote type="cite" style="margin:0 0 0 .8ex;border-left:2px #729fcf solid;padding-left:1ex"><div><br>Hi Guillaume,<br></div><div><br>thank you for your very quick (as always) and clear answer.<br></div><div><br>tom<br></div><div><br>Am Freitag, dem 20.06.2025 um 11:37 +0200 schrieb Guillaume Quintard:<br>> Hi Tom,<br>> This is a base behavior, so Varnish Enterprise inherits it, but it's present<br>> in Varnish Cache too.<br>> Piping involves foregoing HTTP parsing and just passing all the connection<br>> bytes back and forth. It's possible on HTTP 1.x since there's only at most one<br>> request per connection, but this breaks with HTTP2 multiplexing, so Varnish<br>> does the best thing it can and uses a pass instead.<br>> Interestingly, H/2 didn't plan an upgrade path to websockets (or to anything<br>> else, really) for a relatively sane reason: H/2 requires TLS and TLS has ALPN<br>> that allows you to go to websockets directly, without the upgrade hop.<br>> So, to my (maybe outdated) knowledge of H/2, upgrading to websockets isn't<br>> possible.<br>> Please let me know if I'm not being clear.<br>> -- <br>> Guillaume Quintard<br>> <br>> On Fri, Jun 20, 2025, 11:15 Tom Anheyer | BerlinOnline<br>> <<a href="mailto:Tom.Anheyer@berlinonline.de" rel="noreferrer noreferrer" target="_blank">Tom.Anheyer@berlinonline.de</a>> wrote:<br>> > 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. <br>> > 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 o<a href="https://www.google.com/maps/search/pened+a+varnish+software+ticket+but+I+thin?entry=gmail&source=g" target="_blank" rel="noreferrer">pened a varnish software ticket but I thin</a>k that's public interest.<br>> > <br>> > tom <br>> > <br></div><div><br></div></blockquote></div></blockquote><div><br></div><div><span><pre>-- <br></pre><pre>Tom Anheyer
Senior Developer
BerlinOnline GmbH
<a href="https://www.google.com/maps/search/Stefan-Heym-Platz+1%0D%0A10367+Berlin%0D%0AGermany?entry=gmail&source=g">Stefan-Heym-Platz 1
10367 Berlin
Germany</a>
Tel.: +49-30-5771180-62
Fax: +49 30 5771180-95
E-Mail: <a href="mailto:tom.anheyer@berlinonline.de" target="_blank" rel="noreferrer">tom.anheyer@berlinonline.de</a>
<a href="http://berlin.de" target="_blank" rel="noreferrer">berlin.de</a> | <a href="http://berlinonline.net" target="_blank" rel="noreferrer">berlinonline.net</a>
Amtsgericht Berlin-Charlottenburg, HRB 266384
Sitz der Gesellschaft: Berlin, Deutschland
USt.-IdNr.: DE219483549
Geschäftsführung: Andreas Mängel, Katrin Dorgeist
Vorsitzender des Aufsichtsrats: Nicolas Zimmer
</pre></span></div></div>
</blockquote></div>