Welcome! Log In Create A New Profile


Limiting connections / max download amount - how can nginx help?

August 29, 2011 05:18PM
Hi, I'm loving how flexible Nginx is, and how much is built into a simple default build. Thanks to everyone involved. I'm at the point now though where I need to be able to limit connections to a site on a per user basis. I have a site which is behind basic auth, and users pay for a username / password combination. I wish to stop cheaters from sharing their username / password combinations with others around the world, and to prevent bandwidth hammering.

This makes me think of a few problems:

limit connection rate: the limit request module is a bit heavy handed. I have pages that are media heavy and can have 100+ images on. I'm unable to open another page without it blocking me when opening a page with this many media. I wish it would prioritise pages over static content. Of course, this is with one zone set up, and a limit_req in the server context. Should I set up another zone, one for static content, and one for pages so they're counted separately?

limit daily download amout: Can Nginx do this? I've looked down the modules and custom modules but didn't see anything. Something that could limit the user to download x gb/mb p/day. If the limit were 500mb and I had downloaded 480mb and then tried to dl a 60mb file, I'd expect to not be able to download the new file. Any ideas on this?

Username/password sharing. I'm at a complete loss on this. It'd need to be smart enough to catch users from around the world; same country, different cities etc, and also be flexible enough to allow different devices to connect of the same user. Any ideas would be great.

Thank you
Subject Author Posted

Limiting connections / max download amount - how can nginx help?

Roger Smith August 29, 2011 05:18PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 325
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready