Skip to main content

A python command line tool to provide the commands necessary to run on citus to have a balanced cluster

Project description

# python-citus-rebalancer A python command to get recommendations on commands to run to rebalance an unbalaned citus cluster.

Sometimes when your cluster grows, you can have an uneven size on nodes: for example if one customers ingests more data than other. This simple commands helps you figure out what master_move_shard commands to run on your coordinator.

## Installation ### Install with pip install

  1. Run pip install py-citus-rebalancer

### Install from source code

  1. Clone the github repository

  2. Run python setup.py develop

## Running the command

This command has different options:

  • –host: is your postgres connection string

  • –delta: is the maximum difference you expect between the node size and the idea size. For example if you have 4 nodes and 20GB of data, the idea size would be 5GB per node. The delta that you can give is for example 10% difference. It’s an integer representing the percent.

  • –file: path to the file where you want the command to be written: example /path/to/rebalance.sql. You can then run the file on your coordinator

  1. Run the command citus-rebalancer –host=postgres://user:pwd@host:5432/dbname –delta=10

  2. It will return commands to run, run them on your coordinator to rebalance the cluster.

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

py-citus-rebalancer-1.0.2.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

py_citus_rebalancer-1.0.2-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file py-citus-rebalancer-1.0.2.tar.gz.

File metadata

  • Download URL: py-citus-rebalancer-1.0.2.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.4

File hashes

Hashes for py-citus-rebalancer-1.0.2.tar.gz
Algorithm Hash digest
SHA256 953c2a335222893e79b1e1e4f7b5bb3a999c4c2462d72f9a3012662a5408232d
MD5 2b16a690cc668006a060952818c12b84
BLAKE2b-256 9fdf75e5b74c2d1cde383561b3fecb2dc57917f38778e08ba339810e0ed4e828

See more details on using hashes here.

File details

Details for the file py_citus_rebalancer-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: py_citus_rebalancer-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.4

File hashes

Hashes for py_citus_rebalancer-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4bef50f088daf8400920287f2e09c054768c91bd67a46f8c3f1cbd3d0de85cce
MD5 eb87be6c6bb683672db11d7a8691ead1
BLAKE2b-256 b592601aad97a3da8ea1119984d4668d3f95ed48dff56b17d7eb9bda0d4ddc41

See more details on using hashes here.

Supported by

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