Vercel's "Usage" tab shows much higher bandwidth use than is transferred to the client with Cloudflare #163
-
I'm developing a NextJS site on Vercel and I've tested browsing my site myself and tracking the changes in Bandwidth in their "Usage" tab, which appears to update immediately after refreshing. There is no one else visiting the site since it's just a development site, although I've added it to an actual domain on vercel. The bandwidth usage was zero before my first pageview. The problem is that the bandwidth shown in the Usage tab is much higher than the bandwidth consumed by my browser according to Chrome Developer Tools. As in, 2-8 times higher. Here's an example:
I've already turned off the aggressive prefetching of links and taken steps to reduce my bundle size by 70%. But the bandwidth usage per session and pageview according to Vercel didn't budge. It's as if there is something other than the traffic sent to the user that is contributing to a large part, or even most of, the bandwidth. I know the serverless functions have something to do with it, but I don't understand how that works. Has anyone noticed this before and got an explanation, or found some solutions to reduce bandwidth consumed per user? |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 34 replies
-
I'm experiencing the same problem. Usage hundreds of times bigger than what we have predicted and have measured by our own. |
Beta Was this translation helpful? Give feedback.
-
I just enabled my site on Cloudflare 24 hours ago. They report 12GB data transferred in the past 24 hours, thereof oly 7GB from the origin -- which is my Vercel hosted site. However, Vercel is reporting 35 GB of bandwidth used, which is 5 times more than the bandwidth transferred from Vercel's servers! What is going on here? Is Vercel then going to force me off of the Pro plan unless if I fork up thousands of dollars a month because of a fraudulent bandwidth metric? |
Beta Was this translation helpful? Give feedback.
-
Last 24 hours, Cloudflare reports 2.57GB served by the Origin (Vercel). At the same time, Vercel reports 15.3GB. Vercel's number is 6 times higher. |
Beta Was this translation helpful? Give feedback.
-
Having the same issue with my website. It seems that Vercel counts bandwidth usage from resource size and not the amount of data being sent over the network. Here's how I found out:
But my bandwidth meter shows 1.1 gigabyte: Then I did my math again but with "resource size" this time:
@mcsdevv @paulogdm @leerob @rauchg is that an expected behavior or a bug? For me this is very unfair to try as hard as possible to minimize bundle size and optimize as much things as possible and then get billed 6,5 times more for something I didn't even use. Especially considering the fact that every 100 GB above the limit costs 55$. UPD: my production website that is hosted on VPS and has way more traffic (all sorts of crawlers and much higher rps from real users) consumes 1.01 gigabytes per day though it is not as much well optimized as NextJS could give you. This is nowhere near my bandwidth would be on Vercel these days. |
Beta Was this translation helpful? Give feedback.
-
My site's usage tab is still reporting about 5-6X higher bandwidth than is transferred according to both Chrome Dev tools and CloudFlare. This is the URL: https://stockanalysis.com/ |
Beta Was this translation helpful? Give feedback.
-
@kristjanmar are you using ISR? |
Beta Was this translation helpful? Give feedback.
-
Thank you for providing this information to help us further investigate the issue! Our infrastructure team has used the information you provided to determine an improvement (working with the Cloudflare team). We have made a change to improve how we handle compression between Vercel and Cloudflare. Our infrastructure now has more granular control over compression, and thus can decrease bandwidth between Vercel and Cloudflare. Starting today (Nov 24th, 2021), you should start to see lower bandwidth on your Usage page from these changes. |
Beta Was this translation helpful? Give feedback.
-
I'm seeing this issue as well. With an almost exact doubling of bandwidth between what CloudFlare is reporting and what Vercel is reporting. eg. CloudFlare reports ~50GB where Vercel reports ~100GB. I'm not using ISR and I'm not using serverless functions. A significant number of pages are using |
Beta Was this translation helpful? Give feedback.
Thank you for providing this information to help us further investigate the issue!
Our infrastructure team has used the information you provided to determine an improvement (working with the Cloudflare team). We have made a change to improve how we handle compression between Vercel and Cloudflare.
Our infrastructure now has more granular control over compression, and thus can decrease bandwidth between Vercel and Cloudflare.
Starting today (Nov 24th, 2021), you should start to see lower bandwidth on your Usage page from these changes.