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
sum.golang.org: /latest is slow to return updated tree state #66267
Comments
It sounds reasonable to me to have https://sum.golang.org/latest cached similarly to index.golang.org responses, if at all. Forcing monitors (who are the only ones interested in |
What is wrong with using If it is for efficient module checksum verification, |
A sumdb monitor that wants to verify the sumdb will generally not trust The go command uses |
I mean this rather longer ttl for Why does the sumdb monitor require to retrieve a fresh tree head near real time? If that's really necessary for that sumdb monitor, is it that bad for it to send two queries (index.golang.org/index + /lookup)? I am sorry to tell you this but this is not a change that we can make easily at this moment. (hint: we need to ensure we don't create any hotspot in our database and backendS). |
Well by that argument anything works for the primary use case, including not having I'm a bit confused how uncached The delay is a UX issue, not a dealbreaker, AFAIK. |
Hmm, you are right. I imagined |
TTL shortened. (Thanks @suzmue ) |
Thanks! I seem to be getting a new tree state every five minutes now (noticed it a few days ago), certainly an improvement. |
Go version
n/a
Output of
go env
in your module/workspace:What did you do?
Request https://sum.golang.org/latest periodically to stay up to date with the sumdb tree state.
Some context:
I wrote a tool that tracks sum.golang.org, let's you subscribe to module paths/versions, and sends email notifications when they appear. See https://www.gopherwatch.org/ for the online service, and https://github.com/mjl-/gopherwatch for the code.
What did you see happen?
https://sum.golang.org/latest is returning the same tree state for a while, typically around 10 to 20 minutes. It seems heavily cached.
What did you expect to see?
I hoped to get updates through /latest more quickly. Another endpoint to get newly added records from could also work (perhaps even streaming, though that's more than my use case needs).
I have taken the cachedness of responses from /latest as a signal that you don't want the internet to make requests too often. So gopherwatch is currently requesting /latest every 10 to 15 minutes.
Gopherwatch does have an endpoint at
/forward
that requests latest additions from index.golang.org, looks up the most recent moduleversion on sum.golang.org to get its tree state, and then forwards the log. So it's possible to get updates more quickly, but involves more requests. It's only done when manually requested.CC @FiloSottile per thread on slack
The text was updated successfully, but these errors were encountered: