Rubygems.org: International Mirrors

Created on 23 Jan 2014  路  23Comments  路  Source: rubygems/rubygems.org

I've been travelling across Australia and South-East Asia in the past 18 months and installing Gems was quite a hassle sometimes. Currently, I'm located in Vietnam which has particularly bad international internet connections. I reckon that the major problem is the huge latency to the S3 storage backend in the US.

I think it would be a great improvement to provide the possibility of regional mirrors for the data and it would be another step to a mature Ruby world.

I'm certainly not the only one who is keen to make this happen.

Have there been plans like this already?

health

Most helpful comment

fastly is almost blocked in China and we have launched two mirror sites for gem download speed up:

  1. https://gems.ruby-china.org/
  2. https://ruby.taobao.org/

All 23 comments

Awesome, thanks for pointing me to the code. What would I have to do to add
a mirror?

Talk to @evanphx

It's something that we setup ourselves, so that we can be sure they're maintained at the proper quality. We redirect people to them via geoip. It's possible that Vietnam is not in the geoip list and defaulted to going back to US East.

Hi there, I'm wondering how would you guys sync the data to theses mirrors? I have observed the phenomenon that not all the mirrors under *-m.rubygems.org is 100% perfectly synced.

And how you can use custom sitename with S3 bucket with SSL (like https://tokyo-m.rubygems.org, but not https://<bucket-name>.s3.amazonaws.com/). Do you use ec2 instance in front of each region site and provides the custom ssl certificate?

If I can provide a S3 like storage in China (Using Aliyun OSS), is it possible to add this to your mirror list for CN? I have bootstrap one, but not perfectly synced yet, just for a test(https://rubygems-china.oss.aliyuncs.com/)

By the way, I'm in charge of https://ruby.taobao.org now. I'm willing to help for improving the gem speed in china

Pinging @rubygems/infrastructure, any details we can share on mirroring here?

Yeah, we need to compile and share the details. We also need to cleanup the config for all the mirrors. Maybe this is something we can tackle after Christmas.

is there any updates? @dwradcliffe

@dwradcliffe isnt this done already?

@arthurnn It looks like it is not.

Nope, sorry, nothing changed here yet. This is pretty much on hold until RailsConf.

What's left on this? Should this issue be in rubygems/rubygems-aws instead?

Our plan is to shut down the artisanally created mirrors and move more of our traffic behind Fastly's network. This will put more data at the edge locations which should be faster for everyone. This will provide much more value than our mirrors ever did with much greater reliability.

This also paves the way for the new index and dependency api, which is currently under development.

We have a couple hurdles to get though before we can do this, primarily rebuilding our stats system so we can continue to track download stats for gems.

Over the past couple of days, I've been running into a number of 503 errors when trying to install gems to deploy my application - so much that I haven't been able to achieve a single bundle install run without errors.
The errors seem to be coming from Fastly.

Example error messages (from different runs):
actionview

Gem::RemoteFetcher::FetchError: bad response Service Unavailable 503 (http://rubygems.global.ssl.fastly.net/gems/actionview-4.1.4.gem)

marginalia

Gem::RemoteFetcher::FetchError: bad response Service Unavailable 503 (http://rubygems.global.ssl.fastly.net/gems/marginalia-1.1.5.gem)

Any idea how I could work around these issues (apart from retrying?)

@quentindemetz We're working with Fastly right now to figure out what is happening. Unfortunately I don't have a workaround for you right now. :(

@quentindemetz we rolled out a change yesterday that should have helped

Tried once, it worked flawlessly! Obviously not statistically significant, but I'll let you know if I run into any issues going forward.

fastly seems to be a bit intermittent as I just tried it now and it's gone through where a few minutes ago threw a 503 error.

Fastly has been stable lately and we have much better worldwide coverage than in years past. We're rolling out more Fastly things soon which will make everything even faster. I'm going to close this since we're not pursuing any other mirrors at this time.

fastly is almost blocked in China and we have launched two mirror sites for gem download speed up:

  1. https://gems.ruby-china.org/
  2. https://ruby.taobao.org/

I still wonder why can't rubygems.org setup rsync and provide access to those wanna setup a mirror like those setup for Linux distributions.

Provided that Fastly, S3, Google CDN, MaxCDN, KeyCDN, Cloudfront or whatever are robust enough, however for mainland Chinese, all these non-local CDNs have been blocked due to some political websites using these services to propagate anti-government contents. Fastly is just equate to Slowly.

Please consider rsync support.

@cicku this is a closed issue. If you are having problems and want our help to try to fix them, feel free to open an issue of your own.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

colby-swandale picture colby-swandale  路  6Comments

mdesantis picture mdesantis  路  5Comments

matthewd picture matthewd  路  5Comments

nyaapa picture nyaapa  路  4Comments

suriyaa picture suriyaa  路  7Comments