Distribute Nodes by vCPU
Cloud service provider relevance: AWS Kubernetes
Spot understands that one of your main concerns in running your applications is high availability (HA). Ocean provides several methods of distributing resources that contribute to HA, significantly reducing the chances of an interruption of service.
Nodes by Count
When scaling up new nodes, Ocean’s default distribution method is to spread the nodes in different availability zones (AZ) by count.
For example, if Ocean can scale up in two AZs and there are five nodes in AZ A and three nodes in AZ B, Ocean launches the next node in AZ B. By balancing the node count across AZs, Ocean distributes the risk of interruption evenly.
Nodes by vCPU
Resource distribution strictly by node count does not always lead to equal distribution of vCPU and can even lead to very large differences in vCPU between AZs. To minimize this risk and add another method of maintaining HA, Ocean lets you choose distribution by vCPU.
In distribution by vCPU, Ocean also considers the number of vCPUs when scaling up. For example, if you have five small nodes in AZ A and three large nodes in AZ B, the next scale-up would be a large node in AZ A. This balances the vCPUs across AZs, even though AZ A already has more nodes by count.
Distribution by vCPU also affects the spread by spot% feature (if configured) that distributes resources across spot and on-demand nodes. Specifically, configuring spread by vCPU has two effects:
-
Ocean decides if the next scale-up will be on spot or on-demand by looking at the current vCPU on each instead of node count.
-
Ocean decides which AZ to choose for scale-up based on the current vCPU in each, and not node count.
Since Ocean can only predict node sizes during scale-up, vCPU distribution is achieved on a best-effort basis.
Set up in Ocean API
To define the cluster orientation for your Ocean cluster, you can use the Create Cluster or Update Cluster APIs.
Configure the following structure as your strategy:
strategy{
"spreadNodesBy": "vcpu"
}
spreadNodesBy can have these values:
- vCPU
- Count
If no option is set, the default behavior is spread by count.
Once you set to spread nodes by vCPU, these Ocean functions will use the method:
- Scale up
- Spot percentage
- Scale per VNG
- Replacement process (out of strategy, auto-healing)