GithubHelp home page GithubHelp logo

isabella232 / python-citus-rebalancer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from citusdata/python-citus-rebalancer

0.0 0.0 0.0 69 KB

A python command line tool to recommend shard moves to customers with unbalanced clusters

License: MIT License

Python 100.00%

python-citus-rebalancer's Introduction

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.

python-citus-rebalancer's People

Contributors

louisegrandjonc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.