-
Notifications
You must be signed in to change notification settings - Fork 262
Group controller always calling instance plugin with "properties=true" #830
Comments
How about this.. We can create a wrapper instance plugin that implements the |
@chungers Sorry, I don't understand how this will help reduce the load that is incurred by including Are you suggesting that we implement a cache layer for every instance plugin? If so, we need to be careful about how'd we invalidate that cache. For example, a |
Just realized we'd have to invalidate the cached value whenever state changes. This means we'd have to implement the mutation methods like provision and destroy to forward to the delegated real plugin. When the delegate returns successfully, we need to invalidate the cache result and let the next DescribeInstances do the real query. What do you think? |
@chungers Yes, that's what I'm thinking. But we also need to think about filtering. The describe API accepts a |
The group SPI has a
DescribeGroup
:https://github.com/docker/infrakit/blob/master/pkg/spi/group/spi.go#L45
The group controller then called the instance plugin's
DescribeInstances
: https://github.com/docker/infrakit/blob/master/pkg/plugin/group/scaled.go#L142Note that the
DescribeInstances
is hardcoded toproperties=true
. Depending on how the instance plugin is implemented, this can cause a lot of processing. When the group controller does it's normal processing (to determine the group is of the appropriate size) these additional attributes are not even used. Therefore, most of the group <-> instance communications is asking for additional properties that are never used.Note that when the enrollment and ingress controllers retrieve the group members, we do need the additional properties.
Can we somehow update the SPI to expose
properties
boolean? This would reduce the processing done in the instance plugin.Note, for the terraform provider, every
DescribeInstances
API withproperties=true
results in aCommand.Exec
toterraform show
; my investigations show that this does not scale. Our deployment has 3 groups, 1 enrollment controller, and 1 ingress controller (managing 3 L4 load balancers) -- this results in dozens ofDescribeInstances
invocations per minute. FWIW, I'm working on caching the instances to help mitigate this issue; however, IMO, the SPI should expose theproperties
boolean.Thoughts on what should be done to the SPI?
The text was updated successfully, but these errors were encountered: