karmada icon indicating copy to clipboard operation
karmada copied to clipboard

Too many duplicated tcp connections from aggregated apiserver to one member cluster

Open lcw2 opened this issue 1 year ago • 7 comments

What happened: image As the requests to access the aggregated API server increase, the number of connections will grow more, sometimes, the number of connection is 3000

What you expected to happen: a hostIP should have a tcp connection

How to reproduce it (as minimally and precisely as possible): Execute tosfedctl get pods requests concurrently, then monitor the number of connections.

Anything else we need to know?: I think the root case is,

image

every reqeust will create a httptransport, so can't reuse a TCP connection.

Environment:

  • Karmada version: 0.9
  • kubectl-karmada or karmadactl version (the result of kubectl-karmada version or karmadactl version):
  • Others:

lcw2 avatar Sep 20 '24 09:09 lcw2

Hi @lcw2, thanks for your feedback. Would you like to try to modify the logic to reuse TCP connections?

In addition, can you provide your detailed test procedure, I want to test it too.

XiShanYongYe-Chang avatar Sep 21 '24 02:09 XiShanYongYe-Chang

run this script: #!/bin/bash while true do karmadactl --kubeconfig xxxxxxx get pods sleep 0.1 done

  1. docker ps | grep aggregated-apiserver
  2. docker inspect $containerID | grep Pid
  3. nsenter -n -t $Pid
  4. netstat -anp | grep <IP of member's cluster >

lcw2 avatar Sep 21 '24 15:09 lcw2

/assign lcw2

lcw2 avatar Sep 21 '24 15:09 lcw2

@lcw2 Thanks a lot~

XiShanYongYe-Chang avatar Sep 23 '24 08:09 XiShanYongYe-Chang

/kind feature

XiShanYongYe-Chang avatar Sep 23 '24 08:09 XiShanYongYe-Chang

ping @lcw2 Any progress?

yanfeng1992 avatar Sep 26 '24 06:09 yanfeng1992

@yanfeng1992 I'm coding , wait some days.

lcw2 avatar Sep 26 '24 07:09 lcw2