Well then it’s strange. The only possible but not so correct explanation that I know of would be that Netlify is not optimised to serve files over 3 MB in size. Such files are not so easily cached in the CDN nodes and take time to transfer.
30 sec might be the realistic time for such a file, however, 2 sec one is the one I find strange.
I think, official Netlify support team would have a better answer as they can check those IDs.
Hi, @myitcv. The 2 second request was after the 32 second request. The first request was slow because the file was not in the CDN cache. The second request was faster because the file was being served from memory by the CDN node cache.
We would normally expect to see a much faster download time for the file even when not cached though. The 32 second timing on the approximately 5 MB file (when compressed) is unusual even for an uncached file.
The 2 second request was after the 32 second request. The first request was slow because the file was not in the CDN cache. The second request was faster because the file was being served from memory by the CDN node cache.
That would make sense except for the fact I do see very slow responses after very fast ones, despite the etag not having changed (i.e. file contents identical)
e.g. take the following requests from just now (all resulted in etag 0144f3faa7786907560fdbddda3195a5-ssl-df):
No rate limiting. While the content did not change, the requests you shared were all served from different CDN nodes; the asset had not been cached in any of them yet. Here’s the list of nodes in case if it’s of interest:
One of the benefits of increased traffic to your site is that with each request served from a different CDN node, the request arrives faster for the next person who gets the asset from that same node cache, since it doesn’t have to travel all the way to our origin in the US west coast first.
Again, I know this isn’t ideal for your use case but did want to share the results of our digging.
While what Scott said is true - we don’t have a “re-prime cache after deploy” feature - it generally shouldn’t matter much for well designed sites that don’t use antipatterns in deploys around massive filename changes; most files in your site probably don’t change in every deploy. So, to mitigate the effects you’re experiencing, please check out this description of how to make the most of our CDN cache through careful deploy patterns: