[zeromq-dev] download.zeromq.org: last call

Ewen McNeill zeromq at ewen.mcneill.gen.nz
Mon May 30 06:13:13 CEST 2016


On 30/05/16 11:32, Ewen McNeill wrote:
> Possibly Doron/Benjamin could work on a way to point download.zeromq.org
> at Benjamin's mirror in a way that maintains the existing URLs
> continuity for now?

Random alternative thought: find somewhere (Amazon free 
instance/sponsored by someone? someone's existing VM/machine?) to host 
"download.zeromq.org" that is _only_ a redirect service, working just 
from regexes?

Eg,

http://download.zeromq.org/zmq-0.1.tar.gz

needs to become:

https://archive.org/download/zeromq_0.1/zmq-0.1.tar.gz

which is (in Apache syntax -- 
http://httpd.apache.org/docs/2.4/mod/mod_alias.html#redirectmatch) is 
something like:

RedirectMatch permanent "^zmq-([0-9.]+)\.(.+)$" 
"https://archive.org/download/zeromq_$1/zmq-$1.$2"

and so on, for the dozen or so pattern variations.  (All the original 
filenames were preserved on upload to archive.org, and the archive.org 
identifiers -- those "directory names" -- were generated with what 
amounted to a regex, so that should be repeatable with a regex.)

The newest downloads could be pointed at the GitHub Release copies.  Eg,

http://download.zeromq.org/zeromq-4.1.4.tar.gz

needs to be come:

https://github.com/zeromq/zeromq4-1/releases/download/v4.1.4/zeromq-4.1.4.tar.gz

which is an Apache-redirect something like

RedirectMatch permanent "^zeromq-(4\.1\.[4-9])\.(.+)$" 
"https://github.com/zeromq/zeromq4-1/releases/download/v$1/zeromq-$1.$2"

and with some variations on version number could auto-handle any new 
releases without much extra setup, assuming the version tag structure 
stays the same.

Then we point download.zeromq.org DNS at the system that just performs 
those redirects.  Because it wouldn't actually serve up the traffic -- 
just redirects -- I don't think it'd end up using much data (which makes 
using, eg Amazon cheaper).

But maybe the effort is better expended in getting people still pointing 
at download.zeromq.org to update their download URLs.  (Eg, I can file a 
ticket for MacPorts once there's a clear answer for what to tell them 
for updates.)

Ewen

PS: IIRC Amazon free tier runs out on using up a certain number of 
credits _or_ a certain amount of calendar time (a year?), so if it was 
set up with a free tier instance it'd eventually die if not converted to 
a paid service.  But a paid service just serving redirects is hopefully 
cheap.

Or maybe someone on the list could host a redirector.  lighttpd 
mod_redirect might have sufficient flexibility:

http://redmine.lighttpd.net/projects/1/wiki/docs_modredirect

but I've not used it for this sort of "complex" redirect myself.  And 
nginx rewrite serving up a redirect response in theory should work:

https://www.nginx.com/blog/converting-apache-to-nginx-rewrite-rules/
https://www.nginx.com/blog/creating-nginx-rewrite-rules/
http://nginx.org/en/docs/http/ngx_http_rewrite_module.html

but I've also not used it for anything this complex myself.



More information about the zeromq-dev mailing list