[plt-scheme] Limiting Concurrent Connections to Web Server

From: Henk Boom (lunarc.lists at gmail.com)
Date: Tue Jan 6 16:38:03 EST 2009

I've asked about this a couple of times before, but I guess I should
try again. I'd like to limit the maximum number of connections to be
handled concurrently by the web server. Last June I posted about it on
this mailing list and was advised to file a bug report:

http://bugs.plt-scheme.org/query/?cmd=view&pr=9444

A couple weeks ago I wrote a trivial dispatcher to limit connections
using a semaphore, but it didn't seem to work, as the semaphore wasn't
always released (I think due to the way dropped requests are
terminated). It doesn't sound hard to implement this properly, and I'd
like to take a look, but I'm not familiar enough with the web server
code to know where to look. What would be the appropriate way to
implement this? Ideally there would be some way to filter requests so
that, for example, only certain requests are affected. For example, I
wouldn't want the limit to affect static file requests, or
hypothetically, long-polling requests.

    Henk


Posted on the users mailing list.