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

Allow configuring activator max idle connections #9027

Merged
merged 3 commits into from
Aug 13, 2020

Conversation

julz
Copy link
Member

@julz julz commented Aug 12, 2020

Inject the transport into activatorHandler and allow configuring maxIdleConns using a flag. As a bonus, this means the tests for activatorHandler no longer need to do casts and set the private transport field \o/.

Using a flag rather than a configmap here because maxIdleConns can't be easily changed dynamically, so we really need the value on startup.

/assign @markusthoemmes @vagababov

Inject the transport into activatorHandler and allow configuring its
default maxIdleConns using a flag. As a bonus, this means the tests for
activatorHandler no longer need to do casts and set the private
transport field.

Using a flag rather than a configmap here because maxIdleConns can't be
easily changed dynamically so we really need the value on startup.
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Aug 12, 2020
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 12, 2020
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@julz: 0 warnings.

In response to this:

Inject the transport into activatorHandler and allow configuring maxIdleConns using a flag. As a bonus, this means the tests for activatorHandler no longer need to do casts and set the private transport field \o/.

Using a flag rather than a configmap here because maxIdleConns can't be easily changed dynamically, so we really need the value on startup.

/assign @markusthoemmes @vagababov

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@julz
Copy link
Member Author

julz commented Aug 12, 2020

(looks like cmd/activator isn't owned by same owners as pkg/activator, seems wrong! Opened #9028).

Copy link
Contributor

@markusthoemmes markusthoemmes left a comment

Choose a reason for hiding this comment

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

LGTM but I'd like others to have a chance to look to.

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 12, 2020
@julz
Copy link
Member Author

julz commented Aug 12, 2020

/retest

@@ -195,9 +199,11 @@ func main() {
concurrencyReporter := activatorhandler.NewConcurrencyReporter(ctx, env.PodName, statCh)
go concurrencyReporter.Run(ctx.Done())

proxyTransport := pkgnet.NewAutoTransport(*maxIdleProxyConns, 100 /*maxidleperhost*/)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to tweak maxidleperhost as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

actually, probably, Ill add

Copy link
Member Author

Choose a reason for hiding this comment

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

done - thanks!

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: julz, markusthoemmes

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yanweiguo
Copy link
Contributor

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 12, 2020
Copy link
Contributor

@vagababov vagababov left a comment

Choose a reason for hiding this comment

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

flag or envvar? Somehow it seems k8s shuns away from cmdline flags

@julz
Copy link
Member Author

julz commented Aug 12, 2020

yeah, I can make it an env var, that way we don't have to worry about backwards compat if we remove the flag / move it a CM later I guess

/hold

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 12, 2020
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Aug 12, 2020
@julz
Copy link
Member Author

julz commented Aug 12, 2020

/unhold

@vagababov take another look?

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 12, 2020
@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-serving-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/activator/handler/handler.go 96.9% 96.8% -0.1

Copy link
Contributor

@vagababov vagababov left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 12, 2020
@knative-test-reporter-robot

The following jobs failed:

Test name Triggers Retries
pull-knative-serving-integration-tests 2020-08-12 18:13:59.293 +0000 UTC
2020-08-12 19:01:59.469 +0000 UTC
2020-08-12 21:06:59.288 +0000 UTC
3/3

Automatically retrying due to test flakiness...
/test pull-knative-serving-integration-tests

@knative-prow-robot knative-prow-robot merged commit 0ea5571 into knative:master Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/autoscale area/networking cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants