sigoden / dufs

A file server that supports static serving, uploading, searching, accessing control, webdav...
Other
5.45k stars 259 forks source link

Speed Limiter #401

Closed blackops786187 closed 1 month ago

blackops786187 commented 1 month ago

Hi,

Thanks for the work youve put into this file server. Sharing file securely has become a breeze !

Was wondering how feasible it would be to implement the ability to specify a rate limit via command line argument. This would be helpful when you dont want users to max out your upload when they are downloading files from you and therfore saturate your connection and cause issues

Sounds simple in theory but i suspect its not straightforward to implement. If its not an option for you, can you suggest other tools to rate limit

sigoden commented 1 month ago

Dufs will not support this feature.

sigoden commented 1 month ago

There are several types of speed limiting

  1. Scope

    • Single connection: nginx with limit_rate
    • Single IP: nginx with limit_rate/limit_conn
    • Entire service: tc
  2. Direction

    • upload
    • download