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

fix: Set IdleTimeout for http.Server #1418

Merged
merged 4 commits into from
Apr 30, 2024

Conversation

mannbiher
Copy link
Contributor

Description

What this PR does / why we need it:

Setup IdleTimeout for ratify http server

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):

Fixes #1416

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Yes. I tested this change on an EKS cluster with OPA gatekeeper. Without an idle timeout, gatekeeper audit controller keeps creating new connections till it reaches the OS limit and then any new connection fails. After the change, gatekeeper audit controller still creates new requests, but the connections are short-lived and I no longer encounter the error.

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Manually verified number of connections to ratify using ss command on gatekeeper-audit container using ephemeral debug container

Checklist:

  • Does the affected code have corresponding tests?
  • Are the changes documented, not just with inline documentation, but also with conceptual documentation such as an overview of a new feature, or task-based documentation like a tutorial? Consider if this change should be announced on your project blog.
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have appropriate license header?

Post Merge Requirements

  • MAINTAINERS: manually trigger the "Publish Package" workflow after merging any PR that indicates Helm Chart Change

Copy link

codecov bot commented Apr 26, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (dev@9ab83c8). Click here to learn what that means.

❗ Current head 7f7f03b differs from pull request most recent head 5f04d85. Consider uploading reports for the commit 5f04d85 to get more accurate results

Files Patch % Lines
httpserver/server.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##             dev    #1418   +/-   ##
======================================
  Coverage       ?   66.51%           
======================================
  Files          ?      114           
  Lines          ?     5988           
  Branches       ?        0           
======================================
  Hits           ?     3983           
  Misses         ?     1622           
  Partials       ?      383           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@binbin-li
Copy link
Collaborator

@mannbiher thanks for investigating and fixing it! @susanshi @akashsinghal do you think it would be beneficial to configure it to handle varying levels of load in the future?

@akashsinghal
Copy link
Collaborator

@mannbiher thanks for investigating and fixing it! @susanshi @akashsinghal do you think it would be beneficial to configure it to handle varying levels of load in the future?

Potentially. I think the idle timeout is one factor among others for higher request counts. We'd only be able to determine after another round of perf testing and that too perf testing that can run for longer period of time. My opinion would be to proceed forward with a set default right now like PR is doing and we can revisit if this becomes a concern in the future.

@susanshi susanshi merged commit 9da6842 into ratify-project:dev Apr 30, 2024
15 checks passed
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.

OPA gatekeeper error: dial tcp: connect: cannot assign requested address
4 participants