Hey Netlify,
I have an image-heavy site which has 200 users per day on average. Over the weekend, the site was hit by a bot which meant that I had 6000 users in under 24 hours. This blew my 100GB of bandwidth allowance.
My understanding of a CDN is that if 100 users visit my site from London, only the first user will hit the servers for the content. The following 99 will retrieve it from the CDN. In the case of Netlify CDN, the etag will be the same for all of these users, so it will hit the server to check the etags match and then return a 304, instructing that the content hasn’t changed and can be served from Netlify CDN. Thus, out of 100 users, only 1 would count toward the bandwidth usage quota.
However, based on the volume of traffic to my site from the bots and the size of the requests to that particular page, it looks like every request is being treated as consuming bandwidth from the Netlify server.
Firstly, it’d be good to get clarification of whether retrieving content from the CDN still counts towards the bandwidth quota?
It’s difficult to find a clear definition as to what constitutes bandwidth usage for Netlify in the docs. I’ve seen this question crop up in a quite a few support requests, particularly this recent one: Excessive Bandwidth Usage - #30 by MasterCassim
Secondly, do you have any alerting tools/emails for this situation? In this case, traffic to my site surged by 300x, a clear indicator that something is not right. Additionally, I couldn’t find a way to investigate my bandwidth consumption in the Dashboard apart from my current bandwidth usage for the month across my team. If I didn’t have GA, I’d be totally blind on the cause and thus wouldn’t be able to find a solution.
Look forward to hearing back