Random extremely slow responses from Cloudflare workers

My website loads mp4 videos via cloudflare workers, which grab the file from R2.

It uses range requests to control the exact amount of data downloaded. It starts by downloading only the first megabyte of the video file. After that if the video is playing it continues to download chunks of data 2 megabytes at a time.

I have noticed that most of the time responses from Cloudflare are quick. Sometimes however the response times slow down drastically, often taking 2 minutes to download for the first 1 megabyte chunk.

I cannot make sense of what is going on.

I’ve made a rather long video of me trying to nail down what is happening.

In the video, I show the problem occurring in Firefox and also Chrome, and I also send the same request via curl from a U.S. based server and from my local machine here in Australia.

Here is the YouTube video showing my efforts to make sense of things:

https://youtu.be/rhVgQk73G_E

I’d like to request help in resolving this as it’s a showstopper for my application if requests for video data randomly takes 2 minutes instead of 2 seconds.

Thanks!

1 Like

I can’t see how to edit my original post.

Here is the same video as the YouTube link, in case you cannot access the YouTube link:

https://static.crowdwave.link/cloudflareproblem2.mp4

I have the same problem with images. Workers have been working fine for 2 years and now all of a sudden randomly images are taking a few seconds to load that used to take a few hundred milliseconds.

The status page is all green, could be a bad software update at Cloudflare or a notworking problem that hasn’t been reported.