Skip to content

import CDN download count directly #659

Open

Description

@gbaz

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?

Activity

  1. hvr commented on Jan 31, 2018

    @hvr
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions