25 Mar 18:14
hybrid mode based on GET vs. POST
From: Kevin Scaldeferri <kevin@...>
Subject: hybrid mode based on GET vs. POST
Newsgroups: gmane.comp.web.blosxom.user
Date: 2008-03-25 17:15:22 GMT
Subject: hybrid mode based on GET vs. POST
Newsgroups: gmane.comp.web.blosxom.user
Date: 2008-03-25 17:15:22 GMT
Has anyone attempted a hybrid mode based on the request method?
Currently, I have a fairly standard hybrid mode, where indexes are
static and entry pages are dynamic:
RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ blosxom.cgi/$1 [L,QSA]
The problem with this is that if one gets slashdotted/reddited/dugg,
the flood of dynamic requests kills your server (I saw loads of about
50, and that was even with most requests being killed by my host for
excessive CPU/memory usage).
My thought at this point is that the primary reason to have entry
pages be dynamic is to a) be able to process comment submissions, and
b) display new comments in a timely fashion. It seems like (a) could
be easily achieved by changing the rewrite condition to only do
dynamic for POSTs:
RewriteCond %{REQUEST_METHOD} =POST
RewriteRule ^(.*)$ blosxom.cgi/$1 [L,QSA]
Then for (b) I would need to modify the feedback plugin to trigger a
rebuild of the static page. This might be trickier, since I don't
think there's any way to get the static rendering system to regenerate
only one page.
Has anyone gone down this road? Any suggestions or warnings?
(Continue reading)
> The problem with this is that if one gets slashdotted/reddited/dugg,
> the flood of dynamic requests kills your server (I saw loads of about
> 50,
Oh yes! And even an Apache configured with reserves can bit hit from
that.
RSS Feed