Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Host files in multiple S3 regions #42

Closed
leezu opened this issue Apr 20, 2018 · 13 comments
Closed

Host files in multiple S3 regions #42

leezu opened this issue Apr 20, 2018 · 13 comments

Comments

@leezu
Copy link
Contributor

leezu commented Apr 20, 2018

Downloading files from S3 hosted in the US can be painfully slow from Hong Kong (and likely mainland). @szha can we easily host them in a second region?
In my experience the bandwidth to Europe is good, in case that the Hong Kong region is not yet ready.

@szha
Copy link
Member

szha commented Apr 20, 2018

I always keep the global s3 in sync with the China s3 mirror

@szha
Copy link
Member

szha commented Apr 20, 2018

the global s3 is backed with s3-accelerate, which already utilizes all cloudfront edge locations.

@szha
Copy link
Member

szha commented Apr 20, 2018

Try export MXNET_GLUON_REPO=https://apache-mxnet.s3.cn-north-1.amazonaws.com.cn/

@leezu
Copy link
Contributor Author

leezu commented Apr 20, 2018

Thanks, it's great you already thought about this issue and that there is already a solution!
What do you think about putting that behind Cloudfront. If I understand correctly we may use a single link then and the correct region will be selected automatically based on the source of the request.

@szha
Copy link
Member

szha commented Apr 20, 2018

Due to regulation in China, it requires a business entity and registration with the government to set up CDN in China.

@szha
Copy link
Member

szha commented Apr 20, 2018

Also, China AWS accounts are separate from global AWS accounts, so we would at least need to cloudfront end points. Then we would need DNS magic to point to the right endpoint, so I haven't gone through that route yet.

@leezu
Copy link
Contributor Author

leezu commented Aug 16, 2018

Btw, the China S3 mirror also slow in Asia-Pacific region outside of mainland (eg. HK).

@szha
Copy link
Member

szha commented Aug 16, 2018

@leezu how's the speed with the global repo? Tokyo/Singapore edges might be fast.

@leezu
Copy link
Contributor Author

leezu commented Aug 16, 2018

That works. I had some speed issues but in the end a VPN is at fault. Sorry about the noise.

@eric-haibin-lin
Copy link
Member

Is this issue resolved?

@leezu
Copy link
Contributor Author

leezu commented Dec 13, 2019

I think the current S3 Accelerate approach is sufficient. AWS recently added CloudFront endpoints in Hong Kong and mainland China.
S3 Accelerate doesn't make use of the endpoints in mainland China though, but maybe they will in the future.

Do we have any reports of trouble downloading in China? I'll close this for now, but let's reopen once we have more evidence of the issue.

@leezu leezu closed this as completed Dec 13, 2019
@szha
Copy link
Member

szha commented Dec 13, 2019

@leezu they won't. China is a separate region entirely and there's no data exchange with the global region except on the public network.

@leezu
Copy link
Contributor Author

leezu commented Dec 14, 2019

Cloudflare does, so I think Cloudfront will need to do eventually as well. Cloudflare advertises this feature heavily https://www.cloudflare.com/network/china/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants