Phantomjs: Alternative download location

Created on 27 Jan 2016  ·  82Comments  ·  Source: ariya/phantomjs

Let's explore a different place to host our downloads!

Requirement: good analytics. Minimum requirement: accumulated download counts.

Most helpful comment

@ariya could you share why you think analytics are such an important factor for deciding where to host the binaries? You mentioned you want download counter.

Installing PhantomJS has been randomly failing for weeks now, our CI builds randomly fails, or sometime even production deployment fail. Yes, I know there are custom solutions to fix this, but I never ran into such trouble trying to install a dependency.

I don't want to sound rude, but you don't rate the quality or popularity of an open source project by looking at the download counter. These numbers are completely inflated due to CI (our CI must be downloading and installing PhantomJS a dozen time per day), developers updating their environment, etc. You've got your priority wrong prioritizing analytics / download counter over reliability for choosing where to host the binaries.

All 82 comments

Our current host, Bitbucket, is known to apply rate limiting. In some cases, it's too aggressive.

Bintray has a free plan for FOSS project. Last time I checked, the stats are very minimal (last 30 days only, or something like that). On top of that, we don't know if there is a similar throttling or not.

While we can always use Github Releases feature, there is zero analytics available. Also, someone should investigate the rate limit.

What about Amazon S3?
Or a static page with Google Analytics linked as downloads.phantomjs.org on Azure? (I have a Bizspark subscription there, so we can do it free)

We may have a CDN sponsoring a download space soon. Stay tuned.

@ariya Great!

What kind of analytics are you looking forward too? I think that any 1 Gbit cheap vps host will do (http://vpsdime.com/), with cloudflare in front of it. It works as cdn and you can see their free analytics as well as be protected against ddos. https://www.cloudflare.com/features-analytics/ But of course, free sponsor is better.

@peixotorms DIY is not an alternative. We couldn't afford any extra time for maintenance.

Stumbled into this issue coming from #13951. Installing randomly fails due to bitbucket returning HTTP code 429 (rate limit). Did you try to contacting bitbucket to have the limit removed on your account? They seems to be quite happy at helping open source projects and they may very well lift the limit for phantomjs.

That last would be excellent. I've had close to a 50% failure rate on jobs recently because of the BitBucket 429.

Same problem here. We are using the frontend-maven-plugin to build everything and I also get 429 errors all of the time.

Also having this issue too with Heroku.

Running into this issue as well :+1:

@siboulet I'm rather swamped right now. If you want to help and talk to Bitbucket to see what they could do, that will be helpful.

Also a reminder to everyone: there's no need for a stream of "me, too" comment. You can use the Subscribe button if you want to get notified of any further change or progress.

@ariya Thanks for the update. My reply was to mark the severity of the issue more than anything rather than getting notified about updates, since the rate limiting causes deployment issues.

@ariya I have opened a support issue with Bitbucket, reference BBS-28344.

@ariya here is the response I received. Time to look for a new home for hosting the PhantomJS binaries.

Jesse Yowell [Atlassian]19/Feb/16 2:30 PM
Simon,

The rate limiting issue isn't something we can change here. We limit the number of downloads per repository based on this article: https://confluence.atlassian.com/bitbucket/rate-limits-668173227.html

This repository also seems like a hosting mirror, which is against our Terms of Service:

  1. Storage Rules. We do not set pre-defined storage limits on Your Data in Bitbucket. However, we do enforce parameters described in the Bitbucket documentation to ensure that you do not use Bitbucket in a way that consumes a disproportionate amount of system resources (CPU’s, memory, disk space, bandwidth, etc.) or that would adversely impact the performance or operation of Bitbucket for other Bitbucket users. Similarly, since Bitbucket is designed to be used as a source code repository, we reserve the right to remove any other content (such as music or video), particularly if the content is consuming a disproportionate amount of storage. Please note that, since we do not maintain access to your repositories, any removal of Your Data under Section 7.8 (Removals and Suspension) of the Agreement means removal of the entire repository in which the offending data resides, not just the offending portions.

We apologize, but there isn't much we can do here.

Thanks,
Jesse

I just noticed the issue of download limits on Bintray--if you're using JCenter (not sure if that now includes the non-Java hosting or whether that's branded separately), the whole point is to provide a public mirror, and they won't have rate limiting. No idea about analytics, though I know they provide at least basic download counts.

We are trying to get a working setup with a CDN so that the downloads can be provided by the CDN.

Temporary workaround: PHANTOMJS_CDNURL=http://cnpmjs.org/downloads npm install -g phantomjs2

You can add binarys to GitHub and it is fast to download. You can also edit your 2.1.1 release to include the binarys in GitHub.

You can add binarys to GitHub and it is fast to download.

Does Github now offer analytics (context: scroll to the top and read my description)?

@ariya I'm not sure. But could you include it as an alternative way.

@ariya could you share why you think analytics are such an important factor for deciding where to host the binaries? You mentioned you want download counter.

Installing PhantomJS has been randomly failing for weeks now, our CI builds randomly fails, or sometime even production deployment fail. Yes, I know there are custom solutions to fix this, but I never ran into such trouble trying to install a dependency.

I don't want to sound rude, but you don't rate the quality or popularity of an open source project by looking at the download counter. These numbers are completely inflated due to CI (our CI must be downloading and installing PhantomJS a dozen time per day), developers updating their environment, etc. You've got your priority wrong prioritizing analytics / download counter over reliability for choosing where to host the binaries.

@ariya if analytics are important see https://sourceforge.net/blog/github-projects-downloads-are-welcome/ and host it on sourceforge please could you host them there if you really need analytics but please do it today.

Yes, I concur. This has caused us a lot of pain and we have actually resorted to mirroring it on our S3 :disappointed:

@paladox The Github analytics which you referred earlier do not display the simple download count, unless I'm mistaken.

Friendly advice: please do not ask us (or any other FOSS developers) to do something "today" (or with other urgency). We have our daily job, family to feed, kids to take care of, volunteering tasks, and other wonderful life activities. Often times, we can't afford the time to worry about someone's else problems, not out of malicious intention but simply because there's only so many things one can help.

Tip: use the workaround described by @blaise-io above.

@ariya there sourceforge that includes analytics for downloads, this is an old post https://sourceforge.net/blog/github-projects-downloads-are-welcome/ but seems to still work.

And @ariya sorry.

