Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RdsConfigProvider dedup #8268

Closed
wants to merge 3 commits into from
Closed

RdsConfigProvider dedup #8268

wants to merge 3 commits into from

Conversation

lambdai
Copy link
Contributor

@lambdai lambdai commented Sep 17, 2019

WIP still fixing tests

Description:
If N http conn managers refers the same rds config name, currently envoy

  • create only one subscription (good!)
  • create N rds config provider at main thread (hmm...)
  • thundering herd when rds is update, since all N rds configs need updating

Risk Level:
Testing:
Docs Changes:
Release Notes:
[Optional Fixes #Issue]
[Optional Deprecated:]

init_manager.add(subscription->init_target_);
route_config_subscriptions_.insert({manager_identifier, subscription});
std::shared_ptr<RdsRouteConfigProviderImpl> provider{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless you break up FactoryContext (it is tied to Listener), I don't think this deduplication works, it will cause #3953 again which is why the provider was 1:1 to the HCM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see... Are you aware of what particular thing in the factory context is needed by RdsRouteConfig?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, though in general I think it will be helpful to break FactoryContext into smaller pieces by the lifecycle.

@lambdai
Copy link
Contributor Author

lambdai commented Sep 17, 2019

@stevenzzzz Not exactly the same solution we were discussing but underneath is the same: no duplicated provider

@lambdai
Copy link
Contributor Author

lambdai commented Sep 17, 2019

/assign @stevenzzzz

@lambdai
Copy link
Contributor Author

lambdai commented Sep 17, 2019

I am aware of InitManager, which is kind of broken already (Need confirmation, use xds channel on slack)

@lambdai
Copy link
Contributor Author

lambdai commented Sep 17, 2019

@lizan ads integration test is failing at the exact test case which was failing.. Thank you for surfacing it!

Factory context is referred 40ish time in RouterConfig. Could be more since the indirect reference is not counted.

Yet most of them are referring to server scoped resources, which has wider scope time than listener
It will take much more time to determine if provider is relying on listener-internal-context.

Hopefully we could save the server scope resources in provider.
Otherwise we can only dedup the providers belong to the same listener.

Any other traps I didn't mention? @lizan

@lambdai
Copy link
Contributor Author

lambdai commented Sep 17, 2019

@stevenzzzz It's not as easy as we thought :)

@lambdai
Copy link
Contributor Author

lambdai commented Sep 19, 2019

close for now: wip

@lambdai lambdai closed this Sep 19, 2019
@stevenzzzz
Copy link
Contributor

I've talked with Harvey, we may need to do quite a bit shoveling, including some API interface change, to make the RDS provider/subscription Listener independent.
But I think it's desired.
filed issue #8303, let's continue the discussion there.

@lambdai lambdai mentioned this pull request Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants