-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
limit_traffic_rate_zone rate $remote_addr not limiting by IP #4
Comments
I have just tested this module with nginx-1.4.1, and it worked well. So could you post the accesslog and debug log here to see what happened? |
We too are using a fresh copy of 1.4.1. We have disabled accesslog and debug log. Is there any other way of diagnosing this? |
Okay, I have enabled debugging for connections from my IP only. See from the screenshot 10x connections brings 200kb/s instead of the 20kb/s as stated in the config. Each connection has 20kb/s. See error.log (http://pastebin.com/YKVqH6Hm) with debug for my IP. I opened 10 connections to a single file in this example. |
I've pushed a path to fix this issue. And now I think it will work correctly. This issue had been found before, but I forgot to sync the code to github. So sorry for that. |
Thank you very much! This seems to have fixed it. However, a little bug... When downloading two files at the same time - the first download gets priority of speed while the second download gets less priority. See screenshot. Why is the speed not shared equally - i.e. 10kb/s each? Is the speed set once at initial connection or is updated live throughout the streaming process? Also, if the first download is canceled and only one connection is open (the second one) - the transfer speed does not increase up to 20kb/s. Update: maybe it does increase but very, very slowly. Is there any way to update the refresh speed? |
This module use nginx core variable "limit_rate" to limit rate. Because of the limitation of "limit_rate", we can not distribute equally and smoothly. There were some discussion about this topic. Please refer to the post: |
I have just installed a fresh copy of Nginx for our HTTP download file server. This module is amazing (when working properly) and just what we are looking for.
However, while we have managed to configure it to limit per connection - if a user from the same IP opens up another connection then the download speed is not shared - they get a full speed connection again.
For example, we have set the speed limit to 20kb/s... if a user connects with one connection goes to download a file with one thread, that's fine and speed is limited. But if they open multiple connections (for example a download software), they can achieve many 20kb/s connections - for example 5 connections brings 100kb/s.
How can I limit the connection speed across all connections from the same IP?
Current config:
The text was updated successfully, but these errors were encountered: