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

import CDN download count directly #659

Open
gbaz opened this issue Jan 28, 2018 · 1 comment
Open

import CDN download count directly #659

gbaz opened this issue Jan 28, 2018 · 1 comment

Comments

@gbaz
Copy link
Contributor

gbaz commented Jan 28, 2018

We now have tarballs behind the CDN, but not html pages. This is pretty good, but we have the issue where the download counts are now wildly inaccurate again, because the CDN is in the middle. We can either import cdn stats, or we can configure the cdn to just give a little ping on each download -- e.g. for an ecache tag?

@hvr
Copy link
Member

hvr commented Jan 31, 2018

The etag idea sounds interesting; etag pinging tarballs ought to be super-cheap in hackage-server anyway, as I'd expect it to be an O(1) lookup. The downside might be that we'd force the CDN to check the etag for something that's (almost) guaranteed to never change (at least for the primary index; obviously not for candidates), possibly adding latency to the CDN. Can the CDN configured to check the etag after it already served a previously cached copy?

(another thing to consider is that we have also fallback mirrors in place; but those would ideally only be consulted if the primary endpoint fails; so missing those counts should be neglectable -- unless we start implementing more agressive fallback and/or load-balancing over multiple mirrors rather than relying on the CDN layer)

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

2 participants