• Stars
    star
    815
  • Rank 55,594 (Top 2 %)
  • Language
    C
  • License
    Other
  • Created over 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Redis Module that make it possible to create a consistent Raft cluster from multiple Redis instances.

RedisRaft

⚠️ RedisRaft is still being developed and is not yet ready for any real production use. Please do not use it for any mission critical purpose at this time.

Strongly-Consistent Redis Deployments

RedisRaft is a Redis module that implements the Raft Consensus Algorithm, making it possible to create strongly-consistent clusters of Redis servers.

The Raft algorithm is provided by a standalone Raft library. This is a fork of the original library created by Willem-Hendrik Thiart, which is now actively maintained by Redis Ltd.

Main Features

  • Strong consistency (in the language of CAP, this system prioritizes consistency and partition-tolerance).
  • Support for most Redis data types and commands
  • Dynamic cluster configuration (adding / removing nodes)
  • Snapshots for log compaction
  • Configurable quorum or fast reads

Getting Started

Building

To compile the module, you will need:

  • Build essentials (a compiler, GNU make, etc.)
  • CMake
  • GNU autotools (autoconf, automake, libtool).

To build:

git clone https://github.com/RedisLabs/redisraft.git
cd redisraft
mkdir build && cd build
cmake ..
make

redisraft.so will be created under the project directory.

Creating a RedisRaft Cluster

RedisRaft requires Redis build from the 'unstable' branch. Build Redis first:

git clone https://github.com/redis/redis  
cd redis
make 
make install

To create a three-node cluster, start the first node:

redis-server \
    --port 5001 --dbfilename raft1.rdb \
    --loadmodule <path-to>/redisraft.so \
    --raft.log-filename raftlog1.db \
    --raft.addr localhost:5001

Then initialize the cluster:

redis-cli -p 5001 raft.cluster init

Now start the second node, and run the RAFT.CLUSTER JOIN command to join it to the existing cluster:

redis-server \
    --port 5002 --dbfilename raft2.rdb \
    --loadmodule <path-to>/redisraft.so \
    --raft.log-filename raftlog2.db \
    --raft.addr localhost:5002

redis-cli -p 5002 RAFT.CLUSTER JOIN localhost:5001

Now add the third node in the same way:

redis-server \
    --port 5003 --dbfilename raft3.rdb \
    --loadmodule <path-to>/redisraft.so \
    --raft.log-filename raftlog3.db 
    --raft.addr localhost:5003

redis-cli -p 5003 RAFT.CLUSTER JOIN localhost:5001

To query the cluster state, run the INFO raft command:

redis-cli -p 5001 INFO raft

Now you can start using this RedisRaft cluster. All supported Redis commands will be executed in a strongly-consistent manner using the Raft protocol.

Documentation

Please consult the documentation for more information.

License

RedisRaft is licensed under the Redis Source Available License 2.0 (RSALv2) or the Server Side Public License v1 (SSPLv1).

More Repositories

1

redis-cluster-proxy

A proxy for Redis clusters.
C
994
star
2

spark-redis

A connector for Spark that allows reading and writing to/from Redis cluster
Scala
936
star
3

memtier_benchmark

NoSQL Redis and Memcache traffic generation and benchmarking tool.
C++
883
star
4

redis-enterprise-k8s-docs

Python
152
star
5

geo.lua

A helper library for Redis geospatial indices
Lua
146
star
6

redis-quartz

A Quartz Scheduler JobStore that uses Redis for persistent storage.
Java
138
star
7

redis-lua-debugger

A Redis Lua script for debugging Redis Lua scripts
Lua
88
star
8

raft

C implementation of the Raft Consensus protocol, BSD licensed
C
67
star
9

spark-redis-ml

A spark package for loading Spark ML models to Redis-ML
Scala
63
star
10

redislabs-docs

Source for docs.redis.com (Redis Enterprise, Redis Cloud, RedisInsight, and more).
Python
62
star
11

redis-recommend

Simple Redis Go recommendation engine
Go
60
star
12

redis-migrate

Small utility for interactively migrating a bunch of redis servers to another bunch of redis servers.
Python
58
star
13

sentinel_tunnel

A local proxy server for discovering and to Redis via Sentinel
Go
45
star
14

redis-microservices-for-dummies

Sample application described in Redis Microservices for Dummies
Python
34
star
15

terraform-provider-rediscloud

Terraform Redis Cloud Provider: Deploy, update, and manage Redis Cloud databases as code through HashiCorp Terraform
Go
30
star
16

redis-fs

Distributed in memory filesystem
Python
24
star
17

triemap

