Skip to content

perf(endpoints): only allocate endpoint metadata when populated - #6

Closed
christianscott wants to merge 1 commit into
mainfrom
ep-mem/metadata
Closed

perf(endpoints): only allocate endpoint metadata when populated#6
christianscott wants to merge 1 commit into
mainfrom
ep-mem/metadata

Conversation

@christianscott

Copy link
Copy Markdown

CreateLBEndpoint allocated a Metadata proto and FilterMetadata map for
every endpoint, only to nil them out when Istio auto-mTLS was off or the
pod was not Istio-managed. Since this runs once per endpoint per backend
and endpoint IR dominates control-plane heap at scale, return nil
directly in the no-op cases.

No wire-format change: the metadata was already nil after the empty
check in those cases.

Signed-off-by: Christian Scott christian@modal.com


Stack created with GitHub Stacks CLIGive Feedback 💬

CreateLBEndpoint allocated a Metadata proto and FilterMetadata map for
every endpoint, only to nil them out when Istio auto-mTLS was off or the
pod was not Istio-managed. Since this runs once per endpoint per backend
and endpoint IR dominates control-plane heap at scale, return nil
directly in the no-op cases.

No wire-format change: the metadata was already nil after the empty
check in those cases.

Signed-off-by: Christian Scott <christian@modal.com>
@christianscott

Copy link
Copy Markdown
Author

Reopened against kgateway-dev/kgateway

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.

1 participant