RedisLabs/redisraft
소개
여러 Redis 인스턴스로 일관성 있는 Raft 클러스터를 구성할 수 있게 해주는 Redis 모듈입니다.
개발 도구What you can do
- 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
측정된 스타 증가
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- +1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalRedisRaft
:warning: 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).
관련 프로젝트 살펴보기
불러오는 중…