proposal icon indicating copy to clipboard operation
proposal copied to clipboard

Clarify specification of percentage selector in service configs in DNS.

Open markdroth opened this issue 6 years ago • 0 comments

It looks like our current implementations are all doing the wrong thing with the percentage selector: we are actually recomputing the client's random percentage for each choice we evaluate when parsing the service config choices, which means (a) we may not have a consistent value when there are multiple choices with different percentage values and (b) even worse, we will recompute the percentage every time the resolver re-resolves, which means we will wind up switching configs whenever (e.g.) a subchannel becomes disconnected.

I am proposing that the client compute its percentage at resolver startup and retain it for the lifetime of the resolver. This means that if a client starts up and computes a low percentage for itself, it will wind up being an early canary, but I think that's okay.

The alternative would be to have the resolver check whether the service config has changed since the last resolution and recompute the client's percentage only if it has changed. However, this would actually make it harder to understand what's happening when the service owner is canarying changes, because it would be much harder to identify which clients are getting the canary config.

markdroth avatar Jun 25 '19 17:06 markdroth