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

internal/dag: Add support for per-host max connections #6016

Merged

Conversation

relu
Copy link
Contributor

@relu relu commented Dec 14, 2023

Support per-host max connections circuit breaker threshold enabling Envoy to enforce a maximum number of connections for each individual Kubernetes service endpoint using a new service-level annotation: projectcontour.io/per-host-max-connections.

Resolves #6015

@relu relu requested a review from a team as a code owner December 14, 2023 20:19
@relu relu requested review from tsaarni and stevesloka and removed request for a team December 14, 2023 20:19
@sunjayBhatia sunjayBhatia requested review from a team, davinci26 and clayton-gonsalves and removed request for a team December 14, 2023 20:19
Copy link

codecov bot commented Dec 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4d48db7) 78.68% compared to head (6d517e5) 78.69%.
Report is 16 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #6016   +/-   ##
=======================================
  Coverage   78.68%   78.69%           
=======================================
  Files         138      138           
  Lines       19675    19681    +6     
=======================================
+ Hits        15481    15487    +6     
  Misses       3890     3890           
  Partials      304      304           
Files Coverage Δ
internal/annotation/annotations.go 100.00% <100.00%> (ø)
internal/dag/accessors.go 87.39% <100.00%> (+0.05%) ⬆️
internal/dag/dag.go 98.70% <ø> (ø)
internal/envoy/v3/cluster.go 96.36% <100.00%> (+0.04%) ⬆️

Support per-host max connections circuit breaker threshold enabling Envoy to
enforce a maximum number of connections for each individual Kubernetes service
endpoint using a new service-level annotation: `projectcontour.io/per-host-max-connections`.

Resolves projectcontour#6015

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
@relu relu force-pushed the circuit-breakers-per-host-thresholds branch from d13985a to cf85ee0 Compare December 14, 2023 20:59
@davinci26
Copy link
Contributor

Envoy docs are a bit confusing to me, does host refer to cluster endpoint in this case?

@davinci26 davinci26 added the release-note/small A small change that needs one line of explanation in the release notes. label Dec 15, 2023
Copy link
Contributor

@davinci26 davinci26 left a comment

Choose a reason for hiding this comment

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

We need a release note for this.

#6013 is also conflicting. I think we need to be able to set a global default for this.

@davinci26
Copy link
Contributor

otherwise the PR lgtm, thanks for the feature, we might even put it into use actually

@relu
Copy link
Contributor Author

relu commented Dec 15, 2023

does host refer to cluster endpoint in this case?

That is what I understand from here.

I think we need to be able to set a global default for this.

That could make sense if one wants to configure a safe default max-connections limit covering all ingress configurations.

Sorry, it seems I forgot to include the release note. I'll add it in a few minutes. Thank you!

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
@relu relu force-pushed the circuit-breakers-per-host-thresholds branch from 49ee675 to 6d517e5 Compare December 15, 2023 19:24
Copy link
Contributor

@davinci26 davinci26 left a comment

Choose a reason for hiding this comment

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

LGTM if you merge before #6013 gets in then you have to do the defaults otherwise I can do it

Copy link

The Contour project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 14d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, the PR is closed

You can:

  • Ensure your PR is passing all CI checks. PRs that are fully green are more likely to be reviewed. If you are having trouble with CI checks, reach out to the #contour channel in the Kubernetes Slack workspace.
  • Mark this PR as fresh by commenting or pushing a commit
  • Close this PR
  • Offer to help out with triage

Please send feedback to the #contour channel in the Kubernetes Slack

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 30, 2023
@davinci26
Copy link
Contributor

@projectcontour/maintainers can you PTAL so we can merge it.

It has some conflicts with #6013 so whoever merges it first need to handle it

@github-actions github-actions bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 3, 2024
@skriss skriss self-requested a review January 3, 2024 17:48
@skriss
Copy link
Member

skriss commented Jan 3, 2024

@davinci26 thanks for reviewing, I'll take a look this week

Copy link
Member

@skriss skriss left a comment

Choose a reason for hiding this comment

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

thanks @relu, LGTM

@skriss
Copy link
Member

skriss commented Jan 3, 2024

@sunjayBhatia will give you a chance to take a look if you want

@skriss skriss added this to the 1.28.0 milestone Jan 4, 2024
@skriss skriss merged commit c60a501 into projectcontour:main Jan 5, 2024
26 checks passed
@relu relu deleted the circuit-breakers-per-host-thresholds branch January 8, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/small A small change that needs one line of explanation in the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support per_host_thresholds Envoy circuit breakers
3 participants