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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70243abb12bed704b1dd0e55aaa67316ed0c24e849f260581113cf5ca98461ec |
|
MD5 | f6b6ca3ecf6368342b674cc1bf9bc04c |
|
BLAKE2b-256 | 553a8e83c25900f8f53c719ee337f52283a70f5811d0ce1f6f5772ef32a607f1 |
Hashes for py_citus_rebalancer-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1ca92e0b7e3e134ad591c95b1ef039b65a0c3d1730cef8740e4abe344e851fe |
|
MD5 | 1d6d1984c8b7dc1a95a25e92c3f713eb |
|
BLAKE2b-256 | d86d1315b0465e8c38e6ee1af628658b24852a3a247c80006540064808789dde |