There are times when we have to provision automatic scaling of our NoSQL database due to parameters like the following:
- The cluster's CPU load
- The number of nodes in the cluster
- The distribution of server request latencies for a table
To do this programmatically, we can use either Java or Python sample tools. We will see how to do it using Java sample tool. To use them, use the following procedures:
Java:
- This tool is built on Apache Maven. If it is not installed on your shell, download it from https://maven.apache.org/download.cgi and extract it.
- Run mnv -v in a new shell instance to confirm its installation.
- Now, to build the sample tool, run:
mvn clean compile mvn exec:java -Dexec.mainClass="com.example.bigtable.scaler.MetricScaler" -Dexec.args="<project-id> <bigtable-instance-id>"
The sample tool mentioned...