NginxHttpMemcModule vie NginxHttpMemcachedModule

Danny Trinh dtrinh at eastonbellsports.com
Tue Dec 29 19:36:07 MSK 2009


And that is the problem. We have many modules doing similar jobs, and
none of them is easy for users to get them work. I'm an admin, I can
feel how much frustrated it is. I think what the users want is the
module has easy way to setup and/or the clear sample/instruction that
they can go through. I'm not a developer, but I can help to test thing
out.
Thanks,

Danny Trinh
Linux Admin


-----Original Message-----
From: Piotr Sikora [mailto:piotr.sikora at frickle.com] 
Sent: Monday, December 28, 2009 11:01 PM
To: nginx at nginx.org
Subject: Re: NginxHttpMemcModule vie NginxHttpMemcachedModule

> BTW, none of them can be serve as a transparent content cache out of
> the box. I can think of a ngx_cache module just like Apache2's
> mod_cache (with various storage backends like mod_disk_cache,
> mod_mem_cache, and mod_libmemcached_cache in that context). Is anyone
> already working on that?

I've got mixed feelings about this.

Regarding memcached / other storage backends:
I would love to see memcached module which would be able to act as a 
transparent cache for proxy/fastcgi/slowfs and save content to memcached

cluster(!), but the way I see it, it cannot be easily implemented as a 
module. In my opinion change of storage backends should be as
transparent as 
possible, which means that this should be implemented as modification of

existing {proxy,fastcgi,slowfs}_cache_path or addition of similar 
{proxy,fastcgi,slowfs}_memcached_path and nothing more (from
configuration 
point of view).

This should be fairly easy to implement as a patch. Calling
memcached_set 
function instead of ngx_ext_rename_file() in
ngx_http_file_cache_update() 
should do the trick for writing and calling memcached_get function
instead 
of ngx_http_file_cache_read() in ngx_http_file_cache_open() should do
the 
trick for reading ;)

(Yes, I already did the hard part :P)

Implementing this as a module probably wouldn't be as easy and as clean 
(configuration-wise).

But does anyone actually need such feature?

Regarding ngx_cache module:
I believe it is NOT needed. It would be a lot(!) of code replicated from

nginx base, which would be a nightmare to maintain and keep compatible
with 
all existing nginx versions. Also, it wouldn't add any real benefits
over 
existing {proxy,fastcgi,slowfs}_caches and memcached storage backend 
described above.

But this is just my opinion ;)

Best regards,
Piotr Sikora < piotr.sikora at frickle.com >


_______________________________________________
nginx mailing list
nginx at nginx.org
http://nginx.org/mailman/listinfo/nginx



More information about the nginx mailing list