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

Improve Lease Loading #4857

Closed
michaeljs1990 opened this issue Jul 1, 2018 · 1 comment
Closed

Improve Lease Loading #4857

michaeljs1990 opened this issue Jul 1, 2018 · 1 comment

Comments

@michaeljs1990
Copy link
Contributor

Currently when starting a vault server with lots of leases it rapidly requests all the keys from the backend. It looks like this is happening inside of the following function currently. Additionally it looks like this also fires once every minute. In my current metrics I see huge spikes every minute where it requests the number of active leases.

func (m *ExpirationManager) loadEntryInternal(leaseID string, restoreMode bool, checkRestored bool) (*leaseEntry, error)

Many backends support transactional/bulk fetches which could greatly reduce the load on backends when starting and as well when operation. I see that a Transactional backend already exists but it doesn't look like it's used for anything outside of the seal un wrapper. It would be nice to reduce the performance needed since we could have a very large number of tokens in our system.

It looks like this is also somewhat mentioned here #4803. I would be willing to work on this once I finish up with the current MySQL HA changes.

@vishalnayak
Copy link
Member

There has been significant changes to loading of leases since this issue was filed. Please try using latest Vault and let us know your thoughts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants