ioredis cluster example

JavaScript
var Redis = require('ioredis');

var cluster = new Redis.Cluster([{
  host: '127.0.0.1',
  port: 7000
}, {
  host: '127.0.0.1',
  port: 7001
}, {
  host: '127.0.0.1',
  port: 7002
}]);

console.log(cluster.nodes());

Source

Also in JavaScript: