Faster RubyForge, faster RubyGem installs

03 Nov 2005

Thanks to Chad Fowler for coordinating this operation - RubyGems are now being served by mirrors, not by RubyForge itself! You can see the discussion of how this works, and there's also a nice chart of the traffic reduction.

This works because the RubyGems client follows HTTP 302 redirects, and so all we had to do - again, Chad's idea - was put a rewrite rule into the gems.rubyforge.org virtual host, like this:

RewriteMap gemmirrors rnd:/usr/local/apache/conf/gemmirrors.map
RewriteRule ^/gems/(.*) http://${gemmirrors:server}/gems/$1 [R]

So all the mirrors listed in gemmirrors.map get randomly selected; when someone else volunteers to be a mirror, we just drop them in the map file. Good times.

James Britt suggested that this get written up in a document somewhere; I've started work on that in the "RubyForge Mirroring" document. And as always, folks hosting the mirrors are given credit. Thanks everybody!