Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The sidecar provides a well defined REST API that should be stable for executing frequent operator actions. We don’t envision replacing all currently accessible JMX commands via this interface but . For “hot config” we can offer something like the following:

  1. PUT /v1/settings: Accepts a JSON object that has keys and values defined as they are in cassandra.yaml. Nested keys have dots in them. This endpoint will update the config option on all or just the local node.
  2. GET /v1/settings: Retrieves the current runtime configuration of the provided node id (or all nodes).
  3. POST /v1/bulkcmd/<cmd>: Accepts a JSON object that contains the parameter for the given cmd. The cmds will run plugins that execute various actions against one or more nodes.
Code Block
# Set a current runtime configuration on a node
$ curl -i -XPUT 'localhost:5000/v1/settings/' -d '{"compaction_throughput_mb_per_sec": 12}' 
HTTP/1.0 200 OK
Content-Type: application/json
{
  "runtime": {
    "compaction_throughput_mb_per_sec": 12
  }
}
# View the current runtime properties of the node
$ curl -i -XGET 'localhost:5000/v1/settings/'                                          
HTTP/1.0 200 OK
Content-Type: application/json
{
  "runtime": {
    "compaction_throughput_mb_per_sec": 12
  }
}
       
# Increase the compaction_throughput using a bulkcmd instead 
$ curl -i -XPOST 'localhost:5000/v1/bulkcmd/setcompactionthroughput' -d '{"rate_in_mb": 12}'
HTTP/1.0 200 OK
{
  "command": "setcompactionthroughput", 
  "failure": [], 
  "params": {
    "rate_in_mb": 12
  }, 
  "success": [
    "127.0.0.1:7000", 
    "127.0.0.3:7000", 
    "127.0.0.3:7000"
  ]
}

...

Scheduled tasks in a sidecar operate some task on a periodic or scheduled basis (e.g. periodic cleanups, compactions, flushes, etc…). We propose pluggable scheduled jobs which allow users to achieve simple yet powerful operations activities that are frequently required in Cassandra. Basically these are cron jobs.

Proposed Scope

  1. GET /v1/scheduled/node: Shows the scheduled tasks that run on the local host by the sidecar. These are determined via configuration of the sidecar in v1.
  2. Cleanup of tables (nodetool cleanup) in Cassandra will be implemented in version 1. This maintenance activity is an important task when your environment is prone to lose nodes and move nodes all the time. Having `cleanup` activity scheduled on a regular basis helps to maintain the fidelity of the database.
Code Block
# View scheduled tasks on a node
curl -i -XGET 'localhost:5000/v1/scheduled/node'   
HTTP/1.0 200 OK
{
  "tasks": {
    "cleanup": {
      "exclude_kfs": "*system*", 
      "cron_schedule": "1 12 * * *"
    }
  }
}

...