Welcome! Log In Create A New Profile

Advanced

Re: NginxHttpMemcModule vie NginxHttpMemcachedModule

Piotr Sikora
December 29, 2009 12:06AM
> 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@frickle.com >


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

NginxHttpMemcModule vie NginxHttpMemcachedModule

danny December 28, 2009 05:58PM

Re: NginxHttpMemcModule vie NginxHttpMemcachedModule

agentzh December 28, 2009 09:00PM

Re: NginxHttpMemcModule vie NginxHttpMemcachedModule

Piotr Sikora December 29, 2009 12:06AM

RE: NginxHttpMemcModule vie NginxHttpMemcachedModule

danny December 29, 2009 11:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 153
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready