Skip to content

Increase client-go k8s config QPS and burst for better performance #3886

@DexterYan

Description

@DexterYan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions