Automatic Monthly Traffic Limiter
-
A suggestion thread.
Many people have monthly bandwidth limits. These sometimes start at different times in the month or could be over different durations so a few options need to be in the system for the "billing period". Some examples:
- Restart on the 1st of every month
- Restart on the 'x'th day of every month
- Restart every 30 days
- Restart every 7 days
- Restart every 'x' days
The system would work on a per-interface basis and would record the monthly bandwidth usage - There would be the option of having separate or combined upload / download limits and counters.
The system would keep track of the average usage over the past 'x' (Configurable) months.
The system would know how much bandwidth you have for this limit in the given billing period. From this and the previous average usage it would calculate a speed limit which would limit the interface at so that over the current month, if the usage stays about the same as it did over the previous few months you will run through all of your bandwidth and not go over. There would be a configurable amount of headroom so that you don't overshoot. (Initial limit.)
The system would adjust this limit depending on the average usage of the current month up to now - It would also take into account the amount of time remaining in the current billing period and the amount of remaining bandwidth. (Adaptive limit.)
The previous (Initial) limit which was based upon the previous months is only used as the starting point of the month. The two limits are "blended" together over the first 'x'% (Configurable) of the month. (For example, for the first 10% of the month, the limit linearly blends between the previous limit and the adaptive limit, after that just the adaptive limit is used.)
This would be ideal for web hosting where the traffic may change over the course of the month, but can also be useful for home users.
No bounty because I think this should be a base feature of pfSense. If you think this would be useful to you and wish to put a bounty on it then feel free.
Any questions or design issues, just mention and I'll do my best to answer.
-
Just because you think it should be a core feature doesn't mean you can't offer a bounty. Indeed a (realistic) bounty is likely to be the fastest way to get what you're talking about (as even on first glance that doesn't look trivial).
-
I'm offering it as a suggestion rather than a request, that and I don't have money to put on something like this.
I do offer my time in designing / spec'ing this however.