项目作者: bruno-garcia

项目描述 :
Tests Redis replication
高级语言: C#
项目地址: git://github.com/bruno-garcia/RedisReplicationTester.git
创建时间: 2017-10-26T19:03:50Z
项目社区:https://github.com/bruno-garcia/RedisReplicationTester

开源协议:

下载


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

  1. ## Test Pub/Sub
  2. Connects to multiple nodes, publishes a message on Master and verifies the latency to the slaves.
  3. This is useful to test the latency of nodes in different data centers and countries.
  4. ### Example call:
  5. ```{r, engine='bash', sample}
  6. $ dotnet run -- pubsub -f targets.json -a foobared -t 5
  7. info: RedisReplicationTester.PubSubTester[0]
  8. Testing Redis pub/sub using hosts from file: targets.json
  9. info: RedisReplicationTester.PubSubTester[0]
  10. Connecting to 3 Redis servers...
  11. info: RedisReplicationTester.PubSubTester[0]
  12. Publishing message on master.
  13. info: RedisReplicationTester.PubSubTester[0]
  14. 00:00:00.0135370 - Message received by Hostname: localhost, Port: 6381.
  15. info: RedisReplicationTester.PubSubTester[0]
  16. 00:00:00.0128850 - Message received by Hostname: localhost, Port: 6380.