Hi, this is more of a thought exercise.
Here is the premise - provider side marketing allows 1250GB data cap a month, anything more is overage. Client (or provider CPE) wants to use Mikrotik device to facilitate easy compliance with the data cap.
Here’s the though - 1250GB per month are constant load of 1866kbit symmetric (up and down each simultaneous). Setting a shaper to this speed is obviously detrimental to the user experience. If a device can track its usage and know when its usage is less than the average target it can build a reserve and when traffic passes it can allow borrowing from the reserve until it reaches zero and then stick to the average target, this will increase the user experience a lot.
e.g. max-limit=1886k burst-threshold=1866k burst-limit=500m bust-time=31days
the challenge is that per Mikrotik documentation average rate is calculated for the previous burst-time, so if you set it to 31 days, then it is useless: You can only get burst the next month for traffic unused this month, disregarding the limit of next month, e.g. does not work. If you set bust-time to 1s, then you can only build a reserve and borrow from the prior second, rather than from the entire current interval. Same goes for a day, week, etc. plus you can blow way past though the target.
With ros6 you can cobble a script with ip accounting that will check how much traffic has passed, calculate your “reserve” compared to the average, and project what the new speed limit should be, so that you don’t blow part it. Problem is a) it’s clunky, b) it diminishes the bandwidth speed needlesly as it must assume steady usage until the end of the period as to not cut service and c) there is no ip accounting in ros 7.
Has anyone found a non-braindead to enforce datacaps without allowing overage but without cutting user’s service or to have the average and burst work on current interval measurements (be running averages), rather than on previous interval?
Would Mikrotik be looking to add a feature to allow changing how the burst work, or outright data cap compliance feature, it will save a lot of heartburn for both users and small providers?