Hello again,
I’m testing SSE request collapsing but getting unexpected results.
When I connect to my API’s SSE url, it stays alive for the configured time (2 minutes) but when I connect to the same API via fastly, it drops at about 10 seconds after the initial response.
I’m using curl to test like this
curl -v -N --http2 -H "Accept:text/event-stream" https://my-url
When Fastly closes the connection i’m getting
* HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)
* Connection #0 to host cdn.myhostname left intact
curl: (92) HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)
whereas when my api cuts off the connection curl
* Connection #0 to host api.myhostname left intact
These are the relevant headers i’m returning
< cache-control: no-cache, s-maxage=118
< vary: Authorization, x-prefab-start-at-id, Last-Event-ID
< date: Mon, 29 Jul 2024 21:04:11 GMT
< content-type: text/event-stream
I have set beresp.do_stream = true;
set in a vcl snippet in the fetch phase
Thank you!
Edited:
The behavior sounds like the too-large-object failure mode described in Failure modes with large files but the object I’m sending in this test is 51KB and it still happens testing with a much smaller object