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

Change defaults #6226

Merged
merged 1 commit into from
Sep 25, 2020
Merged

Change defaults #6226

merged 1 commit into from
Sep 25, 2020

Conversation

aledbf
Copy link
Member

@aledbf aledbf commented Sep 25, 2020

What this PR does / why we need it:

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Which issue/s this PR fixes

How Has This Been Tested?

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 25, 2020
@aledbf
Copy link
Member Author

aledbf commented Sep 25, 2020

Screenshot from 2020-09-24 20-55-12

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 25, 2020
@aledbf
Copy link
Member Author

aledbf commented Sep 25, 2020

/assign @ElvinEfendi

@ElvinEfendi
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 25, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aledbf, ElvinEfendi

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

@k8s-ci-robot k8s-ci-robot merged commit 4e3e5eb into kubernetes:master Sep 25, 2020
@aledbf aledbf deleted the defaults branch September 25, 2020 18:07
sslavic added a commit to sslavic/ingress-nginx that referenced this pull request Oct 5, 2020
PRs kubernetes#6226 and kubernetes#6143 changed the configuration defaults but didn't update
all the configuration defaults docs in the user guide.

This PR updates the user guide to be in sync with the defaults.

Signed-off-by: Stevo Slavić <sslavic@gmail.com>
@mi1os
Copy link

mi1os commented Jan 7, 2021

I would argue that this is a breaking change and not a bug fix as it is not fixing anything, merely just optimizing things. We have just got heavily burned by this change (in terms of $$) and I am sure we are neither first nor last ones. Changing defaults is always tricky as people learn to rely on them and I personally like the approach of Linux kernel when it is impossible to change user facing defaults/api even if they do not make sense.

Having said that would you consider reverting this change?

@aledbf
Copy link
Member Author

aledbf commented Jan 7, 2021

Having said that would you consider reverting this change?

No. The change of the gzip default was also triggering the HPA due to CPU utilization on high RPS. Either way, I don't see a one size fits all.

We have just got heavily burned by this change (in terms of $$) and I am sure we are neither first nor last ones.

Can you expand on that?

Edit: the change also aligns with nginx defaults http://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip

@mi1os
Copy link

mi1os commented Jan 7, 2021

It is not that important what defaults nginx choose as technically speaking nginx-ingress is different product. I agree that one size does not fit all but you have changed default which has significant monetary impact. Traffic in clouds is quite expensive commodity and if suddenly gzip gets disabled then the egress traffic to world gets multiplied (it was ~3x in our case).

EDIT: perhaps one missing piece is that we are running behind cloudflare who by default tries to use compression with origins servers if at all possible. granted the impact would be much lower if clients were connecting directly to nginx-ingress as they would likely not use compression

@kolorful
Copy link
Contributor

Hi @aledbf, would you provide some detail on why the default value of upstream-keepalive-connections is changed from 32 to 320.

For some legacy reason, we have an HAProxy in front of our nginx ingress, when upstream keepalive connection value is high (we tried, 32, 320, 640 and 960) the time for haproxy to establish a TCP connection with nginx is increased drastically (32 vs 320 connections ==> less than 1ms vs 50ms to 100ms latency). I'm a bit puzzled on why the increase of this field would result in worse latency.

Thanks!

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants