[leafnode-list] [PATCH] Random initial delay for fetchnews
Samuel Tardieu
sam at rfc1149.net
Thu Jul 20 10:41:52 CEST 2006
Hi.
François Pétillon, in charge of the biggest French news server
news.proxad.net, asked me to wait for a random delay before connecting
to his new server. As many people, I used
*/5 * * * * /usr/sbin/fetchnews
in a crontab entry, and as many others do that and as we are almost
all synchronized using NTP, we were slammering the NNTP server exactly
on square times.
I've added a "-i seconds" option to fetchnews, which waits for up-to
"seconds" seconds before trying to connect to upstream servers. Now,
my crontab entry reads:
*/5 * * * * /usr/sbin/fetchnews -i 60
which adds a random initial delay between 0 and 60 seconds.
The patch is against leafnode 2.0.0_alpha20060321, the one found in
Gentoo, but is so small that it will probably apply to later versions
without difficulty.
Patch attached. The corresponding ChangeLog entry is:
2006-07-20 Samuel Tardieu <sam at rfc1149.net>
* Add -i option to fetchnews to allow for an initial delay before
connecting to upstream servers. This prevents multiple leafnode
clients from slamming a server on square hours for example by
randomly differing their connections. Feature suggested by
François Pétillon.
Sam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: random.patch
Type: text/x-patch
Size: 3138 bytes
Desc: Add -i option to fetchnews
URL: <http://krusty.dt.e-technik.tu-dortmund.de/pipermail/leafnode-list/attachments/20060720/064e62e3/attachment.bin>
More information about the leafnode-list
mailing list