Stateful Compute Groups

Stateful ComputeGroups

Stateful property of ComputeGroups can be enabled if you are running stateful workloads on ComputeGroups. For a stateful ComputeGroup, Lightwing will periodically take snapshots of the root volume of the instance. When instances are recovered from spot interruption, they will be launched on the last known snapshot.

This enables users to run stateful workloads on Spot instances without worrying about data loss.

Create a stateful ComputeGroup

To create a stateful ComputeGroup, check the Stateful checkbox in the Configuration and storage section.

Stateful computegroups

Note: A stateful ComputeGroup can’t be changed to a stateless one. You will have to create a new ComputeGroup to make it stateless

When one of the instances in the group gets interrupted, ComputeGroups takes the following steps.

  1. Deregister the instance from the cluster it belongs
  2. Take one final snapshot
  3. Instance will be taken down
  4. A replacement spot instance is obtained and uses the last known snapshot
  5. Instance starts and joins back the cluster

Use cases

Stateful ComputeGroups are good for running a variety of clusters. Few examples includes:

  1. Elastic search cluster
  2. Kafka
  3. Jenkins slave machines