old_mixer_repo
old_mixer_repo copied to clipboard
Mixer should deduplicate instances delivered to adapters
---------- Forwarded message ---------- From: mtail [email protected] Date: Mon, Jul 31, 2017 at 11:21 AM Subject: Deduping Instances To: Istio Integrations [email protected]
We just had this discussion during the Mixer design review regarding deduping of instances.
After thinking about it for a few minutes, I'm now comfortable stating that we should just systematically be doing this, and in fact we should generalize things are bit.
For a given operation, Mixer should collect all instances that are being sent to a particular handler across all active actions, should deduplicate, and should trigger the minimal number of calls possible to the adapter.
Within the context of a single action, we should statically flag duplicate instances as an error, since it is likely a typo on the operator's part. Across instances, we don't flag errors and merely dedup at runtime.
Does anyone have counter-examples where this wouldn't be appropriate?
I'll tackle this as I'm rewriting config resolution under the new adapter scheme.
FYI, we are already doing similar thing during the configuration path where we call handlers to pass them inferred types.
All actions are traversed, eventually forming a tree (Handler -> []Templates -> []InferedTypes). We might be able to steal some logic from there. https://github.com/istio/mixer/blob/master/pkg/config/handler.go#L112
Removing myself from assignee
@ZackButcher we should be able to turn it off/on (either globally or per-adapter). i have some thoughts on possible approaches if you are starting on a design doc.