-
Notifications
You must be signed in to change notification settings - Fork 403
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
[proxy] Implement compute node info cache #3331
Conversation
Closes #3332 |
958bc45
to
9913f4e
Compare
cd116de
to
e339048
Compare
c665108
to
1c0922a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Patch is looking good, also did some digging into surrounding proxy parts, which are looking great. Some comment specific ideas , and question about logging.
I doubt benchmarking would provide too interesting results, because the time to wakeup currently fluctuates and will dominate the time before this patch and with happen every once per ttl with this patch.
1c0922a
to
810ab86
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very nice!
AM I right that invalidation happens based on either time or error during compute connection establishment?
If you have a burst of 100 connections to the same database simultaneously, does all the connections race and perform 100 lookups in the console, and then all insert the same value in the cache? It would be better to keep track of which lookups are in progress, so that only one connection performs the lookup, and the others wait for it to finish. That is more efficient. I don't think that's must-have, just something to consider and maybe add on later. |
dbfe888
to
bf455d0
Compare
ac5d021
to
8627113
Compare
I don't think this PR is too big. Most of the changes are straightforward and actually facilitate the review process. For instance, there used to be an ugly Now everything related to the console API lives in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I've had a call with @funbringer discussing the implementation which resulted in a few extra comments in code. The control flow indeed became simpler
I think we can move forward with testing this on staging
/proxy_wake_compute
)
/proxy_wake_compute
)proxy_wake_compute
)
proxy_wake_compute
)
proxy_wake_compute
API call./proxy_wake_compute
if we couldn't connect to a compute (e.g. stalled cache entry).TimedLru
.proxy_get_role_secret
API call.