This came up earlier in chat with @sean-. It's a feature request for supporting locality hints/affinity rules when placing Triton containers/VMs. This feature helps establish isolation or affinity of containers across a DC which is critical for implementing HA.
The following JSON snippet defines the existing contract through CloudAPI...
Typically, Triton will allocate the new instance somewhere reasonable within the cloud. You may want this instance to be placed on the same server as another instance you have, or have it placed on an entirely different server from your existing instances so that you can spread them out. In either case, you can provide locality hints (aka 'affinity' criteria) to CloudAPI.
UUIDs provided should be the ids of instances belonging to you. If there is only a single UUID entry in an array, you can omit the array and provide the UUID string directly as the value to a near/far key.
strict defaults to false, meaning that Triton will attempt to meet all the near and/or far criteria but will still provision the instance when no server fits all the requirements. If strict is set to true, the creation of the new instance will fail if the affinity criteria cannot be met.
This came up earlier in chat with @sean-. It's a feature request for supporting locality hints/affinity rules when placing Triton containers/VMs. This feature helps establish isolation or affinity of containers across a DC which is critical for implementing HA.
The following JSON snippet defines the existing contract through CloudAPI...
From the docs...
We're looking for an API like...
EDIT: Changed new API from
near
, toclose_to
./cc @jen20 @misterbisson