Hi all,<div><br></div><div>I'm the author of ybc - fast in-process key-value caching library - <a href="https://github.com/valyala/ybc">https://github.com/valyala/ybc</a> . This library has the following features, which may be essential to nginx:</div>
<div>- compact source code written in C;</div><div>- optimized for speed. Avoids using syscalls, dynamic memory allocations and memory copying in hot paths;</div><div>- has no external dependencies;</div><div>- cross-platform design - all platform-specific code is located in one place - <a href="https://github.com/valyala/ybc/tree/master/platform">https://github.com/valyala/ybc/tree/master/platform</a> . Currently only linux is supported, but other platforms can be easily added by implementing the corresponding platform-specific functions;</div>
<div>- designed for efficient caching of millions big objects on both SSDs and HDDs. Easily deals with huge caches exceeding available RAM by multiple orders of magnitude.</div><div>- persists cached objects across application restarts.</div>
<div>- provides functionality similar to proxy_cache_lock and proxy_cache_use_stale from <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html">http://nginx.org/en/docs/http/ngx_http_proxy_module.html</a> out of the box.</div>
<div>- unlike nginx's file-based cache, is free of additional "cache manager" tasks.</div><div>- unlike nginx's file-based cache, never exceeds maximum cache size set at startup.</div><div>- unlike nginx's file-based cache, stores all cached data in two files - one file is used for index, while the other file is used for cached data. These files aren't vulnerable to fragmentation, since their sizes never change after the application start.</div>
<div>Other ybc features can be found at <a href="https://github.com/valyala/ybc/blob/master/README">https://github.com/valyala/ybc/blob/master/README</a> .</div><div><br></div><div>ybc API is located at <a href="https://github.com/valyala/ybc/blob/master/ybc.h">https://github.com/valyala/ybc/blob/master/ybc.h</a> .</div>
<div><br></div><div>It would be great if somebody familiar with nginx internals, who is interested in faster and cleaner caching backend for nginx could help me substituting file-based backend with ybc.</div><div><br></div>
<div>-- </div><div>Best Regards,<br><br>Aliaksandr
</div>