Economic bandwidth optimization

By using quality of service ipfire is primarily able to prioritize traffic in a situation with limited bandwidth. We are dealing with the challenge to make IPFIRE manage/optimize our costs of bandwidth used.

We use IPFIRE in a datacenter with 1 GBit/s up-/downlink. In fact, we have a 100 MBit/s flatrate: all traffic that does not exceed 100 MBit/s during a given month does not incur an additional fee and is included. In addition we are allowed to use the full available bandwidth up to 1 GBit/s for max. 5% of the time of the billing period (e.g. one month). If we exceed this time share limit, we have to pay for every additional MBit/s we consume. In our case the most extreme scenario (full bandwidth usage for the duration of one month) would lead to additional costs of several hundred euros (simplyfied).

To put it simply, we have three types of traffic

A - very high priority, but only a low amount
normally not exceeding 10 MBit/s maximum, this traffic should pass immediately at any time, whatever ist costs

B - regular traffic, high amount
this traffic does “normally” not exceed 100 MBit/s, but occasionaly grows up to 200 MBit/s (e.g. nightly backups etc.), the volume (duration of time utilized) is growing

C - base load traffic with low priority
actually ~20 MBit/s, nice-to-have, but may grow up in future

Actually with quality of service we configured an over all bandwith limit of 200 MBit/s for all traffic and small amounts of guaranteed bandwidth for all thre types of traffic in the hope that this is sufficient and we won’t receive a surprising bill. This worked well until now.

In the future, we would like to approximate the following configuration as near as possible.
Please excuse complicated explanation; I’m really not familiar with this:

Traffic type A should be guaranteed in any situation. Traffic of type B should be allowed to grow up until A+B+C reaches 200 MBit/s, BUT primarily at the expense of only traffic type C in the following manner: type C should at first be decreased when the sum of A+B+C threatens to exceed 100 MBit/s. According to the example, traffic of type C should be reduced beginning with 70 MBit/s of traffic type B (10 MBit/s for traffic type A assumed) and should be throtteled to zero when traffic types A+B reach 100 MBit/s. After that, traffic type B may be allowed to grow up until A+B reach 200 MBit/s maximum and type B is throtteled itself.
In the case that traffic type A needs more than 10MBit/s, at first traffic type C should be reduced in order to keep A+B+C <= 100 MBit/s. If A grows on, traffic type B should be throtteled in order to keep A+B+C <= 200 MBit/s.

With this we intend to increase our overall bandwidth usage and simultaneously limit the risk of additional costs.

Actually I have no idea how (if possible) to realize this. Are there any suggestions from the community in here? Thanks in advance!