Take the 2-minute tour ×

I'm writing a function that will calculate the maximum number of concurrent streaming audio listeners supported an amount of network bandwidth, given stream's bitrate.

listeners = (bandwidth in mbps * 1024) / bitrate in kbps

Assuming a VPS environment and some light web traffic, how much bandwidth overhead and/or inflation should I account for?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

This is actually really difficult to do given that you can't know or assume anything about any of the other network layers underneath your Layer-7 Application (presumably HTTP). See Calculating Protocol Overhead, RFC 6349 and "What % of traffic is network overhead on top of HTTP/S requests?" for just a small bit of this iceberg.

The very rough, folklore-esque answer that I've always been taught was that you can take the theoretical maximum of connection speed and knock off 20% to account for things like signal information, packet fragmentation, MTU misalignment and so on. This is probably a conservative estimate but again calculating it exactly is very difficult which leads me to my next suggestion.

Once you have your application running, you should begin to benchmark it to see what sort of bandwidth it consumes when used concurrently and then see how those numbers compare to both theoretical calculations and folklore wisdom. Nothing beats real world testing when trying to determine things of this nature as you or I have no idea how to calculate things like "VPS environment" or "light web traffic" with anything approaching accuracy.

Also be aware that your question is dangerously close to capacity/performance planning questions which are generally closed.

share|improve this answer
add comment

Your Answer


