{"id":20632458,"url":"https://github.com/citusdata/python-citus-rebalancer","last_synced_at":"2025-04-15T18:59:14.375Z","repository":{"id":62579285,"uuid":"222430420","full_name":"citusdata/python-citus-rebalancer","owner":"citusdata","description":"A python command line tool to recommend shard moves to customers with unbalanced clusters","archived":false,"fork":false,"pushed_at":"2019-11-25T16:44:31.000Z","size":69,"stargazers_count":9,"open_issues_count":0,"forks_count":4,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-28T23:51:15.104Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/citusdata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-18T11:13:08.000Z","updated_at":"2023-11-21T06:04:59.000Z","dependencies_parsed_at":"2022-11-03T21:00:54.060Z","dependency_job_id":null,"html_url":"https://github.com/citusdata/python-citus-rebalancer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citusdata%2Fpython-citus-rebalancer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citusdata%2Fpython-citus-rebalancer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citusdata%2Fpython-citus-rebalancer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citusdata%2Fpython-citus-rebalancer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/citusdata","download_url":"https://codeload.github.com/citusdata/python-citus-rebalancer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249135819,"owners_count":21218365,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T14:16:15.970Z","updated_at":"2025-04-15T18:59:14.354Z","avatar_url":"https://github.com/citusdata.png","language":"Python","readme":"# python-citus-rebalancer\nA python command to get recommendations on commands to run to rebalance an unbalaned citus cluster. \n\nSometimes 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.\n\n## Installation\n### Install with pip install\n\n1. Run `pip install py-citus-rebalancer`\n\n### Install from source code\n\n1. Clone the github repository\n2. Run `python setup.py develop`\n\n\n## Running the command\n\nThis command has different options:\n\n- `--host`: is your postgres connection string\n- `--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.\n- `--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\n\n1. Run the command `citus-rebalancer --host=postgres://user:pwd@host:5432/dbname --delta=10`\n2. It will return commands to run, run them  on your coordinator to rebalance the cluster.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitusdata%2Fpython-citus-rebalancer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcitusdata%2Fpython-citus-rebalancer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitusdata%2Fpython-citus-rebalancer/lists"}