-
Notifications
You must be signed in to change notification settings - Fork 332
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
fix(xds): accelerate universal dp XDS generation #11180
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jakubdyszkiewicz Do you know if that order was important? I think it was visible after this fix: #11094
It makes sense, but it does not fully fix the problem. We retrieve DPP for which we generate XDS from the MeshContext to avoid additional queries. MeshContext is cached (by default for 1s). This means that between creation of DPP and running XDS watchdog you need to invalidate the cache to pick up new DPP. This may not be the case very often. |
Yeah, you're right. kuma/pkg/core/resources/manager/cache.go Lines 93 to 117 in e21c751
The default cache expiration is
So, this PR doesn't fix the issue totally. |
Maybe we should set an interval between kuma/pkg/xds/server/callbacks/dataplane_lifecycle.go Lines 130 to 134 in e21c751
Since only the universal DP created in the kuma/pkg/xds/server/callbacks/dataplane_lifecycle.go Lines 70 to 72 in e21c751
So I guess maybe we could sleep |
Yeah, I think sleeping after creating Universal DP for cache expiration time makes sense. Btw. it's important to do this only when we create the resource in lifecycle. On Kube, Dataplane object is created by the controller, not by the callback |
In the XDS callback chain, the dataplane sync tracker callback relies on the dataplane object to generate the xds configurations. However, the dataplane object creation happens in dataplane liftcycle callback which is latter than the sync tracker callback. Consequetenly, just revert these 2 order and create the dataplane object before the sync call. Reference issue: #11135 Signed-off-by: Icarus Wu <[email protected]>
…e the MeshContext syncs the latest data Signed-off-by: Icarus Wu <[email protected]>
c1c1e3c
to
68eb7fa
Compare
In the XDS callback chain, the dataplane sync tracker callback relies on the dataplane object to generate the xds configurations. However, the dataplane object creation happens in dataplane liftcycle callback which is latter than the sync tracker callback. Consequetenly, just revert these 2 order and create the dataplane object before the sync call.
Reference issue: #11135
Checklist prior to review
syscall.Mkfifo
have equivalent implementation on the other OS --ci/
labels to run additional/fewer testsUPGRADE.md
? --