C implementation of a compressed trie lookup map
C
21
star
18

bmemcached-cli

memcached command line interface with SASL (binary protocol) support
Python
20
star
19

redis-webcli

A tiny Flask app to provide access to Redis through a web form.
Python
17
star
20

redis-for-dummies

JavaScript
16
star
21

ReSearch

Redis search and indexing in Java
Java
15
star
22

lua-redimension

Redis multi-dimensional query library in Lua
Lua
14
star
23

rediscloud-node-sample

Redis Cloud on Express Sample
HTML
14
star
24

redislabs-helm

Helm charts for Redis Enterprise
Smarty
13
star
25

vault-plugin-database-redis-enterprise

HashiCorp Vault Plugins for Redis Enterprise
Go
13
star
26

rmtest

redis module unit tests with python (deprecated) please see RLTest
Python
12
star
27

redis-watch

home of the open source Redis Watch - a newsletter about Everything and Anything Redis
12
star
28

eredis

Embedded Redis experiment
C
10
star
29

redis-stream

Exposes Redis stream through the command line
C
10
star
30

gkemarketplace

Python
9
star
31

mbdirector

Memtier benchmark front-end
Python
8
star
32

redis-pipeline

Non blocking pipelined python client for redis and redis protocol parser.
Python
6
star
33

luascript

Easy Lua Handling
Java
6
star
34

jedis-ml

Add Redis-ML commands to Jedis
Java
6
star
35

memcache_populator

Python script for populating a memcahed sever from GarantiaData exported CSV files.
Python
6
star
36

pubsub-sub-bench

Redis Pub/Sub Subscriber Workload generator
Go
5
star
37

docker-library-redis

Shell
5
star
38

engineering-blog

Redis Labs Engineering Blog
HTML
5
star
39

gesher

K8s Admission control proxy
Go
5
star
40

rediscloud-openshift-quickstart

A Ruby and Redis-Cloud hosted redis bootstrap for RedHat's OpenShift cloud.
Ruby
5
star
41

redis-java-complex-benchmark

This benchmark stress redis with unionstore command
Java
4
star
42

rmr

POC Redis Module MapReduce operations
C
4
star
43

rediscloud-java-sample

Redis Cloud on Play Sample
HTML
4
star
44

redis-enterprise-azure

Automated Redis Enterprise Pack (a.k.a RP or a.k.a RLEC) test env deployment to Azure
Shell
4
star
45

rediscloud-ruby-sinatra-sample

Redis Cloud on Sinatra Sample
HTML
4
star
46

rgm

C
3
star
47

rediscloud-go-api

Go SDK for Redis Enterprise Cloud Pro
Go
3
star
48

redis-edge-azure-iot

JavaScript
3
star
49

java-high-availability-test

this java program check recovery and also data consistency to redis.
Java
3
star
50

redis_extensions

C
3
star
51

redismodules.com

The repository of redismodules.com
Python
2
star
52

redis-ee-docker

Docker-based Redis Enterprise cluster infrastructure
Shell
2
star
53

crdbmemcalc

CRDB/Redis memory calculator for synthetic datasets
Python
2
star
54

memcachedcloud-node-sample

Memcached Cloud on Express Sample
HTML
2
star
55

memcachedcloud-openshift-quickstart

A Ruby app using Memcahced Cloud Service on Red Hat's OpenShift
Ruby
2
star
56

rmnotify

A library for key and event space Notifications for Redis Modules
C
2
star
57

mkdocs-versions-menu

An MkDocs plugin that generates a versions menu for the mkdocs-material theme.
Python
2
star
58

rmadm

Python
2
star
59

spark-redis-blockstore

Apache spack off heap cache block manager over redis - see https://github.com/RedisLabs/spark-redis
Scala
2
star
60

memcachedcloud-php-sample

Memcached Cloud on PHP Sample
PHP
1
star
61

memcachedcloud-ruby-sinatra-sample

Memcached cloud on Sinatra Sample
HTML
1
star
62

memcachedcloud-django-sample

Memcached Cloud on Django Sample
Python
1
star
63

testing-workshop

Rust
1
star
64

rsctl

Command line control utility for RediSearch on RedisLabs Enterprise Cluster
Python
1
star
65

rediscloud-php-sample

Redis Cloud on PHP Sample
PHP
1
star
66

DockerHub

Docker Hub for Redis Enterprise and OSS Modules
Shell
1
star
67

rediscloud-django-sample

Redis Cloud on Django Sample
Python
1
star
68

pulumi-rediscloud

Redis Cloud Pulumi Resource Provider
Go
1
star