简体   繁体   中英

Amazon S3 + CloudFront Queries

I am currently making a social sharing like app and I encounter a problem.

First off, S3 in my experience is slow, so I need to sync the data for multiple servers around the world to make it faster for multiple users.

So my question is, I need to create multiple buckets for each country right? Amazon has a list of their server locations. So for each user, I calculate the nearest server than upload there? How?

Next question, in my app people can subscribe to others and check for their updates. So realistically, this would not create a speed difference. If someone in Singapore uploaded a piece of text and has a subscriber in United States, it wouldn't be any quicker for this subscriber because he has to download a piece of text stored all the way in the Singapore.

All of this is making me confused! I personally find S3 very slow, which is why I am using CloudFront.

Any help? Am I misunderstanding the process? Thanks!

Buckets are not per country, they are per region (EU, US, Asia, etc.)

Secondly, you do not have to manage closest URL to your S3 buckets, that's what CloudFront is for, you just get a single URL for each bucket and CloudFront will manage routing the user's request to the closest edge location.

PS: In addition, Amazon replicates data uploaded to your bucket across all edge locations transparently.

Amazon in no way "automatically" replicates your content out to the edge locations. Instead, your content is copied to a single edge location, if (and only) if the content is not there (could be the first pull, could be it's expired) when a user tries to access it from that edge. It is a pull mechanism, not a push. See "Download Distributions for HTTP Delivery" section of http://aws.amazon.com/cloudfront/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM