jellekralt / redis-cluster-tests

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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


Languages

Language:Ruby 80.0%Language:JavaScript 17.0%Language:Shell 3.0%