Limiting Membership By Bandwidth Limiting Membership By Bandwidth codeigniter codeigniter

Limiting Membership By Bandwidth


You can use the amazon's API to check the bandwidth usage , instead of using the logs .as you have said that you are using s3 for managing the assets , it will be good if you create a new bucket for every user and check the bandwidth usage and then limit the account if he/she exceeds that limit.


Limiting bandwidth per each connection for linux pc

You have to install "Lighttpd" tool, its an web server. it is useful to limiting the bandwidth per connection and I also install Axel for increase and decrease the number of connections.

sudo apt-get install axel

http://www.cyberciti.biz/tips/installing-and-configuring-lighttpd-webserver-howto.html

per connection i add this command in this path /etc/lighttpd /lighttpd.conf.

connection.k bytes-per-second=70

I limit the bandwidth for 70 kb/sec and I tested each connections for 5 times and i observed minimum time, maximum time and I calculated average time. I repeated this up to 10 connections.


You can create custom log with Apache to track the number of bytes transferred. The difficult part will be associating that to a given user. Probably a combination of cookie and maybe remote IP.

You would then take that log and process it in the background.

S3/Cloudfront can provide similar logs, but you probably wont be able to associate it to a user.