CDN billing: Mbps or GB transferred?
In a couple of weeks, I’ll be speaking on a panel at Streaming Media East about CDN best practices from the customer perspective. Since the CDN can be a significant cost, managing that relationship is important to the bottom line. You’re hopefully not surprised that management means measurement, which makes this article all about measurement. Let’s examine implementing a CDN for the Super Productive Uber Destination (SPUD) webserver.
First, here are the 2 prevailing CDN billing methods defined:
Total GB transferred in a month - every singly byte served is metered and billed for.
95th Percentile Mbps - megabit-per-second (Mbps) bandwidth usage throughout the entire billing month is measured in 5 minute chunks and then rank ordered. The top 5% values are discarded and the largest remaining value (the 95th percentile) is used for billing.
Ok, now that’s out of the way, which one should SPUD opt for? Let’s say House-of-Bits (HoB) CDN is offering your choice of the following rates:
$0.20 per gigabyte transfered
or
$30 per Mbps at the 95th percentile for the month
These are not equivelent.
Putting aside whether or not HoB’s rates are competitive, understanding the behavior of the SPUD website is critical to making an informed decision.
For reasons that are beyond the scope of this article, many organizations don’t have Mbps measurements at hand, and they can be difficult to reconstruct after the fact. Total bytes served, on the other hand, are as easy as having your friendly neighborhood sysadmin add up the bytes logged in the webserver log files.
It turns out that SPUD’s webservers pumped about about 20,000 GB last month, and had been growing about 2,000 GB every month leading up to last month. Armed with this information, we can make some fairly sane estimates around how much traffic will be transferred in the coming months:
Month 1: 22,000 GB x $0.20/GB, monthly cost $4,400
Month 2: 24,000 GB x $0.20/GB, monthly cost $4,800
Month 3: 26,000 GB x $0.20/GB, monthly cost $5,200
Total for the next 3 months: $14,400.
Great, now that we’ve wrapped a box around the GB pricing at HoB’s CDN, let’s try to do the same for their Mbps pricing. Since the SPUDs servers don’t have the Mbps data we’re looking for, let’s use some rules-of-thumb that I’ve observed for a while plus some basic math:
- Most web apps follow a daily usage pattern that approximates a sine wave, with lots of use when people in the US are awake and far less when they’re sleeping.
- The ratio between the Peak Mbps and the Average Mbps are typically in the range of 1.3 to 2.2. We’re going to use 1.7 for our estimates with SPUD’s webservers, and tweak it when we get some real measurements.
- We can come up with the average Mbps transfer rate for the entire month by converting gigBytes to megabits: just multiply GB x 1024 to convert to megaBytes and then multiply THAT by 8 to get the total number of megabits transferred. To convert that to the average bits per second, just divide by 86,400 (the number of seconds in a day) and divide again by 30 (the number of days in a month).
- It turns out that all the math above simplifies to a conversion factor of about 316.4 which means that you can just divide GB transferred by 316.4 to come up with your average Mbps for the 30 day month.
Armed with this knowledge and a calculator, let’s see what our traffic expressed in Mbps looks like:
Month 1: 22,000 GB / 316.4 = Avg of 69.5 Mbps, Peak of 118.2 Mbps.
Month 2: 24,000 GB / 316.4 = Avg of 75.9 Mbps, Peak of 129.0 Mbps.
Month 3: 26,000 GB / 316.4 = Avg of 82.2 Mbps, Peak of 139.7 Mbps.
Now before we congratulate ourselves too much for backing out these figures, let’s remember that this is based on some educated observations that may or may not be relevant to SPUDs. Mathematical models are fine, but we’ll be billed on actual behavior and measurements. With that in mind, here are the costs for the above estimated peak Mbps rates:
Month 1: 118.2 Mbps x $30 per Mbps, monthly cost $3,546.
Month 2: 129.0 Mbps x $30 per Mbps, monthly cost $3,870.
Month 3: 139.7 Mbps x $30 per Mbps, monthly cost $4,191.
Total for the next 3 months: $11,607.
That’s almost 20% off of the total GB-transferred pricing… definitely worth validating the model, and probably worth picking the Mbps pricing in this case. In fact, we could co through the entire model again using a more aggressive Peak to Average ratio to see exactly where the crossover point is, but I’ll leave that as an exercise for the reader + Excel.
Issues not explored here include flash traffic events, measuring regularity and periodicity of website traffic, and the effects these and other factors can have on the month-end bill.
Bottom line, yet again: measure to manage!

