On Thu, 2003-12-11 at 22:00, Stas Bekman wrote: > Raul Dias wrote: > > I did mean to sound as a rant (if I did). I know that's not easy to > > keep with the documentation. > > what can you do with your subconscious which seems to tell the truth of what > you've really meant ;) > >:)
> Doc patches are always welcome... > > > I am using a naive approach to do a traffic shapper. > > Dividing the available bandwidth by the sum of all "shapped" connections > > will give the individual connection bandwidth. > > What's a "shapped" connection? Is it a filter that tries to measure the data > transfer rate? No, this is a http traffic shapper ala mod_bandwidth that can be setup by virtual domain, dir/location, groups and/or client ip. > > I thought there are special tools that can give you traffic > accounting per socket. Metering is another module. But it would be really nice if it could be implemented thru filters. To have traffic statistics in a per virtual domain / client ip combination would require a reassemble of the HTTP headers by a sniffing tool. > You should be aware of at least one culprit (which I'm not sure if it's still > the case with httpd-2.0). If you use the front-end/back-end setup and reverse > proxy the requests, your backend will never know that the connection was > aborted if it did. proxy doesn't tell that to the backend (it keep the > connection open). Again this is how things work in 1.0, I don't know about 2.0 > yet. But this is another potential situation where your meter may fail. > That's something that I will need to look at in the future. > > I think I understand it now. > > You can only use Apache::DECLINED before starting to read the data. > > That's right. You can return it after you started reading too, but it'll > return some of the data that you may have printed out already. which is not a > problem if the connection has been aborted anyway. I've asked on httpd-dev > what should be returned and didn't have any follow ups so far. But I think > APR::FAILURE, or anything else will do fine. For now I will just turn off the delay. As another filter might need to get the whole data. []'s Raul Dias -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html