Wednesday, 12 October 2011

The 95th Percentile - How ISPs charge

Hi all,

I've finally got my head around how ISPs charge customers for their traffic. Generally speaking ISPs charge on a flow basis rather than volume. What does this mean? It means that an ISP will charge a customer based on the number of bits passing through their pipes at any particular moment in time (commonly Megabits per second) as opposed to the total volume of traffic the ISP moves for the customer. Why do ISPs prefer a flow? Simply because it protects them from bursty traffic and unpredictable performance. If you was to charge by volume then theoretically you could send little or no data over a period of say 29 days then on the last billing day of the month send all of your traffic in one go. How would ISPs cope?

Interestingly some companies try to negotiate with ISPs a price based on volume. They come up with a suitably large figure, say 800 Megabytes per month and then try and command a lower price-per-megabit. If you do the calculations to convert this to Megabits per second we get (800 x 8 / 30 / 24 / 60 / 60) = 0.0025Mbps which in reality is not much at all.

We've now established why ISPs use a flow-based calculation. Now we need to understand how ISPs charge.

ISPs generally take traffic statistics every 5 minutes in both the inbound and outbound directions. This means over a billing month of 30 days there are (60/5 * 24 * 30) = 8640 lines of statistics per customer interface.

What the ISP does is arrange the 8640 lines in order of size, that is, from highest Mbps to lowest Mbps. The ISP then removes the top 5% of the lines and bills the customer for the next line which is the 95th percentile. This is done for both inbound and outbound traffic and whichever is highest the ISP chooses as the charge point. Those that are savvy may realise that the customer is actually allowed to burst for a period of time without penalty. If we say the top 5% of statistics are not taken into account (8640 * 0.05 = 432), and each statistic is 5 minutes, then the customer has effectively 432 * 5 = 2160 minutes or 36 hours in which to burst until their hearts are content.

For those customers with multiple connections (not in a bundle) then there are two chargeable models; cumulative and aggregate.

Cumulative charging takes the above example and repeats it for each individual connection, a simple A + B approach. Let's say that the 95th percentile of circuit A is 500Mbps and for B it is 800Mbps and the price per Megabit is £1 then the customer will be charged (£1 x 500) + (£1 x 800) = £1300.

Aggregate charging differs slightly. For each of the 8640 lines of statistics for each connection, those lines are added together to give one set of statistics for all connections. The 95th percentile operation is carried out on this set to give the charge point.

Which model you choose is down to how bursty your traffic is, whether you are using back-up links etc. I would say that if there isn't much correlation between your connections (i.e. they're not a backup connection to another) and your traffic is predictable then a cumulative model would suit best. However, if your traffic is bursty in nature and you are using a backup connection with the same ISP then an aggregated model is better suited. If you had a backup connection that has been unused for the majority of the month and on the last week of the billing month the primary connection fails you could be bursting beyond your 36 hours grace period on the backup connection and then if using the cumulative model be charged for very high data rate when over the course of the billing period the link was mostly idle.

Some customers tend to ask for an average calculation to be done. For those that burst under their free 36 hours per month then the 95th percentile works better for you as the burst period is removed from the calculation. If using the average calculation in this case the customer will be charged more. Where the average works in the customer's favour is with those that burst over their free 36 hours as the ISP can then charge at the higher price point, however, ISPs tend not to do this as they wish to protect themselves from the bursty nature of some customer's traffic and provide more predictable behaviour.

I hope this helps you understand the 95th percentile and why it is used.