[arch-general] ftp.archlinux.org rate limiting
Hi all, Could someone share the details of how the 50kbps rate-limit is implemented on ftp.archlinux.org? I know Google gives me plenty of results for rate-limiting with iptables and tc but I've never had much success with tc, and the ftp.archlinux.org rate-limiting seems to work perfectly... So why try reinventing the wheel? :) Cheers, ~p
Phillip Smith wrote:
Hi all,
Could someone share the details of how the 50kbps rate-limit is implemented on ftp.archlinux.org?
I know Google gives me plenty of results for rate-limiting with iptables and tc but I've never had much success with tc, and the ftp.archlinux.org rate-limiting seems to work perfectly... So why try reinventing the wheel? :)
Cheers, ~p
Hi probably using this (see man vsftpd.conf) ;) *anon_max_rate* The maximum data transfer rate permitted, in bytes per second, for anonymous clients. Good luck! -- Gerardo Exequiel Pozzi ( djgera ) http://www.djgera.com.ar KeyID: 0x1B8C330D Key fingerprint = 0CAA D5D4 CD85 4434 A219 76ED 39AB 221B 1B8C 330D
2009/11/23 Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>:
Phillip Smith wrote:
Hi all,
Could someone share the details of how the 50kbps rate-limit is implemented on ftp.archlinux.org?
I know Google gives me plenty of results for rate-limiting with iptables and tc but I've never had much success with tc, and the ftp.archlinux.org rate-limiting seems to work perfectly... So why try reinventing the wheel? :)
Cheers, ~p
Hi
probably using this (see man vsftpd.conf) ;)
*anon_max_rate* The maximum data transfer rate permitted, in bytes per second, for anonymous clients.
Further to this, I've got rate limiting on HTTP working too using mod_bw which I've added to the AUR. Here's the config in httpd.conf for anyone else that's interested: <IfModule mod_bw.c> BandwidthModule On ForceBandWidthModule On # Files with these extensions, larger than 1kb limited to 50kbps LargeFileLimit .test 1 50000 LargeFileLimit .pkg.tar.gz 1 50000 </IfModule> Works a treat! :D
Phillip Smith wrote:
Hi all,
Could someone share the details of how the 50kbps rate-limit is implemented on ftp.archlinux.org?
I know Google gives me plenty of results for rate-limiting with iptables and tc but I've never had much success with tc, and the ftp.archlinux.org rate-limiting seems to work perfectly... So why try reinventing the wheel? :)
Cheers, ~p
You don't need tc to do traffic shaping, you can use iptables as well for this. It is more primitive though, but for simple tasks it's easier than using tc. Glenn
*anon_max_rate* The maximum data transfer rate permitted, in bytes per second, for anonymous clients.
Good luck!
Ah, I didn't think about doing it in the daemon... That would definitely be easiest, I think I'll do it this way! :)
You don't need tc to do traffic shaping, you can use iptables as well for this. It is more primitive though, but for simple tasks it's easier than using tc.
Now I'm curious... Everything I've seen points to using tc to be able to rate-limit in kbps... The only rate-limiting I know you can do in iptables by itself is packets-per-timeframe (second, minute etc) limiting?
Phillip Smith wrote:
*anon_max_rate* The maximum data transfer rate permitted, in bytes per second, for anonymous clients.
Good luck!
Ah, I didn't think about doing it in the daemon... That would definitely be easiest, I think I'll do it this way! :)
You don't need tc to do traffic shaping, you can use iptables as well for this. It is more primitive though, but for simple tasks it's easier than using tc.
Now I'm curious... Everything I've seen points to using tc to be able to rate-limit in kbps... The only rate-limiting I know you can do in iptables by itself is packets-per-timeframe (second, minute etc) limiting?
You can use hashlimit for it. And how is rate limiting in kbps not the same as packets-per-timeframe? It's exactly the same. Glenn
Regarding client side rate limiting, I have tried trickle once. Does anyone know any better rate limiters client side ? Something like dummynet in FreeBSD. iptables is there but anything simpler would do. ------------- Raghavendra On Mon, Nov 23, 2009 at 3:47 PM, RedShift <redshift@pandora.be> wrote:
Phillip Smith wrote:
*anon_max_rate*
The maximum data transfer rate permitted, in bytes per second, for anonymous clients.
Good luck!
Ah, I didn't think about doing it in the daemon... That would definitely be easiest, I think I'll do it this way! :)
You don't need tc to do traffic shaping, you can use iptables as well for
this. It is more primitive though, but for simple tasks it's easier than using tc.
Now I'm curious... Everything I've seen points to using tc to be able to rate-limit in kbps... The only rate-limiting I know you can do in iptables by itself is packets-per-timeframe (second, minute etc) limiting?
You can use hashlimit for it. And how is rate limiting in kbps not the same as packets-per-timeframe? It's exactly the same.
Glenn
participants (4)
-
Gerardo Exequiel Pozzi
-
Phillip Smith
-
Raghavendra Prabhu
-
RedShift