Rate Limiting Per-Socket

Takashi Okumura taka at cs.pitt.edu
Wed Jun 23 03:55:53 GMT 2004


hi,

please take a look at mod_netnice. it uses netnice, another in-kernel
traffic control primitive on the platform. since you can control each
socket with netnice, i think it's easy to extend the module to meet
your needs.

	http://www.netnice.org/app_modnetnice.html

thanks,

-- taka

> Hello,
> 	I am looking at methods to rate limit a single socket to a specific
> pipe or rate with FreeBSD.  I would like to make an Apache module that
> could do its outgoing rate limit *in* kernel, making the module very
> simple, and more accurate by using the kernel todo the rate limiting.
> 
> I have been looking at Dummynet and pfil_hooks, but these seem to
> operate only on an entire interface.  I would like to have these operate
> only on a socket fd that I designate.  Ie a special setsockopt() would
> put socket x into pipe a.  This pipe 'a' was setup ahead of time to only
> allow 512 kb/s.
> 
> Is this possible with FreeBSD?  Do you have any suggestions on the best
> way to proceed?
> 
> Thank you, 
> -Paul Querna
>



More information about the freebsd-net mailing list