mirror of https://github.com/linkerd/linkerd2.git
Ensure tap requests at least 1rps from each pod (#459)
When attempting to tap N pods when N is greater than the target rps, a rounding error occurs that requests 0 rps from each pod and no tap data is returned. Ensure that tap requests at least 1 rps from each target pod. Tested in Kubernetes on docker-for-desktop with a 15 replica deployment and a maxRps of 10. Signed-off-by: Alex Leong <alex@buoyant.io>
This commit is contained in:
parent
9ffe8b7970
commit
84ba1f3017
|
@ -66,6 +66,9 @@ func (s *server) Tap(req *public.TapRequest, stream pb.Tap_TapServer) error {
|
|||
|
||||
// divide the rps evenly between all pods to tap
|
||||
rpsPerPod := req.MaxRps / float32(len(pods))
|
||||
if rpsPerPod < 1 {
|
||||
rpsPerPod = 1
|
||||
}
|
||||
|
||||
for _, pod := range pods {
|
||||
// initiate a tap on the pod
|
||||
|
|
Loading…
Reference in New Issue