Aerospike Operations

Available Operations

Scale

What does it do

It enables users to modify the capacity of the cluster by changing the number of instances that are part of the cluster. It uses AWS ASG to balance instances across AZs. It ensures idempotency to identify duplicate requests.

When to use

This operation can be run only when the cluster is in running state or when an existing operation is success.

Limitations

  • Vertical scaling is not supported.

  • Scale operation cannot be stopped.

Prerequisites

  • Cluster must be created by or migrated to Odin and Optimus.

  • Cluster must be in a running state.

  • User must have the necessary permissions to perform the operation.

How to use ?

Insert the desired instance count for the cluster in num_instances

Options

Option
Type
Description
Example

desiredInstanceCount

integer

The number of EC2 instances needed in the cluster

--options=‘{"desiredInstanceCount": 9}’

scalingStrategy

string

The scaling should happen in parallel or sequentially,

--options=‘{"scalingStrategy": 9}’

Note :

  • The scalingStrategy differs in wither waiting for migrations to be validated ( sequential ) or not (parallel).

  • scalingStrategy is only available in scale up operations.

Command

odin operate component --name [YOUR_COMPONENT_NAME] --service [YOUR_SERVICE_NAME] --operation scale --options=‘{“desiredInstanceCount”: [YOUR_DESIRED_INSTANCE_COUNT], "scalingStrategy": YOUR_DESIRED_SCALING_STRATEGY }’ --env [YOUR_ENV_NAME]

Example

odin operate component --name optimus-aerospike --service optimus-backend --operation scale --options=‘{"num_instances": 9, "scalingStrategy": "concurrent"}’ --env dev1

The above command scales a cluster to 9 instances.

Restart

What does it do

It restarts the provided list of IPs else performs a rolling restart on all nodes of the cluster.

When to use

This operation can be run only when the cluster is in running state or when an existing operation is success.

Prerequisites

  • Cluster must be created by or migrated to Odin and Optimus.

  • Cluster must be in a running state.

  • User must have the necessary permissions to perform the operation.

How to use ?

Insert the desired instance count for the cluster in num_instances

Options

Option
Type
Description
Example

nodes

list

The list of ips to restart in the cluster

--options=‘{"nodes":["10.10.121.221"]}’

Command

odin operate component --name [YOUR_COMPONENT_NAME] --service [YOUR_SERVICE_NAME] --operation restart --options=‘{"nodes": [YOUR_DESIRED_IPS]}’ --env [YOUR_ENV_NAME]

Example

odin operate component --name optimus-aerospike --service optimus-backend --operation restart --options=‘{"nodes": ["10.10.121.221"]}’ --env dev1

Replace

What does it do

It replaces the ips provided by user with new hardware and sets them up as a part of the cluster.

When to use

This operation can be run only when the cluster is in running state or when an existing operation is success. This is mostly relevant in case where hardware failures occur.

Prerequisites

  • Cluster must be created by or migrated to Odin and Optimus.

  • Cluster must be in a running state.

  • User must have the necessary permissions to perform the operation.

How to use ?

Insert the desired instance count for the cluster in nodes

Options

Option
Type
Description
Example

nodes

list

The list of ips to replace in the cluster

--options=‘{"nodes":["10.10.121.221"]}’

Synopsis

odin operate component --name [YOUR_COMPONENT_NAME] --service [YOUR_SERVICE_NAME] --operation replace --options=‘{“nodes”: [YOUR_DESIRED_IPS]}’ --env [YOUR_ENV_NAME]

Example

odin operate component --name optimus-aerospike --service optimus-backend --operation replace --options=‘{“num_instances”: 9}’ --env dev1

The above command scales a cluster to 9 instances.

Config Update

What does it do

This operation enables users to change configuration of a cluster after its creation.

When to use

This operation can be run only when the cluster is in running state or when an existing operation is success.

Prerequisites

  • Cluster must be created by or migrated to Odin and Optimus.

  • Cluster must be in a running state.

  • User must have the necessary permissions to perform the operation.

How to use ?

Insert the desired parameter for the cluster with the relevant value.

Options

Option
Type
Description
Example

logging

boolean

Enable log-central logging.

--options=‘{"logging":true}’

namespaces

object

This specifies which namespace configurations to update

--options=‘{"namespaces":{}}’

protoFdMax

integer

This specifies maximum number of open file descriptors opened on behalf of client connections

--options=‘{"namespaces":10000}’

xdr

object

This specifies which XDR configurations to update

--options=‘{"xdr":{}}’

namespaces options -

Option
Type
Description
Example

name

string

The name to use for the namespace.

--options

'{ "namespaces":{"name": "test-001"}}'

storageEngine

string

The storage device to use.

--options

'{ "namespaces":{"storageEngine": "memory" }}'

memorySize

integer

The memory to be used for the given namespace. Calculated dynamically for each namespace, based on instance type, if memory-size is not explicitly provided.

--options

'{ "namespaces":{"memorySize": 100 }}'

highWaterMemoryPercent

integer

The data will be evicted if the memory utilization is greater than this specified percentage.

--options

'{"namespaces":{"highWaterMemoryPercent": 95 }}'

highWaterDiskPercent

integer

The data is evicted if the disk utilization is greater than this specified percentage

--options

'{"namespaces":{"highWaterDiskPercent": 95 }}'

stopWritesPercent

integer

This disallows writes when memory utilization (tracked under memory_used_bytes) is above this specified percentage

--options

'{"namespaces":{"stopWritesPercent": 90 }}'

nsupPeriod

string

The interval at which the main expiration/eviction thread (called NSUP, the namespace supervisor) wakes up to process the namespace

--options

'{"namespaces":{"nsupPeriod": true }}'

nsupHistPeriod

string

The interval at which the main expiration/eviction thread (called NSUP, the namespace supervisor) wakes up to process the namespace

--options

'{"namespaces":{"nsupHistPeriod": true }}'

partitionTreeSprigs

integer

Number of tree sprigs per partition to use

--options

'{"namespaces":{"partitionTreeSprigs": 256 }}'

Synopsis

odin operate component --name [YOUR_COMPONENT_NAME] --service [YOUR_SERVICE_NAME] --operation config-update --options=‘{"namespaces":{“memorySize”: [YOUR_DESIRED_MEMORY_SIZE]}’ --env [YOUR_ENV_NAME]

Example

odin operate component --name optimus-aerospike --service optimus-backend --operation config-update --options=‘{"namespaces":{"numPartitions": 9}}’ --env dev1

Whom to reach out to ?

Post in Slack channel #dss_odin_feedback

Last updated