Bug 218447 - net/pwhois: periodic script needs anticongestion sleep
Summary: net/pwhois: periodic script needs anticongestion sleep
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Ryan Steinmetz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-07 03:01 UTC by Alan Somers
Modified: 2018-01-10 01:53 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (zi)


Attachments
svn-diff-bsdstats (1.00 KB, patch)
2018-01-10 01:53 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Somers freebsd_committer 2017-04-07 03:01:57 UTC
Periodic scripts that hit external servers can cause a "thundering herd" problem, whereby many systems' periodic scripts run at the same time, and overload the server.  To prevent this, such scripts should sleep for a random amount of time before hitting the external server.

After r316432, there is a common anticongestion function to handle this.  For an example of how to use it, see
https://bugs.freebsd.org/bugzilla/attachment.cgi?id=181374&action=diff
Comment 1 Walter Schwarzenfeld freebsd_triage 2018-01-10 00:13:23 UTC
Maintainer feedback?
Comment 2 Ryan Steinmetz freebsd_committer freebsd_triage 2018-01-10 01:07:22 UTC
Please create a diff.
Comment 3 Alan Somers freebsd_committer 2018-01-10 01:12:50 UTC
I don't use pwhois myself.  I just found the problem by grepping, after I had noticed it in a different port.  So I don't have a diff for the pwhois port.  See the link below for an example of how I fixed it in bsdstats.
Comment 4 Walter Schwarzenfeld freebsd_triage 2018-01-10 01:53:11 UTC
Created attachment 189573 [details]
svn-diff-bsdstats