AWS CloudFront (CDN – Content Delivery Network)
AWS CloudFront (CDN – Content Delivery Network)
In this article, we will see about AWS CloudFront (CDN – Content Delivery Network)
What is AWS CloudFront?
CloudFront is a CDN (Content Delivery Network). It retrieves data from the Amazon S3 bucket and distributes it to multiple datacenter locations. It delivers the data through a network of data centers called edge locations. The nearest edge location is routed when the user requests for data, resulting in the lowest latency, low network traffic, fast access to data, etc.
Amazon CloudFront is a fast content delivery network (CDN) service that securely delivers data, videos, applications, and APIs to customers globally with low latency, high transfer speeds, all within a developer-friendly environment. CloudFront is integrated with AWS – both physical locations that are directly connected to the AWS global infrastructure, as well as other AWS services. CloudFront works seamlessly with services including AWS Shield for DDoS mitigation, Amazon S3, Elastic Load Balancing, or Amazon EC2 as origins for your applications, and Lambda@Edge to run custom code closer to customers’ users and to customize the user experience. Lastly, if you use AWS origins such as Amazon S3, Amazon EC2 or Elastic Load Balancing, you don’t pay for any data transferred between these services and CloudFront.
AWS CloudFront delivers the content in the following steps.
Step 1 − The user accesses a website and requests an object to download like an image file.
Step 2 − DNS routes your request to the nearest CloudFront edge location to serve the user request.
Step 3 − At edge location, CloudFront checks its cache for the requested files. If found, then returns it to the user otherwise does the following −
First CloudFront compares the request with the specifications and forwards it to the applicable origin server for the corresponding file type.
The origin servers send the files back to the CloudFront edge location.
As soon as the first byte arrives from the origin, CloudFront starts forwarding it to the user and adds the files to the cache in the edge location for the next time when someone again requests for the same file.
Step 4 − The object is now in an edge cache for 24 hours or for the provided duration in file headers. CloudFront does the following −
CloudFront forwards the next request for the object to the user’s origin to check the edge location version is updated or not.
If the edge location version is updated, then CloudFront delivers it to the user.
If the edge location version is not updated, then origin sends the latest version to CloudFront. CloudFront delivers the object to the user and stores the latest version in the cache at that edge location.
Features of CloudFront
Fast − The broad network of edge locations and CloudFront caches copies of content close to the end-users that results in lowering latency, high data transfer rates and low network traffic. All these make CloudFront fast.
Simple − It is easy to use.
Can be used with other AWS Services − Amazon CloudFront is designed in such a way that it can be easily integrated with other AWS services, like Amazon S3, Amazon EC2.
Cost-effective − Using Amazon CloudFront, we pay only for the content that you deliver through the network, without any hidden charges and no up-front fees.
Elastic − Using Amazon CloudFront, we need not worry about maintenance. The service automatically responds if any action is needed, in case the demand increases or decreases.
Reliable − Amazon CloudFront is built on Amazon’s highly reliable infrastructure, i.e. its edge locations will automatically re-route the end users to the next nearest location, if required in some situations.
Global − Amazon CloudFront uses a global network of edge locations located in most of the regions.
0 comments
Please leave your comments...... Thanks