Chromium Code Reviews
Descriptioncipd: Implement local cache for ResolveVersion(...) call with tags.
Tags are not detachable. If ResolveVersion(<tag>) resolved to something, it is
guaranteed to resolve to the same thing later or not to resolve at all (in case
same <tag> was attached to another instance).
Tags that are applied to multiple instances aren't supposed to be used for
version resolution anyway.
So it seems acceptable to cache <tag> -> <instance id> mapping locally to avoid
round trip to the server next time it is used.
In practice same tag reresolution happens a lot. Puppet runs "cipd ensure" each
N minutes, passing cipd "pkg1:tag1 pkg2:tag2 ..." list where tags are mostly
static (compared to the frequency of puppet runs). No need to go to the backend
all the time. Especially considering it might not be available due to temporary
networks hiccups, etc.
I expect this CL will reduce QPS to the backed to ~0 compared to the current
state.
R=nodir@chromium.org, tandrii@chromium.org
BUG=
Committed: https://chromium.googlesource.com/infra/infra/+/72d3a5a5d8173d0a353d26ce307b96270355c77f
Patch Set 1 #
Total comments: 56
Patch Set 2 : #Patch Set 3 : add tests #Patch Set 4 : rebase #Messages
Total messages: 14 (3 generated)
|