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

Add keepalive support in the client #295

Merged
merged 5 commits into from
Dec 11, 2023
Merged

Add keepalive support in the client #295

merged 5 commits into from
Dec 11, 2023

Conversation

stgraber
Copy link
Member

This adds a new incus remote proxy sub-command which operates a simple reverse proxy server over a unix socket. This then gets used when a keepalive property is set on a remote.

That property is a number of seconds during which to keep the proxy running.

Using the keepalive proxy has a few advantages:

  • Allows for more efficient backend connections (keep-alive)
  • Keeps OIDC initialized over multiple calls
  • Caches the calls to /1.0, effectively reducing API calls in half

In my tests, this leads to around 30% performance improvement on workloads that run a lot of individual CLI calls like Ansible.

@stgraber stgraber force-pushed the keepalive branch 2 times, most recently from b3a2680 to 45d82f9 Compare December 11, 2023 05:37
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
@tych0 tych0 merged commit e338ca7 into lxc:main Dec 11, 2023
25 checks passed
@stgraber stgraber deleted the keepalive branch December 15, 2023 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants