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

Expire session tokens locally in pool #137

Closed
alexvanin opened this issue Feb 11, 2022 · 1 comment · Fixed by #141
Closed

Expire session tokens locally in pool #137

alexvanin opened this issue Feb 11, 2022 · 1 comment · Fixed by #141
Assignees

Comments

@alexvanin
Copy link
Contributor

alexvanin commented Feb 11, 2022

#126 has been solved with a simple solution from #129.
We can go further and implement more complex solution that reduces amount of new session tokens created by pool. Solution proposed by @realloc

In #129 we couldn't use gRPC state monitor because it doesn't cover token expiration case. In other words, pool can renew session token when remote storage node has been restarted (its state changes from READY), but it can't renew session token if it was expired.

To address this case, pool can monitor and expire session tokens from the cache manually. To do that pool can use passive and active epoch observing.

Passive: epoch value is stored in every ResponseMetaHeader, so each successful request updates local epoch number.
Active: during healthcheck, pool sends NodeInfo request, so ResponseMetaHeader with epoch value can be processed there as well.

With combination of these two observations, it is possible to expire session tokens locally.

@KirillovDenis
Copy link
Contributor

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

Successfully merging a pull request may close this issue.

2 participants