Limit bandwith for specific target domains ( onedrive ... )

I've got a pretty bad internet connection that basically goes full as soon a computer starts and sync data over onedrive.
I'm looking for a way to limit the bandwidth from any device on the network towards the onedrive destination hosts ( Required URLs and ports for OneDrive consumer - OneDrive | Microsoft Learn
Is there a way to achieve this with openwrt and a service? What's my best bet ?
Thanks!

You can try with SQM to try and have a more fair distribution of the available traffic.

Rate limiting domains backed by large CDNs (like Azure, AWS, cloudflare, …) is somewhere between incredibly hard (constantly keeping track of 'bad' and 'good' IP ranges) and impossible. SQM takes a more generic approach of fairness between flows and favouring interactive (lower bulk size) ones, if this suffices for your scenario, it would be much easier to implement.

2 Likes

I would assume that is because after an initial DNS request the system uses the actual IP addresses returned by the DNS system for the intended endpoint, but with CDNs the same IP addresses of the servers can be used for multiple unrelated services. So in theory trying to throttle onedrive might result in also throttling amazon prime video accidentally (this is a made up example).
Technically it is possible to use tricks to collect all IP addresses used by a given domain name and treat these differentially, but there is no guarantee that this treatment will be restricted to the intended services.

1 Like

I've configured SQM with the proper mesure download ( 7400 ) and upload ( 800 ) and will check the situation over the next few days.

Thanks for you feedback, i'll report back how it's changed the overall situation .