#Streaming response breaks on one Cloudflare account, but not the other

16 messages · Page 1 of 1 (latest)

flint geode
#

I've discovered that streaming is broken for a cloudflare worker, but only in one of my accounts.

Working deployment: https://tss-streaming.jakst.workers.dev/ (streaming works on every request)
Broken deployment: https://tss-streaming.jn-endform.workers.dev/ (streaming only works on every ~10-20th request or so)

What I've discovered is that the difference seems to be the encoding that get's applied. On the working version, all requests respond with header Content-Encoding: zstd, while on the broken version it responds with Content-Encoding: br on the requests where streaming breaks, and zstd in the ones where it works.

This is super odd to me. Why does streaming break when using brotli? Why does the Cloudflare switch between two different encodings in one of my accounts? How do I force the encoding in the broken version to always be zstd?

twilit pumice
#

zstd/brotli itself won't break streaming

#

but what may is some response rewrite features, things like email obfuscation, minify, etc.

flint geode
#

Response buffering is disabled

#

Could there be any other setting interfering? The account where streaming breaks most times is an enterprise account, while the one where it always works is a regular $5 / month account

twilit pumice
flint geode
#

No, but I've never added one of those. Where would I locate them in the dashboard?

#

Correction: the breaking one isn't on the enterprise account. It' on the personal account that got created together with our company enterprise account. So I guess it's on the free tier

#

And none of these are deployed under a domain. They are just deployed to workers.dev domains, so turning the knobs on settings for a specific domain shouldn't change anything for them, right?

twilit pumice
flint geode
#

Yeah I know, because one of the deployments works ^^

#

Isn't it weird that the other one works once every ~20th request or so?

#

The other times it just holds the request

#

Ok I just deployed it to our enterprise account, where it also works every time.

So I've got:

  • Broken deployment on my work email account, which should be on the free tier
  • Working deployments on our enterprise company account, and on my personal $5 / month account
#

Actually it really seems to be the encoding, or at least something triggered by which encoding is selected.

Visiting https://tss-streaming.jakst.workers.dev/ from Chrome, streaming works (and zstd is used since Chrome supports it). If I visit the same from Safari, br is used on every request and streaming breaks