Skip to content

jellekralt/redis-cluster-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Redis Cluster Tests

A collection of tests that run on an (emulated) multi-dc Redis cluster setup

The cluster contains 6 Redis instances running with 3 master & 3 slaves, one slave for each master. The cluster is split over two virtual machines to simulate a dual datacenter setup, for testing brutal DC loss, and split-brain.

Tech

  • Vagrant, to boot up and provision the VMs
  • Redis (obviously)
  • Node.js, for running the tests

Setup

How to set up vagrant and start the cluster image.

  1. Install Vagrant
  2. Install VirtualBox
  3. Clone this repo
  4. Provision the virtual machine using Vagrant: vagrant up

You should now have 6 redis servers running locally. They are accessible from the host at:

  • 127.0.0.1:7000
  • 127.0.0.1:7001
  • 127.0.0.1:7002
  • 127.0.0.1:7003
  • 127.0.0.1:7004
  • 127.0.0.1:7005

Internally, the two VM's run in a private network, at:

  • 10.0.0.11:7000
  • 10.0.0.11:7001
  • 10.0.0.11:7002
  • 10.0.0.12:7003
  • 10.0.0.12:7004
  • 10.0.0.12:7005

Running the tests

  1. Access one of the two VMs: vagrant ssh redis1
  2. Go to the tester folder: cd /vagrant/tester
  3. Run the test cases: node main.js

About

A collection of tests that run on an (emulated) multi-dc Redis cluster setup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published