kubernetes / kubernetes/kubernetes

Support async moveAllToActiveOrBackoffQueue in scheduler

Open
#136,221 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature sig/scheduling triage/accepted
Dominant language
Go
Stars
128k
Forks
44.6k
Avg merge
5d 17h
Merged PRs (30d)
208

Description

### What would you like to be added?

Kube-Scheduler uses scheduling hint to determine whether the pods should be moved to ActiveQ. Scheduler will lock and traverse all pods in unschedulableQ to find which pods might become schedulable due to the incoming event. Many operation on SchedulingQueue will be blocked if the events come too frequently.

For example, if someone updates assigned pod in a high frequency, the SchedulingQueue will be blocked by assignedPodUpdate() and new pods can not be added into the activeQ, result in scheduler hang.

I want to make moveAllToActiveOrBackoffQueue run in a background goroutine, check multi cluster events once a time, and limit its frequency to avoid influencing other SchedulingQueue operation.

### Why is this needed?

If someone updates assigned pod in a high frequency, the SchedulingQueue will be blocked by assignedPodUpdate() and new pods can not be added into the activeQ, result in scheduler hang.

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

Locate moveAllToActiveOrBackoffQueue and the assignedPodUpdate path in the scheduler's SchedulingQueue implementation. Read how queue locking and scheduling-hint events are handled, then determine batching and frequency behavior for multi-cluster events. Done means frequent assigned-pod updates no longer block adding pods to ActiveQ while affected pods are moved correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.