Bandwidth throttling based on total available upstream

We have 1.5G from our upstream provider.
We have 700 customers on various packages (4M down/1.5M up, 2M/768k, … etc).

Internet comes into CCR1036-8G-2S+ at 1.5G fiber from the provider. This router handles the firewall rules and sends out “good” traffic to another CCR1036-8G-2S+ which handles the bandwidth limiting for the individual customers based upon which plan they subscribe to. This all works using pcq queues, queue trees, and mangle.

Recently we’ve been hitting the 1.5G cap from upstream around 8-10 pm at night.

Q: How can I throttle everyone equally when nearing the limit? Can I do it in stages, ie, get to 1.1G total and reduce everyone by 10%, get to 1.2G total and reduce everyone by 15%…? Is this even possible with Mirotik stuff or do I need a separate bandwidth controller similar to NetEqualizer?

I’d look at the queue side on the overall WAN – lot of stuff that equally help all the client subnets – you could apply some AQM shapper queue on the WAN

Lowering the client queues bandwidth max/limit stuff could be done with a script as the on-action in /tool/traffic-monitor. E.g. you could use several if you’d like, say at 1.3Gb, set the /queue/… limits; perhaps reducing further as you get closer to the theoretically max. The script could add an IF/DO/ELSE based on the time, if you feel that’s the most relevant - but traffic-monitor always triggers based traffic level.