Search code examples
iphoneobjective-camazon-web-servicesamazon-s3amazon-cloudfront

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!


Solution

  • 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.