Some S3 assets slow

We have a S3 bucket configured properly to route through cloudflare. Its been working solid for a couple years now and we have not changed anything on our end recently.

The last couple days we have noticed that some assets that are served over CF from this bucket and are not “cached” on CF yet (MISS) the transfer speed is very slow, like it takes 3 minutes to download a 3mb file. I also ran some tests using CURL… I can hit the s3 endpoint bypassing CF and it downloads the same file in less then a second. If I curl the asset twice, the first time it takes several minutes, the second time its under a second, but if I append a “?ver=12232” to the end of the file (cachebuster) and run curl it takes several minutes again.

To make things more fun we decided to try turning on Argo, this made a huge difference, speeds went back to how they use to be a couple weeks ago. If I toggle argo off, slow again. There also seems to be a “time of day” aspect to this also, during mid-day (PST) things slow down, but seem to pick up in the evening… this could be random though, not sure.

My curl commands I was using for testing are:
curl --output t2.hdr
curl --output t1.hdr

The first one being straight to s3, the second one is routing through CF.
I hate to be the “conspiracy guy” but it almost feels like CF is being crippled unless you pay to play with Argo. Please prove me wrong.

EDIT: Since this issue is intermittent, I was not able to get any screencaptures showing whats going on until now. First Screenshot shows that some assets that MISSED on cache took very long time to load.

You can see a 2mb file took almost 3 minutes to download, yet a 5mb file that CF has cached was downloaded in 579ms. The next screen shot is the same assets but I refreshed the page, so CF has cached them.

You see it finished all assets in under 1s now that CF has them cached.

Here is another test I did with CURL… I ran it about 10 times… it downloaded the asset every time in under 3 seconds, except once it took 35 minutes. The very last call I show is to the origin, just to show its not the source of slowness.

Any ideas why some things are intermittently slow when cache-status MISS?

Thank you.

Just tested this from my modest 50/20 home connection and Cloudflare seemed to be consistently faster

A handy curl command to test file downloads:

curl -o /dev/null -w "Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n"

curl -o /dev/null -w "Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n"

What PoP are you being routed to? It could be an issue with that PoP

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.