karmada icon indicating copy to clipboard operation
karmada copied to clipboard

cluster proxy transport disable keepalive

Open yanfeng1992 opened this issue 1 year ago • 6 comments
trafficstars

What type of PR is this? /kind bug

What this PR does / why we need it:

image

We can solve the problem of too many connections by setting DisableKeepAlives: true

test.sh:

KUBECONFIG="proxy.config"
SLEEP_INTERVAL=0.1
MAX_JOBS=100  
function run_karmadactl() {
  while true; do
    kubectl  --kubeconfig "$KUBECONFIG" get node
    sleep "$SLEEP_INTERVAL"
  done
}
for ((i = 1; i <= MAX_JOBS; i++)); do
  run_karmadactl &
done
wait

Monitor the number of TCP connections in the pod

#!/bin/bash

# Output total number of all TCP connections every 10 seconds
while true; do
  # Get the total number of all TCP connections
  tcp_count=$(ss -tn | wc -l)
  
  # Print current time and TCP connection count
  echo "$(date '+%Y-%m-%d %H:%M:%S') - Current total TCP connections: $((tcp_count - 1))"  # Subtract 1 for the header line
  
  # Wait for 10 seconds
  sleep 10
done

before fix

0880c4c80710adb4c422

after fix

0880c4c80710adf28a23

Which issue(s) this PR fixes: Fixes #

https://github.com/karmada-io/karmada/issues/5574

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


yanfeng1992 avatar Sep 26 '24 06:09 yanfeng1992

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 40.75%. Comparing base (e76ce63) to head (122ff3a). Report is 217 commits behind head on master.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5610      +/-   ##
==========================================
+ Coverage   34.14%   40.75%   +6.60%     
==========================================
  Files         643      650       +7     
  Lines       44522    56071   +11549     
==========================================
+ Hits        15204    22853    +7649     
- Misses      28162    31746    +3584     
- Partials     1156     1472     +316     
Flag Coverage Δ
unittests 40.75% <100.00%> (+6.60%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Sep 26 '24 07:09 codecov-commenter

/reopen

whitewindmills avatar Oct 22 '24 07:10 whitewindmills

@whitewindmills: Reopened this PR.

In response to this:

/reopen

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-sigs/prow repository.

karmada-bot avatar Oct 22 '24 07:10 karmada-bot

/cc @RainbowMango @lcw2 @XiShanYongYe-Chang

whitewindmills avatar Oct 22 '24 07:10 whitewindmills

@whitewindmills: GitHub didn't allow me to request PR reviews from the following users: lcw2.

Note that only karmada-io members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @RainbowMango @lcw2 @XiShanYongYe-Chang

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-sigs/prow repository.

karmada-bot avatar Oct 22 '24 07:10 karmada-bot

/cc @lcw2 @RainbowMango

XiShanYongYe-Chang avatar Nov 05 '24 07:11 XiShanYongYe-Chang

@XiShanYongYe-Chang: GitHub didn't allow me to request PR reviews from the following users: lcw2.

Note that only karmada-io members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @lcw2 @RainbowMango

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-sigs/prow repository.

karmada-bot avatar Nov 05 '24 07:11 karmada-bot

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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

karmada-bot avatar Nov 05 '24 08:11 karmada-bot