replicatedhq / replicatedhq/kURL
Increase client-go k8s config QPS and burst for better performance
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 809
- Forks
- 81
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 20
Description
By checking the code under pkg/cli, we can see
k8sConfig := config.GetConfigOrDie()
so we are using the client-go of k8s.
In the GetConfigOrDie() function, we could find that it is using
func GetConfigWithContext(context string) (*rest.Config, error) {
cfg, err := loadConfig(context)
if err != nil {
return nil, err
}
if cfg.QPS == 0.0 {
cfg.QPS = 20.0
cfg.Burst = 30.0
}
return cfg, nil
}
Which means we are set QPS 20 and Burst 30. For better performance, I would recommend to use QPS 100 and Burst 100, same as kots https://github.com/replicatedhq/kots/pull/3523/files
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in pkg/cli by tracing config.GetConfigOrDie() to GetConfigWithContext and verify where the client-go defaults are set. Update the QPS and burst values to the requested levels, then confirm the surrounding configuration behavior and any existing checks remain correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- infrastructure, performance
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100