Skip to main content

Redis Cluster Management Tool

Project description

# redis-clu
Redis Cluster Management Tool

Create/Manage sharded+replicated redis cluster easily.

# Installation

```bash
pip install redis-clu
```

# Usage

##### Create cluster

```bash
# Sharded cluster (master-master)
redis-clu create localhost:6376 localhost:6377 localhost:6378
```


##### Show status

```bash
redis-clu status localhost:6376
```


##### Add masters

```bash
# single node:
redis-clu add localhost:6379
(optional: --keyMigrationCount <count> ) pipelined command, default 1

# multiple nodes:
# recommended for dynamic scaling, it will be split cluster into subclusters
# and each subcluster will be resharding simultaneously
# <cluster> <masters>
redis-clu add_multi localhost:6376 localhost:6381 localhost:6382
(optional: --keyMigrationCount <count> ) pipelined command, default 1
```


##### Add slaves

```bash
# master-slave replication
# To make redis cluster high available, all master should have at least one slave.
# <master> <slave>
redis-clu replicate localhost:6376 localhost:6385
```


##### Fix cluster

```bash
redis-clu fix localhost:6376
# If occurs "Slot <slot> is already busy" execute with "--force 1"
redis-clu fix localhost:6376 --force 1
```


##### Reshard cluster (Slot balancing)

```bash
redis-clu reshard localhost:6376
(optional: --keyMigrationCount <count> ) pipelined command, default 1
```


##### Remove node

```bash
# <cluster> <node(master or slave)>
redis-clu remove localhost:6376 localhost:6380
(optional: --keyMigrationCount <count> ) pipelined command, default 1
```


##### Flush/Destroy cluster

```bash
# flush cluster (initialize with 0 keys):
redis-clu reset localhost:6376

# destroy cluster:
redis-clu reset localhost:6376 --hard 1
```


# Monitoring

Also you can make your own basic monitoring screen using 'watch'.

brew install watch (For Mac OSx)
redis-clu status <cluster_node>
watch -d -n 1 'redis-clu status localhost:6376'

Monitoring will help you to make an action.

![ScreenShot](https://raw.github.com/baranbartu/redis-clu/master/screenshot.png)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

redis-clu-0.0.7.tar.gz (11.0 kB view details)

Uploaded Source

File details

Details for the file redis-clu-0.0.7.tar.gz.

File metadata

  • Download URL: redis-clu-0.0.7.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for redis-clu-0.0.7.tar.gz
Algorithm Hash digest
SHA256 ba6316adcdc2224f9694c935b853a6f59305c9c5c36c6359d032e06d6c00328a
MD5 b975267398a485fa5c3faf0436b86350
BLAKE2b-256 8392ff9eaf2cee8883ce352ad00450ad4aaa45d40b57995f67920a2bc170ce91

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page