All Projects → danielealbano → cachegrand

danielealbano / cachegrand

Licence: BSD-3-Clause license
cachegrand is an open-source fast, scalable and secure Key-Value store, also fully compatible with Redis protocol, designed from the ground up to take advantage of modern hardware vertical scalability, able to provide better performance and a larger cache at lower cost, without losing focus on distributed systems.

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
tcl
693 projects
CMake
9771 projects
shell
77523 projects

Projects that are alternatives of or similar to cachegrand

Olric
Distributed cache and in-memory key/value data store. It can be used both as an embedded Go library and as a language-independent service.
Stars: ✭ 2,067 (+2275.86%)
Mutual labels:  caching, key-value, distributed, key-value-store
Hazelcast
Open-source distributed computation and storage platform
Stars: ✭ 4,662 (+5258.62%)
Mutual labels:  caching, distributed, low-latency
Nuster
A high performance HTTP proxy cache server and RESTful NoSQL cache server based on HAProxy
Stars: ✭ 1,825 (+1997.7%)
Mutual labels:  caching, key-value, high-performance
LruClockCache
A low-latency LRU approximation cache in C++ using CLOCK second-chance algorithm. Multi level cache too. Up to 2.5 billion lookups per second.
Stars: ✭ 35 (-59.77%)
Mutual labels:  caching, high-performance, low-latency
Infinit
The Infinit policy-based software-defined storage platform.
Stars: ✭ 363 (+317.24%)
Mutual labels:  key-value, s3, distributed
dxram
A distributed in-memory key-value storage for billions of small objects.
Stars: ✭ 25 (-71.26%)
Mutual labels:  distributed, low-latency, key-value-store
Hazelcast Python Client
Hazelcast IMDG Python Client
Stars: ✭ 92 (+5.75%)
Mutual labels:  caching, distributed
Cash
HTTP response caching for Koa. Supports Redis, in-memory store, and more!
Stars: ✭ 122 (+40.23%)
Mutual labels:  caching, s3
stash
Key-value store abstraction with plain and cache driven semantics and a pluggable backend architecture.
Stars: ✭ 71 (-18.39%)
Mutual labels:  caching, key-value
Stl.fusion
Get real-time UI updates in Blazor apps and 10-1000x faster API responses with a novel approach to distributed reactive computing. Fusion brings computed observables and automatic dependency tracking from Knockout.js/MobX/Vue to the next level by enabling a single dependency graph span multiple servers and clients, including Blazor apps running in browser.
Stars: ✭ 858 (+886.21%)
Mutual labels:  caching, high-performance
Hazelcast Go Client
Hazelcast IMDG Go Client
Stars: ✭ 140 (+60.92%)
Mutual labels:  caching, distributed
Haproxy
HAProxy Load Balancer's development branch (mirror of git.haproxy.org)
Stars: ✭ 2,463 (+2731.03%)
Mutual labels:  caching, high-performance
Hazelcast Cpp Client
Hazelcast IMDG C++ Client
Stars: ✭ 67 (-22.99%)
Mutual labels:  caching, distributed
Cucache
Fast PUT/GET/DELETE in-memory key-value store for lookaside caching
Stars: ✭ 63 (-27.59%)
Mutual labels:  caching, key-value
Hazelcast Nodejs Client
Hazelcast IMDG Node.js Client
Stars: ✭ 124 (+42.53%)
Mutual labels:  caching, distributed
Synchrotron
Caching layer load balancer.
Stars: ✭ 42 (-51.72%)
Mutual labels:  caching, memcache
intelli-swift-core
Distributed, Column-oriented storage, Realtime analysis, High performance Database
Stars: ✭ 17 (-80.46%)
Mutual labels:  high-performance, distributed
keyv
Simple key-value storage with support for multiple backends.
Stars: ✭ 202 (+132.18%)
Mutual labels:  caching, key-value
centminmod-magento2
Magento 2.2.2 Install Guide For Centmin Mod Nginx LEMP Stacks
Stars: ✭ 16 (-81.61%)
Mutual labels:  redis-server, redis-cache
Nebulex
In-memory and distributed caching toolkit for Elixir.
Stars: ✭ 662 (+660.92%)
Mutual labels:  caching, distributed

Build & Test codecov LGTM Grade Lines of code COCOMO

cachegrand

cachegrand is an open-source fast, scalable and modular Key-Value store designed from the ground up to take advantage of modern hardware, able to provide better performance when compared to similar projects but also capable to provide a great flexibility in terms of management and developer experience.

Although it's pretty young, it's able to perform 40X faster than Redis while handling 64X more load.

The benchmarks below have been carried out on an AMD EPYC 7502P with 2 x 25Gbit network links using Ubuntu 22.04, with the default configuration (no network optimizations) and using memtier_benchmark with 10M different keys, 64 bytes of payload, and with 100 clients per thread (1 thread 100 clients, 64 threads 6400 clients) using 2 different machines with the same hardware to generate the load.

cachegrand is able to scale linearly if enough cpu power is left to the operating system to process the network data.

GET Operations/s SET Operations/s

Latencies are great as well, especially taking into account that with 6400 clients over 64 cores the operating system doesn't really have too much room to handle the network traffic.

Latency with 1 threads and 100 clients Latency with 64 threads and 6400 clients

Key features:

  • Modular architecture to support widely used protocols, e.g. Redis, Prometheus, etc.
  • Time-series database for fast data writes and retrieval with primitives built to handle different data types (e.g. small strings, large blobs, jsons, etc.);
  • Hashtable GET Lock-free and Wait-free operations, SET and DELETE use localized spinlocks, the implementation is capable to digest 2.1 billion records per second on a 1x AMD EPYC 7502 (see benches);
  • An ad-hoc SLAB Allocator (memory allocator) capable of allocating and free memory in O(1);
  • Linear vertical scalability when using the in-memory database, 2x cpus means 2x requests (see benches);

Planned Key Features:

  • More modules for additional platforms compatibility, e.g. Memcache, AWS S3, etc., or to add support for monitoring, e.g. DataDog,
  • etc.;
  • Ad ad-hoc network stack based on DPDK / Linux XDP (eXpress Data Path) and the FreeBSD network stack;
  • Built for flash memories to be able to efficiently saturate the available IOPS in modern DC NVMEs and SSDs;
  • WebAssembly to provide AOT-compiled User Defined Functions, event hooks, implement modules, you can use your preferred language to perform operations server side;
  • Replication groups and replica tags, tag data client side or use server side events to tag the data and determine how they will be replicated;
  • Active-Active last-write-wins data replication, it's a cache, write to any node of a replication group to which the replication tags are assigned, no need to think worry it;

It's possible to find more information in the docs' folder.

The platform is written in C, validated via unit tests, Valgrind and integration tests, it's also built with a set of compiler options to fortify the builds (#85).

Currently, it runs only on Linux, on Intel or AMD cpus and requires a kernel v5.7 or newer, will be ported to other platforms once will become more feature complete.

Please be aware that

cachegrand is not production ready and not feature complete, plenty of basic functionalities are being implemented, the documentation is lacking as well as it's being re-written, please don't open issues for missing documentation.

The status of the project is tracked via GitHub using the project management board.

Issues & contributions

Please if you find any bug, malfunction or regression feel free to open an issue or to fork the repository and submit your PRs! If you do open an Issue for a crash, if possible please enable sentry.io in the configuration file and try to reproduce the crash, a minidump will be automatically uploaded on sentry.io. Also, if you have built cachegrand from the source, please attach the compiled binary to the issue as well as sentry.io knows nothing of your own compiled binaries.

Performances

The platform is regularly benchmarked as part of the development process to ensure that no regressions slip through, it's possible to find more details in the documentation.

How to install

Distro packages

Packages are currently not available, they are planned to be created for the v0.3 milestone.

Build from source

Instructions on how to build cachegrand from the sources are available in the documentation

Configuration

cachegrand comes with a default configuration but for production use please review the documentation to ensure an optimal deployment.

Running cachegrand

cachegrand doesn't need to run as root but please review the configuration section to ensure that enough lockable memory has been allowed, enough files can be opened and that the slab allocator has been enabled and enough huge pages have been provided

Before trying to start cachegrand, take a look to the performance tips available in the docs' section as they might provide a valuable help!

Help

$ ./cachegrand-server --help
Usage: cachegrand-server [OPTION...]

  -c, --config-file=FILE     Config file (default config file
                             /usr/local/etc/cachegrand/cachegrand.conf )
  -l, --log-level=LOG LEVEL  log level (error, warning, info, verbose, debug)
  -?, --help                 Give this help list
      --usage                Give a short usage message

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

Start it locally

/path/to/cachegrand-server -c /path/to/cachegrand.yaml
[2022-06-05T10:26:08Z][INFO       ][program] cachegrand-server version v0.1.0 (built on 2022-07-05T10:26:07Z)
[2022-06-05T10:26:08Z][INFO       ][program] > Release build, compiled using GCC v10.3.0
[2022-06-05T10:26:08Z][INFO       ][program] > Hashing algorithm in use t1ha2
[2022-06-05T10:26:08Z][INFO       ][config] Loading the configuration from ../../etc/cachegrand.yaml
[2022-06-05T10:26:08Z][INFO       ][program] Ready to accept connections

Docker

Download the example config file

curl https://raw.githubusercontent.com/danielealbano/cachegrand/main/etc/cachegrand.yaml.skel -o /path/to/cachegrand.yaml

Edit it with your preferred editor and then start cachegrand using the following command

docker run \
  -v /path/to/cachegrand.yaml:/etc/cachegrand/cachegrand.yaml \
  --ulimit memlock=-1:-1 \
  --ulimit nofile=262144:262144 \
  -p 6379:6379 \
  cachegrand/cachegrand-server:latest
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].