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

control-plane: implement CDS and EDS for universal case #218

Merged
merged 1 commit into from
Sep 10, 2019

Conversation

yskopets
Copy link
Contributor

changes:

  • implement CDS and EDS in universal case

@yskopets yskopets changed the title control-plane: implement CDS for universal case control-plane: implement CDS and EDS for universal case Sep 10, 2019
@yskopets yskopets added this to the 0.1 milestone Sep 10, 2019
Copy link
Contributor

@jakubdyszkiewicz jakubdyszkiewicz left a comment

Choose a reason for hiding this comment

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

We can merge and iterate on this

}
for _, dataplane := range dataplanes.Items {
for _, inbound := range dataplane.Spec.Networking.GetInbound() {
service := inbound.Tags[mesh_proto.ServiceTag]
Copy link
Contributor

Choose a reason for hiding this comment

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

We should match also other tags.

return nil, err
}

edsClusterName := fmt.Sprintf("%s:%d", endpoint.DataplaneIP, endpoint.DataplanePort)
Copy link
Contributor

Choose a reason for hiding this comment

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

Cluster name should be service name. Otherwise it will be really hard to read metrics later. It's common to do an aggregation by the service name from all Envoys.

@@ -66,9 +68,16 @@ func DefaultDataplaneSyncTracker(rt core_runtime.Runtime, reconciler SnapshotRec
},
}

outbound, err := xds_topology.GetOutboundTargets(ctx, dataplane, rt.ResourceManager())
Copy link
Contributor

Choose a reason for hiding this comment

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

I see we do it for every dataplane every X seconds. This would be a bottleneck very soon (even with caching on resource store).

What I imagine is that we've got a job (Component=Runnable) that builds Cluster and ClusterLoadAssignment from Dataplanes and expose it to the OutboundProxyGenerator.
It's more efficient in CPU, because we do the matching once (every X second) and then OutboundProxyGenerator can just retrieve this in O(1).
It's more efficient in memory. Every Snapshot will be stored in SnapshotCache. I don't know about Go but when I introduced reusing protos in java-control-plane based control plane, there performance went through the roof
envoyproxy/java-control-plane#98

@yskopets yskopets merged commit e7f3c01 into master Sep 10, 2019
@yskopets yskopets deleted the feature/cds branch September 10, 2019 12:41
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.

None yet

2 participants