Welcome! Log In Create A New Profile

Advanced

Re: Proposal: new caching backend for nginx

Maxim Dounin
January 22, 2013 01:18PM
Hello!

On Tue, Jan 22, 2013 at 06:15:08PM +0200, Aliaksandr Valialkin wrote:

> Hi all,
>
> I'm the author of ybc - fast in-process key-value caching library -
> https://github.com/valyala/ybc . This library has the following features,
> which may be essential to nginx:
> - compact source code written in C;
> - optimized for speed. Avoids using syscalls, dynamic memory allocations
> and memory copying in hot paths;
> - has no external dependencies;
> - cross-platform design - all platform-specific code is located in one
> place - https://github.com/valyala/ybc/tree/master/platform . Currently
> only linux is supported, but other platforms can be easily added by
> implementing the corresponding platform-specific functions;

Cross-platform with only linux supported sounds cool. :)

> - 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.
> - persists cached objects across application restarts.
> - provides functionality similar to proxy_cache_lock and
> proxy_cache_use_stale from
> http://nginx.org/en/docs/http/ngx_http_proxy_module.html out of the box.
> - unlike nginx's file-based cache, is free of additional "cache manager"
> tasks.
> - unlike nginx's file-based cache, never exceeds maximum cache size set at
> startup.
> - 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.
> Other ybc features can be found at
> https://github.com/valyala/ybc/blob/master/README .
>
> ybc API is located at https://github.com/valyala/ybc/blob/master/ybc.h .
>
> 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.

I don't think that it will fit as a cache store for nginx. In
particular, with quick look through sources I don't see any
interface to store data with size not known in advance, which
happens often in HTTP world. Additionally, it looks like it
doesn't provide async disk IO support.

--
Maxim Dounin
http://nginx.com/support.html

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

Proposal: new caching backend for nginx

Aliaksandr Valialkin 1538 January 22, 2013 11:16AM

Re: Proposal: new caching backend for nginx

Maxim Dounin 944 January 22, 2013 01:18PM

Re: Proposal: new caching backend for nginx

Brian Akins 897 January 23, 2013 09:44AM

Re: Proposal: new caching backend for nginx

Maxim Dounin 784 January 23, 2013 10:16AM

Re: Proposal: new caching backend for nginx

Igor Sysoev 1137 January 23, 2013 03:02AM

Re: Proposal: new caching backend for nginx

Aliaksandr Valialkin 1026 January 23, 2013 12:28PM

Re: Proposal: new caching backend for nginx

Maxim Dounin 789 January 23, 2013 01:20PM

Re: Proposal: new caching backend for nginx

nginxorg 1510 January 23, 2013 02:34PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 158
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready