How do you handle billing on shared servers in apache?

What are your solutions to handle traffic billing for your vhosts in a shared apache environment? If you use log parsing, does your solution scale well when the logs become very large? Does anyone use any module for this?

+3
source share
6 answers

There are certain modules for Apache 1.x and 2.x that will allow you to set the maximum for the transfer amount, most of them are tracked using the scoreboard file created by Apache (when mod_status is enabled with ExtendedStatus), the one that I still noted with of the moment when I was looking for it, mod_curb , however, it is not complete and currently only works on server scales, and not on separate virtual hosts.

Apache modules can be configured as outgoing filters, so you can write a suit module that sits at the end of the chain and add all outgoing packets using the data provided by APR, then you can add them to the counter for that particular domain / subdomain. After that, you have a choice of what to do with the data.

mod_deflate, Apache, , , , , . .

, , . . , perl script, 15 . , 15 , , , perl , . tail -F, perl , , . , , , .

+1

Webalizer Awstats. , , . Awstats, , 10 + , . , , . Webalizer , , , . , , :)

+1

IP-, , . mod_logio . mod_logio , .. . BufferedLogs ( , , ). (, ) -, , httpd. HTTP- L- , . , , .

, . httpd, . , .

, , mod_cband mod_bw. , vhost . , .

IP vhost, , IP, , . iptables.

+1

IIS, apache, ( / ). , , , .

, . 15 , .

, , . .

0

mod_cband , , , max_connections (, ) , , . , , "503 Service Temporarily Unavailable".

For example, I install "CbandSpeed ​​1000Mbps 500 1200", and server connections are scanned up to 1200 in about 8 hours, and then remain there. at the moment I am counting the total number of connections in the "Remote Clients" section of the mod_cband status window, and I see about 50. I also used ps aux, and I see around the same number (~ 50) of open HTTP processes as normal, except for the fact that no one can access the site at all due to 503 errors.

Any ideas what might be wrong, or can it be fixed?

0
source

Source: https://habr.com/ru/post/1698718/


All Articles