To be frank, @siboulet, I was a bit disturbed by your comment. Fortunately, I feel better now after the usual morning chores (https://github.com/ariya/ama/issues/4). However, let me refrain from responding to you until I can find a way to express my thought politely.

@ariya I completely understand and am actually in the same position myself with my open source projects - so I just hope a solution is implemented in due time.

I want to point out however that @blaise-io's suggestion to use the cnpmjs.org mirror might not work for many, as that's a China-hosted mirror, and actually timed out for our use cases.

@suan or we can add the binarys our self by forking and creating a fake release that includes the binarys. GitHub is fast.

@paladox I like that idea as a workaround - would you be willing to set that up? _wishes github had a messaging feature to reduce the noise in this thread_

I can't support any use of sourceforge, even just as a download mirror, even as a stopgap. They have proven completely untrustworthy.

I also tried @blaise-io's solution (also listed on https://www.npmjs.com/package/phantomjs-prebuilt). But we frequently got download errors (over 80% of the time).

PhantomJS not found on PATH
Downloading http://cnpmjs.org/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2
Receiving...

Received 5705K total.
Extracting tar contents (via spawned process)
Error extracting archive
Phantom installation failed { [Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2

@ariya Please don't take my comment personally. I didn't meant to hurt you and I sincerely apologize if I did. I thank you for your work on PhantomJS.

Installing PhantomJS has been really unreliable for the last few weeks. I did try to help the best I could by opening an issue a month ago with Bitbucket without success (see above). I'm questioning the needs for analytics because it seems to be a big limitation for finding a new home for hosting PhantomJS binaries. GitHub Release looks like a good fit, doesn't seem to have rate limit, but doesn't provide the analytics. Also on January 31st you mentioned having a potential CDN sponsor, was there any development on that front?

Once there is an update on the CDN sponsor, I'll post it here. I'll quote our FAQ:

Q: Is there any update on issue XYZ??

Any progress related to an issue, whether it is a change in the plan or an implementation check-in, will be always posted to the issue page. This is part of PhantomJS contribution guide, it is essential to the development workflow. If an issue hasn't received any new update for a while, a question like "Is there any update?" has an obvious answer.

@zackw The new owner of SF killed the controversial DevShare program: https://sourceforge.net/blog/sourceforge-acquisition-and-future-plans/.
But I do agree that we must be cautious and wait until the new SF is proven to be trustworthy.

@siboulet I'm not offended or anything. However, I'm deeply concerned that there is a huge gap in expectation between what we (=PhantomJS team) has been doing with respect to offering binaries download vs what people expect we should do.

The official PhantomJS binaries are always available from Bitbucket: https://bitbucket.org/ariya/phantomjs/downloads.

Please keep in mind that this download location is not the only place where someone can download PhantomJS binaries. There has never been any prohibition (and there will be likely no future prohibition) if a person sets up their own mirrors.

CDN hosted downloads

In the near future, PhantomJS official binaries will be hosted by a CDN company who is willing to offer their space and bandwidth. Once this is about to happen, there will be an update on this issue. If you are interested to get notified, watch/subscribe to this issue (there is no need to actively poke us 5 times/day).

Download analytics

The download counts are used to track the usage of the binaries from Bitbucket download. Contrary to the popular belief, the numbers are not being used to determine the popularity. We could not care less about any vanity metrics, we only want our users to be happy. Please kindly avoid extrapolating the situation into thinking that we got our priority wrong.

There are cases where an estimated distribution helps us determining a proper course of action. For example, once I dedicated an entire week of my spare time trying to figure out the best way to produce high-quality and reliable Linux binaries (see #13822 and also #13849). If the number of 32-bit Linux downloads would have been very low, I could have skipped it alltogether. I may disappoint some 32-bit Linux users, but that kind of judgement calls will allow me to spend more time looking at other more pressing matters.

Producing binaries is always the least rewarding aspects of maintaining PhantomJS. And yet, no matter what we have done, it seems that we are always being misunderstood (in some cases, "punished") for not being able to do more, even if it was (1) out of exhaustion (2) lack of time, rather than any bad intention.

Automatic download and install problem

There are many different ways to automatically download and install PhantomJS binaries. One possible approach is to use the npm module https://www.npmjs.com/package/phantomjs-prebuilt. This module is created and maintained by this project https://github.com/Medium/phantomjs. It is not controlled nor influenced by us (=PhantomJS team). We even requested the module name to be changed (from plain phantomjs to phantomjs-prebuilt) to reduce the confusion.

In theory, such an installer module could grab PhantomJS binaries from any locations, including a mirror. In practice, usually it grab them from the said Bitbucket download location. When an environment, e.g. a continuous integration system running a build job, installs the above module too frequently, Bitbucket rate throttling will kick in. A number of workarounds:

This is however not a universal problem. Installing PhantomJS using the native package manager, e.g. on Arch Linux or FreeBSD, does not suffer from the same problem because this package manager grabs the package from the distribution's download location, including the mirrors thereof.

Expectation of development vs distribution

We understand that this is an unfortunate situation and it causes annoyances. However, please also keep in mind that you do not always need to channel your frustation to us (believe me, I'd still rather work on solving a build issue even if it is not rewarding, vs writing this explanation). This is not a single point of failure and there are things you can do, everything from improving your continuous integration system to rely less on an external server to implementing various workarounds listed above.

It may require some additional work on your own side, but that is why we all are in it together. Whenever your project relies on PhantomJS, directly and indirectly, there should not be any expectation that every problem needs to be solved by us. This is a pure volunteering project, it is not a special project from a unicorn, VC-backed start-up. As a FOSS project, PhantomJS needs to be supported by its community.

Seriously, we (=PhantomJS team) prefer that we do not worry about the distribution problem (packaging, installation, mirroring, etc). None of us got paid to maintain and grow PhantomJS and surely we rather spend the precious milliseconds of our spare time focusing on the main feature development. But we realize that at least, we need to do something, hence the provided PhantomJS binaries.

Yet, it would be nice if there is line drawn somewhere so that the expectation is crystal clear. Should we monitor all the various distribution channels, from npm to gem to rpm to pkg? Must we be worried if an installer potentially got rate throttled? Should we maintain and babysit a mirror for that purposes? Doesn't it even still make sense for us to offer binaries?

Regarding GitHub release download statistics, the API does expose a download_count field for each asset in a release: https://developer.github.com/v3/repos/releases/#get-a-single-release, if that helps.

Hi @ariya,

Fastly offers free hosting for open source projects. Let me know if you need more details and if you need me to put you in touch with the right people

While I applaud the efforts of the PhantomJS maintainers to provide a reliable download service, I really think it's incumbent on all of us users to set up our CI builds and local development environments to use a _locally hosted copy_ as the source of truth for dependencies. Downloading a fresh copy from GitHub or BitBucket or even the future CDN with every CI build is just bad practice as it gives up control of your build process and fails to meet the most basic requirement of continuous delivery, repeatable builds.

hi! maintainer of the npm installer here (https://www.npmjs.com/package/phantomjs-prebuilt)

re: @ariya's comment "It is not controlled nor influenced by us": awwww...Ariya, you influence & inspire us whether you intend to or not :heart: :yellow_heart: :green_heart: :purple_heart:

I'm very sorry about this situation. When we set up the npm installer, I personally thought that the main use-case would be to make it easier for newcomers to get started with PhantomJS. Or use it to set up a new machine, like one would use a native package manager.

I did not anticipate that tons of people would run a clean npm install as part of their CI builds, and make the installer/download-host a critical part of their CI/deploy process.

It's like we brought free veggies & dip to a PhantomJS meetup to be nice. Then people started showing up insisting that we must continue providing free food at every meetup, because they've been using those veggies to feed their children, and their children will starve if we stop now. _sigh_

Thanks for reading my rant. I want to try a dedicated download location for the npm installer, at the very least so that all the npm CI builds don't affect everyone else's experience. I also want to make sure it's caching as aggressively as possible by default, so that it's not putting unnecessary load on whoever's providing the bandwidth. I just haven't had time yet.

@vvuksan Can you (or someone else from Fastly) please send me an-email? Thanks.

@ariya can you pm me your email address? Thanks.

should be here http://ariya.ofilabs.com/about @vvuksan

Sorry for interjecting I just want to see this issue resolved :)

Email has been sent.

@ariya I'm a long-time user of PhantomJS and founder at packagecloud.io. We'd love to offer PhantomJS a free open-source account on packagecloud. Our API provides detailed analytics for package downloads with no limit on how far back you can go. And, we don't throttle or rate limit users in any way.

http://blog.packagecloud.io/eng/2016/02/24/repository-and-download-stats/

Last July (2015) I packaged PhantomJS and provided a public repository on packagecloud. This has been helpful in getting around issues with CI and made it easy to distribute PhantomJS to our machines. Others have also found it useful. Take a look at the repo installation and package download stats below. The package for ubuntu/precise was the most popular.

Repository:
https://packagecloud.io/armando/phantomjs

Repository Installation Stats:
https://packagecloud.io/app/armando/phantomjs/stats

PhantomJS 2.0.0 Package Page (ubuntu/precise):
https://packagecloud.io/armando/phantomjs/packages/ubuntu/precise/phantomjs_2.0.0_amd64.deb

Again, we would love to have an official PhantomJS repository on packagecloud. Please let me know if you're interested and I'll get it setup.

twitter: @armandocanals
support: [email protected]

+1

Has there been any resolution on this?

@ariya I should also mention that we've enabled Fastly support for all accounts on packagecloud.io including my phantomjs repo mentioned above.

I'm surprised this project has been sitting on this issues for 3 months. An unreliable download link is something that should be fixed immediately, then a discussion on the perfect place to host it should happen afterwards.

@armandocanals Thanks, I'll get to that soon.

I'm the build infrastructure engineering manager for Travis CI, so a lot of those downloads do come from what we run. We are a happy packagecloud.io customer for some of our own software and I'd highly encourage @ariya and the other folks who're involved to take them up on their offer. They are an awesome group of people.

We (Travis) are also hoping to launch some new caching related things that will help reduce the number of downloads from our build environments and speed things up, very soon.

Cheers!

@chuntley We move rather slowly because we're a (very) small team. If you have any suggestions, I'm all ears.

@ariya, Officially host it right here on Github until everything gets sorted out? I know it lacks the analytics you are looking for, but even if you are looking at bitbucket analytics you might be missing a large percentage of actual downloads due to their rate limiting.

Also the fact that it's pretty unreliable to install now; a lot of package maintainers have resorted to self-hosting the phantomjs package on their own S3 buckets or CDN.

It's a miserable mess; dragging your feet through the mud will only make it worse.

I think we need to keep in mind that this is an open source project, maintained on a volunteer basis. There has been discussion about how this needs to be fixed ASAP, but how many people have actually stepped up to get it resolved?

These guys have spent a lot of their personal time building and maintaining a well-functioning product. If I have to host it myself for a few months so that they don't feel pressured and underappreciated, I'm happy to do that while I patiently wait for an elegant solution that they will undoubtedly provide at their own time.

@chuntley You can use many available mirrors out there. Among others, there is https://github.com/Medium/phantomjs/releases/tag/v2.1.1 which I believe was prepared by @nicks for npm installer of PhantomJS. Will that work for you as a temporary solution?

The lack of ownership is a beat deafening...

The lack of ownership is a beat deafening...

Care to elaborate? AFAICS there are numerous workarounds for every cases already, nobody should be blocked from doing amazing things they want to do.

BitBucket is saying "Rate limit for this resource has been exceeded" again for phantomjs-2.1.1-linux-x86_64.tar.bz2

Putting the alternate download links (GitHub) on the download page would be great help.

FWIW, cnpmjs.org seems to be reliable enough for day-to-day use for us at Mocha. In response to @suan's comment, the server is provided by a Chinese company but is actually located in the United States:

timothy_gu@tgdo:~$ host cnpmjs.org
cnpmjs.org has address 47.88.189.193
cnpmjs.org mail is handled by 10 mxw.mxhichina.com.
cnpmjs.org mail is handled by 5 mxn.mxhichina.com.
timothy_gu@tgdo:~$ whois 47.88.189.193 | grep -A 5 Address
Address:        400 S El Camino Real, Suite 400
City:           San Mateo
StateProv:      CA
PostalCode:     94402
Country:        US
RegDate:        2010-10-29

It's website says

What about RawGit.com?

They are backed by MaxCDN and every time you tag a release, it's contents become automatically available. In my projects I just commit the build to Git (I know some people frown upon it), and so I automatically have CDN urls for direct download.

E.G: check out the download links on this project page: http://download.github.io/picolog/
You'll find they point to rawgit. It works perfectly for me, but of course my projects don't get many downloads at all, unlike the massive popularity of Phantom JS, so I'm not sure how much load they can take and how reliable they are in such scenarios. But the wording in the text under 'Use this URL in production' makes it sound to me that it might work well for Phantom JS as well:

No traffic limits or throttling. Files are served via MaxCDN's super fast global CDN.

There is a lot going on in this thread ;). Thanks everyone for their help! The solution I implemented is actually pretty simple and I posted it at bitbucket rate limiting phantomjs

@Download You probably missed the Requirement paragraph. Beside, RawGit doesn't provide uptime guarantee at all.

Rawgit is free; the lack of support and uptime guarantee should be acceptable. Reviewing https://github.com/rgrove/rawgit/wiki/Frequently-Asked-Questions#i-need-guaranteed-100-uptime-should-i-use-cdnrawgitcom

It's free so completely acceptable; it costs money (a lot) for 100% uptime (let alone a guarantee) most IaaS providers really don't even give you that. I've gotten 99.99% from Internap but that still gives you a few hours per month

Lastly.

Let's make sure we're realistic in our goals; and also uptime guarantee's generally are a cash return (or credit). It really doesn't mean your going to be up 100% of the time. It means they are going to try but will pay out for downtime.

No I'm not a contributor I just am trying to make sure that most people understand that 100% uptime isn't cheap nor easy.

@damm I think you're missing the point - the main requirement for the download server was good analytics, not 100% uptime (see the first post in this thread). I haven't found any mention of even simple download counters on RawGit...

May I ask what part of the analytics you are interested in? Because if you are interested in 'real downloads' (meaning, by people installing PhantomJS vs Travis CI et al downloading it), then a middle ground solution might be a simple Download page in the static site (gh_pages branch) with a download link with an onclick handler that fires an event to GA. Because people will use that link and not the 'raw' rawgit URL (which looks daunting). But this would not count the automated build downloads.

Whichever way you cut it, if the main download location is down often, what you will see is that people will start to create own mirrors... Which also means they will no longer be counted by analytics. What exactly does that information about the number of downloads of the binary give you that cannot be simply derived from stats counters on the page and download link?

Technically, unless you are doing server-side counting (e.g. with log analyzers etc), you can't really track downloads. Not with say Google Analytics at least.

So is this the requirement? A host that supports file downloads and that will report analytics on it?

Analytics can be nice and you can definitely do that with Akamai,Fastly and most CDN's.

Also like @Download said having a download page maybe helpful. Rubygems is hosted on S3 however you fetch get the links from rubygems.org for this 'Analytics' effect.

It's also a SPOF (Single Point of Failure)

New user <24hrs...

Haven't managed to get phantomJS to download or build properly and i discover this thread.

8 months?! Pull your finger out guys... _wanders off to find an alternative_

@yellongbulla

I get that it can be a showstopper when trying a new lib. It was for me.

On the other hand, this is an open source project, so anyone could come up with a solution. Including you and me.

The problem is that the people having the issue don't care about the analytics, whereas ariya (apparently) doesn't care so much about the downtime issue...

I was prepared to create a PR to help place the file on CDN when I wrote my comment, but the requirements are too high for me to meet. So I too have given up on phantomjs. It's apparently a very good library but alas.

Counting downloads that just aren't happening... Makes complete sense to me!

A simple link to a mirror on the main download page would be nice...
... did your analytics count that download? ;)

Hi @ariya have you given any more thought to the various CDN options listed above?

not sure if anyone noticed but if you use http:// instead of https:// for the bitbucket download link, it just works

wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
end up with

HTTP request sent, awaiting response... 403 Forbidden
2016-11-18 00:59:54 ERROR 403: Forbidden.

tried numerous times

but a regular non-https download does work even though it mention it does use https
wget http://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2

eg. here the output

URL transformed to HTTPS due to an HSTS policy
--2016-11-18 01:01:16--  https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
Resolving bitbucket.org (bitbucket.org)... 2401:1d80:1010::150, 104.192.143.2, 104.192.143.3, ...
Connecting to bitbucket.org (bitbucket.org)|2401:1d80:1010::150|:443... connected.
HTTP request sent, awaiting response... 302 FOUND
Location: https://bbuseruploads.s3.amazonaws.com/fd96ed93-2b32-46a7-9d2b-ecbc0988516a/downloads/396e7977-71fd-4592-8723-495ca4cfa7cc/phantomjs-2.1.1-linux-x86_64.tar.bz2?Signature=%2FKsqkCHIikt36WrJ43X7SRL6HBM%3D&Expires=1479428415&AWSAccessKeyId=AKIAIVFPT2YJYYZY3H4A&versionId=null&response-content-disposition=attachment%3B%20filename%3D%22phantomjs-2.1.1-linux-x86_64.tar.bz2%22 [following]
--2016-11-18 01:01:16--  https://bbuseruploads.s3.amazonaws.com/fd96ed93-2b32-46a7-9d2b-ecbc0988516a/downloads/396e7977-71fd-4592-8723-495ca4cfa7cc/phantomjs-2.1.1-linux-x86_64.tar.bz2?Signature=%2FKsqkCHIikt36WrJ43X7SRL6HBM%3D&Expires=1479428415&AWSAccessKeyId=AKIAIVFPT2YJYYZY3H4A&versionId=null&response-content-disposition=attachment%3B%20filename%3D%22phantomjs-2.1.1-linux-x86_64.tar.bz2%22
Resolving bbuseruploads.s3.amazonaws.com (bbuseruploads.s3.amazonaws.com)... 54.231.33.211
Connecting to bbuseruploads.s3.amazonaws.com (bbuseruploads.s3.amazonaws.com)|54.231.33.211|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 23415665 (22M) [application/x-tar]
Saving to: ‘phantomjs-2.1.1-linux-x86_64.tar.bz2’

Github counts downloads (visible in API) and downloads are not rate-limited AFAIK.

Example: Medium's fork of PhantomJS, Windows .zip release for 2.1.1:
Taken from: https://api.github.com/repos/Medium/phantomjs/releases/2489362
Downloaded 1.731.773 times since March 2016.

{
  "url": "https://api.github.com/repos/Medium/phantomjs/releases/assets/1471657",
  "id": 1471657,
  "name": "phantomjs-2.1.1-windows.zip",
  "label": null,
  "uploader": { /* … */ },
  "content_type": "application/zip",
  "state": "uploaded",
  "size": 18193653,
  "download_count": 1731773,
  "created_at": "2016-03-25T15:29:18Z",
  "updated_at": "2016-03-25T15:29:21Z",
  "browser_download_url": "https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-windows.zip"
}

compare

You can see example use of the API in my project website above (loaded with AJAX). Public API is rate-limited but downloads are not, so you need to proxy/cache the API request if you want to use it on the website.

In case you want more analytics:

  • You can use Google Analytics to track clicks on download buttons,
    <a href="…" onclick="ga('send', 'event', …)">Download for Windows</a>
  • Or use a custom download route that redirects to corresponding Github download URL
    phantomjs.org/download/windows
    ⬇️ (302 redirect) ⬇️
    github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-windows.zip
  • Use a CDN (like CloudFlare) on phantomjs.org to track everything.

@ariya bintray looks promising? E.g. https://github.com/getgauge/gauge are using bintry for their nightly builds also, it's working really nice for them.

bintray's foss 1tb download limit would likely exceeded pretty easily no?

This is a moot point while we're suspending the development (#15344).
We will revisit it again at some point in the future. Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mdominado picture mdominado  ·  3Comments

bhuvnesh2703 picture bhuvnesh2703  ·  3Comments

julmot picture julmot  ·  5Comments

gustavohenke picture gustavohenke  ·  4Comments

Marmeladenbrot picture Marmeladenbrot  ·  4Comments