It's possible to restrict the speed using the rate limit on a specific location.
However, how can we do it dynamically ?
Let say you have paid vs non-paid users and you want to give an higher bandwidth to paid users.
We would need to dynamically check in the Database and allow a certain speed for this particular group of users.
Do you have any nginx module in mind ?