Date: Wed, 29 Dec 2004 16:09:50 +0300 (MSK) From: Maxim Konovalov <maxim@FreeBSD.org> To: Mike Silbersack <silby@silby.com> Cc: net@FreeBSD.org Subject: Re: Update: Alternate port randomization approaches Message-ID: <20041229155419.I74642@mp2.macomnet.net> In-Reply-To: <20041229025718.U26249@odysseus.silby.com> References: <20041218033226.L28788@odysseus.silby.com> <20041229025718.U26249@odysseus.silby.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 29 Dec 2004, 03:02-0600, Mike Silbersack wrote: > On Sat, 18 Dec 2004, Mike Silbersack wrote: > > > There have been a few reports by users of front end web proxies and other > > systems under FreeBSD that port randomization causes them problems under > > load. This seems to be due to a combination of port randomization and > > rapid connections to the same host causing ports to be recycled before > > the ISN has advanced past the end of the previous connection, thereby > > causing the TIME_WAIT socket on the receiving end to ignore the new SYN. > > Based on testing done by Igor Sysoev, I've found that my original patch is > insufficient; even as little as one randomizaion per second can cause problems > for some users. As a result, I've created the attached patch (versions for > both 6.x and 4.x are included). It implements a relatively simple algorithm: > Port randomization is turned disable once the connection rate goes above 20 > connections per second, and it is not reenabled until the connection rate > falls below 20 cps for 5 seconds straight. > > This appears to work for Igor, and it seems safe enough to commit before > 4.11-RC2. But, if possible, I'd like a few more sets of eyes to doublecheck > the concept and code; please take a look at it if you have a chance. Again, it's not clear for me why we don't follow our usual deveplopment cycle here: commit & test in HEAD and then MFC to STABLE? -- Maxim Konovalov
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041229155419.I74642>