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
Run pip install py-citus-rebalancer
### Install from source code
Clone the github repository
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
Run the command citus-rebalancer –host=postgres://user:pwd@host:5432/dbname –delta=10
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
Built Distribution
Hashes for py-citus-rebalancer-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9049cbfcce5dc8018990959faf24e0d72d1ee23874a83b9a34acbecbd961045f |
|
MD5 | 78cf06d36e924e6c7e15392eace96d0f |
|
BLAKE2b-256 | b6b00abbb68eb08d6add5306c65fe9b1ff31200d171388ce196a7251ca9bdf6d |
Hashes for py_citus_rebalancer-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cd841f8aa14841feb8ab22ff5e7f24d13b5f6d5532e797f137c668cb08fa983 |
|
MD5 | bad9cafa5ef1f2313e4d4a2c7704720a |
|
BLAKE2b-256 | 8c014767b0d1ba4526c3f998c898ae6463402a64a5bf1b4228bbe18b48c95785 |