Search code examples
amazon-s3amazon-web-servicescdnamazon-cloudfront

Amazon S3 & CloudFront


I want to combine Amazon S3 and CloudFront for geographical distribution of user requests. Will it provide improvements?

Thanks.


Solution

  • It will most likely provide significant improvements, after all, Amazon CloudFront is a Content delivery network (CDN) and geographical distribution of user requests is one of the main goals of a CDN:

    Amazon CloudFront is a web service for content delivery. It integrates with other Amazon Web Services to give developers and businesses an easy way to distribute content to end users with low latency, high data transfer speeds, and no commitments. [emphasis mine]

    This is achieved by delivering your static and streaming content using a global network of edge locations:

    Requests for your objects are automatically routed to the nearest edge location, so content is delivered with the best possible performance. Amazon CloudFront is optimized to work with other Amazon Web Services, like Amazon Simple Storage Service (S3) and Amazon Elastic Compute Cloud (EC2). [...] [emphasis mine]

    CloudFront retrieves its content from a so called Origin Server, and you specify the origin server either as an Amazon S3 bucket, or as a custom origin. There is an Architectural Overview illustrating this concept as well.

    You can see the ever growing list of edge locations on the Global Infrastructure map and deduce a rough estimate whether it will provide respective benefits for your use case already; as usual this depends on many details, mainly the location of your S3 bucket(s) vs. the location of your users and the available bandwith between these two (e.g. there is no edge location in Russia yet, still those in the middle of Europe or the one in Stockholm, Sweden could be notably 'closer' already than a S3 bucket hosted in Dublin, Ireland alone).

    Finally, it is worth noting that the same latency based routing technology that powers Amazon CloudFront is meanwhile available for custom use via Amazon Route 53 as well, see the respective introductory post Multi-Region Latency Based Routing now Available for AWS for details.