In-process key/value (session) store option. . .?

agentzh agentzh at
Wed Jan 6 08:55:01 MSK 2010

On Wed, Jan 6, 2010 at 12:43 PM, David Dabbs <dmdabbs at> wrote:
>  * Search an in-process hashtable using a value from a request parameter or
> header. (think session cache with expiry)
>  * If the key is not found, then call out to some distributed cache backend
> (e.g. Memcached, Redis, Tokyo) to get the value.
>  * Add a new request header with the fetched value.
>  * Proxy forward the request upstream.

Just some random nginx config trying to give myself a big picture and
think aloud:

   location /foo {
     # XXX search in-process cache...
     eval $val {
         set $memcached_key $arg_foo;
         memcaced_pass;  # tokyotyrant, memcached, or etc
         error_page 404 = @bar;
     more_set_input_headers 'X-My-Header: $val';
     # XXX put $val into in-process cache...
     proxy_pass 'http://blah.blah.blah';
  location @bar {
     echo "";

The "# XXX" part is something that is missing atm :P

To be honest, I've also been thinking about building such a module
myself. Will you join the development? (Even though I'm still
polishing ngx_drizzle and ngx_oracle with chaoslawful right now ;))


More information about the nginx mailing list