knative / knative/serving

targetBurstCapacity does not behave correctly when there is more than one activator pod

Open
#11,532 11 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area/autoscale area/networking help wanted kind/bug triage/accepted
Dominant language
Go
Stars
6.1k
Forks
1.2k
Avg merge
2d 7h
Merged PRs (30d)
2

Description

Expected Behavior

See this post for background where high-availability.replicas was set to 2.

When targetBurstCapacity is set to '-1' the activator should hold on to requests until a pod becomes available to process it. This means that if only 1 pod is available (with containerConcurrency: 1) and 2 long running requests are made, the first request should be processed by the first pod, and a second pod should be scaled to service the second request.

Actual Behavior

When 2 long running requests are made, both requests seem to be sent to the first pod. A second pod is created, but never used.

When high-availability.replicas was reduced to 1 so that only 1 activator was present, expected behavior was observed and targetBurstCapaciry seems to work correctly.

Steps to Reproduce the Problem

  1. A cluster with 2 activator pods and 1 running worker pod
  2. Set targetBurstCapacity: '-1' , containerConcurrency: 1 and minScale: 1
  3. Send 2 long running requests (web socket connections in this case)
  4. Observe both requests are sent to the same worker, newly scaled pods are not used

Additional Info

Running on OCP
Serving version v0.19.0
Kourier gateway

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior with two activator pods, one worker pod, targetBurstCapacity -1, containerConcurrency 1, and two long-running requests. Trace the activator request-routing and scaling behavior, then verify that the requests are distributed across available workers and that newly scaled pods receive work.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.