Improved memcached module
Maxim Dounin
mdounin at mdounin.ru
Fri Aug 21 12:47:24 MSD 2009
Hello!
On Fri, Aug 21, 2009 at 10:06:00AM +0200, Spil Games wrote:
> Hi,
>
> Attached is a patch which allows both custom headers and custom response
> codes to be stored in memcached and returned by the memcached module.
> The Nginx 0.6 version of this patch has been in production on a heavily
> loaded site (100M unique visitors per month) for over a year with no
> problems whatsoever. The original thread on this can be found here:
>
> http://www.ruby-forum.com/topic/160379#724717
>
> I think it would be a valuable addition to Nginx to include this in the
> main distribution, but I'll leave this up to Igor. The patch may be a
> bit too hacky for his taste.
>
> Feedback appreciated!
>
> Attachments:
> http://www.ruby-forum.com/attachment/3956/nginx-0.7.61-memcache.final.patch
There are at least 2 problems with this patch I see:
1. It relies on 'HTTP/' prefix on to find out if key in question
has headers. This is bad, as there is no way to return text
starting from this string. IMHO it should be changed to use flags
instead.
2. It changes u->conf during request execution, this implies race
between different requests.
Maxim Dounin
More information about the nginx
mailing list