Q
Get started Bring yourself up to speed with our introductory content.

Does AWS CloudFront work with static and dynamic content?

Dan Sullivan reviews AWS CloudFront and the two types of content it works with, static and dynamic.

AWS CloudFront works with both static and dynamic content.

CloudFront is Amazon's content delivery network (CDN). As with other CDNs, Amazon has multiple data distribution points around the globe. When a user selects content from your website or application, CloudFront routes the request to the distribution point with the lowest latency. What happens next depends on whether the content to be delivered is static or dynamic.

Static content is served from Amazon Simple Storage Service (S3). Since the content does not change, CloudFront can keep copies of static webpages and serve them directly from S3. Amazon S3 is a global resource, meaning the CloudFront distribution points can retrieve content from the closest S3 point (assuming it has the lowest latency).

Websites have become more dynamic and generate content specific to users. For example, dynamic content might include a mix of products recommended for a particular customer or a set of news stories tailored to one person's interests. Clearly, you do not want to have your application generate all possible dynamic pages and then store them on S3. Pages are better generated on the fly.

When pages are generated dynamically, they cannot be stored in multiple locations. Instead, AWS CloudFront uses a cluster of servers and Elastic Load Balancing, or ELB, at the point of origin. These servers are configured to generate content and scale with demands for dynamic content. The dynamic content is then routed in the most efficient way to the client device through a distribution point. Amazon implements TCP optimizations between the distribution point and the client device. It also optimizes the route between the point of origin of the dynamic content and the distribution point by maintaining persistent connections.

Although static and dynamic content are retrieved from separate resources, both are supported in a single CloudFront supported domain. Amazon charges the same rates for both static and dynamic content.

This was last published in September 2014

Dig Deeper on AWS tools for development

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Join the conversation

1 comment

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

For which type of content do you use AWS CloudFront: static or dynamic?
Cancel

-ADS BY GOOGLE

SearchCloudApplications

TheServerSide.com

SearchSoftwareQuality

SearchCloudComputing

Close