Why named shared memory zones

Igor Sysoev is at rambler-co.ru
Mon Sep 28 20:15:57 MSD 2009

On Mon, Sep 28, 2009 at 07:04:27PM +0300, Marcus Clyne wrote:

> What about offering an alternative, clearer syntax?  e.g.:
> proxy_cache_path   /data/nginx/cache1  1:2  ONE  10m;

In my opinion

proxy_cache_path   /data/nginx/cache  levels=1:2   keys_zone=ONE:10m
                   inactive=1h        max_size=1g;

is clearer and more expansible: you just need to add new keywords.

Furthermore, this week I plan to refactor limit_zone module and
to change syntax of

limit_zone   one  $binary_remote_addr  10m;
limit_conn_zone   $binary_remote_addr  zone=one:10m;

on the analogy of
limit_req_zone  $binary_remote_addr  zone=one:10m   rate=1r/s;

Igor Sysoev

More information about the nginx mailing list