Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Faster operator startup #2814

Merged
merged 4 commits into from
Dec 7, 2021
Merged

feat: Faster operator startup #2814

merged 4 commits into from
Dec 7, 2021

Conversation

astefanutti
Copy link
Member

@astefanutti astefanutti commented Dec 7, 2021

On typical environments, it can take up to 30s for the operator binary to startup, and being ready to service reconciliation requests. This is mainly caused by the installation of the Kamelets bundled within the operator while it starts.

In order to speed up that installation time and reduce the start time overall, this PR:

  • Increases the value of the maximum burst parameter used for client-side request throttling
  • Use Server-Side Apply to reduce the number of requests for each Kamelet, from up to 3 (get + create + update) down to a single (patch) one in all cases
  • Installs each bundled Kamelet in a separate Goroutine executed in parallel

This results in a startup time as small as 0.5s with the current number of bundled Kamelets (~140 as of writing), and should scale by orders of magnitude better as this number increases.

Incidentally, this should also speed up the reconciliation of IntegrationPlatform that are created, as bundle Kamelets are also installed in that case.

Release Note

feat: Faster operator startup

@astefanutti astefanutti added the kind/feature New feature or request label Dec 7, 2021
Copy link
Member

@nicolaferraro nicolaferraro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great!

@astefanutti astefanutti merged commit cc924de into apache:main Dec 7, 2021
@astefanutti astefanutti deleted the pr-349 branch December 7, 2021 13:23
@tadayosi
Copy link
Member

tadayosi commented Dec 8, 2021

Awesome improvement!

Copy link
Member

@zregvart zregvart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could be wrong on this, @astefanutti does this make any sense?

pkg/install/kamelets.go Show resolved Hide resolved
pkg/install/kamelets.go Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants