https://github.com/bruno-garcia/redisreplicationtester
Tests Redis replication
https://github.com/bruno-garcia/redisreplicationtester
redis redis-pubsub redis-replication
Last synced: about 1 month ago
JSON representation
Tests Redis replication
- Host: GitHub
- URL: https://github.com/bruno-garcia/redisreplicationtester
- Owner: bruno-garcia
- Created: 2017-10-26T19:03:50.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-28T11:15:24.000Z (over 8 years ago)
- Last Synced: 2025-03-07T00:53:36.312Z (about 1 year ago)
- Topics: redis, redis-pubsub, redis-replication
- Language: C#
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Redis replication tester
Different tests on a redis replication with 1 master and N slaves.
## Redis replication offset
Connects to all nodes and ensures all are at the same replication id/offset.
Assumes all nodes use the same AUTH password.
### Example call:
```{r, engine='bash', sample}
$ dotnet run -- offset -f targets.json -a foobared
info: RedisReplicationTester.TestReplication[0]
Testing Redis replication using hosts from file: targets.json
info: RedisReplicationTester.TestReplication[0]
Connecting to master: Hostname: localhost, Port: 6379
info: RedisReplicationTester.TestReplication[0]
Master Hostname: localhost, Port: 6379 has 2 slaves attached.
info: RedisReplicationTester.TestReplication[0]
Connecting to 2 slave Redis servers...
info: RedisReplicationTester.TestReplication[0]
Slave Hostname: localhost, Port: 6381 is up to date with master
info: RedisReplicationTester.TestReplication[0]
Slave Hostname: localhost, Port: 6380 is up to date with master
```
## Test Pub/Sub
Connects to multiple nodes, publishes a message on Master and verifies the latency to the slaves.
This is useful to test the latency of nodes in different data centers and countries.
### Example call:
```{r, engine='bash', sample}
$ dotnet run -- pubsub -f targets.json -a foobared -t 5
info: RedisReplicationTester.PubSubTester[0]
Testing Redis pub/sub using hosts from file: targets.json
info: RedisReplicationTester.PubSubTester[0]
Connecting to 3 Redis servers...
info: RedisReplicationTester.PubSubTester[0]
Publishing message on master.
info: RedisReplicationTester.PubSubTester[0]
00:00:00.0135370 - Message received by Hostname: localhost, Port: 6381.
info: RedisReplicationTester.PubSubTester[0]
00:00:00.0128850 - Message received by Hostname: localhost, Port: 6380.
```