I migrate to Netlify and I have a too high Band usage

Hi all,

  • Site name sleepy-knuth-1de610.netlify.app - www.tennistalker.it

I have a strange “problem” started when I migrated to Netlify. My site was on Cloudfront for more than 2 yers and I have a clear view of the band usage, about 300/400GB a month.
After the migration, I see that I started to have more than 40GB a day of Band usage.

I’m trying to understand why this happens, but I don’t know what to check.

All seems working fine, everything seems correctly zipped and so on, no spikes from analytics or strange people behaviour.

From Netlify analytics, I have :

Location Pageviews
United States 511,736
Italy 70,201

But my website is only used in Italy… Can it be some spider/crawler?
I checked from google search console but no spikes even from this tool.

I will thank you for all the help to understand!

Hiya @emish89,

You have a few things contributing to your high bandwidth usage. Crawlers are a big part of it, yes - when google or slack requests a page, our prerender service has to fetch the whole thing and render it. That’s a big chunk of your traffic, and it is all us-based. Over the past week, it is about 1.4million assets fetched (recalling that prerender will have to get all of your JS and CSS as well for every page load), totalling around 27Gb.

Something else to consider is your site layout. It’s a bit harder to guess from our logs exactly how bad the effect is, but it appears to me that you use one-time-hashes in your css filenames at least, and this totally breaks our caching model, so browsers may re-request something they don’t need to - a browser can’t fetch an asset from cache when the name changed. This article has some more details about that situation:

Aside from reducing unnecessary bandwidth usage, it will also speed up your visitors’ experience :slight_smile:

Finally, your service worker is the main cause of your traffic. Over the past week, it was the referrer for over 10 million asset loads! That’s something like 80% of your site’s traffic. This is compounded by “you change filenames a lot” so looking at the top URL’s fetched by the service worker, this is what I see:

image

Those numbers don’t add up to 10 million, because there is a huge long tail of other filenames, all loaded thousands of times by your service worker.

I am not a service worker expert, so I don’t know exactly how to configure it better, but I think you have some motivation to do that research now :slight_smile:

Thanks a lot for the help! You gave me the right hint to research and find the problem :slight_smile: