Articles

Home / Articles / Cloud Computing / What is Content Delivery Network in AWS | AWS CloudFront

What is Content Delivery Network in AWS | AWS CloudFront

Published on Sept. 13, 2021

A Content Delivery Network(CDN) refers to a group of servers distributed over different locations to provide the content very fast. In AWS, CloudFront is the name of the service that provides the CDN service.

 

What is AWS CloudFront?

AWS CloudFront is a fast content delivery network(CDN) that securely delivers the data, images, videos to the customer globally with very low latency. CloudFront works seamlessly with the different services of AWS like Amazon S3, Elastic Load Balancing(ELB), or any other AWS origins.

 

What is a Content Delivery Network?

A content delivery network (CDN) refers to a geographically distributed group of servers that work together to provide fast delivery of Internet content. In AWS CDN, there are different - different small data centers that are technically known as Edge locations. According to the AWS global infrastructure, there are 210+ edge locations and 12 regional edge cases. Before discussing the use cases and benefits let's understand why to use AWS CloudFront and how this actually works?

 

Why AWS CloudFront?

In this rapidly growing world, everyone wanted to keep themselves one step ahead of their competitor. When we deploy any of our applications, we always have a wish to provide that to the user very quickly. The more fastly and accurately we process a request of our client more chance to stand out in the market.

 

In order to provide the content to the client very quickly with the minimum latency globally, AWS introduced a service called CloudFront that works on CDN. In S3, we can store our static content(better for static) like images, videos. Now, imagine, we selected the Mumbai region at the time of bucket creation. Now if the client request from Australia, he/she have to request to the Mumbai AZ to provide the content again and again. The longer the distance the greater the latency there. Amazon CloudFront is the solution to this. It uses CDN and reduces latency time very much.

 

How AWS CloudFront works?

In the previous example, we have seen a problem when a client from Australia has to access the data from Mumbai AZ which is very long, and creates latency while delivering. Although the internet speed is very fast in AWS still you can easily find delays in content delivery. 

 

In CloudFront, there are different-different edge locations that are meant to store the caches, AWS stores the caches of our data there. Once a client requests the data, the request goes to the local edge location and if the data is not there the edge network locally uses its private network and request to the data center where the data is located. Now, in the same region, if any other client or the same client request again. The data will be delivered from the local edge locations and this time the latency will be very less. This becomes very helpful when you have your client globally.

 

There are some terminologies in CloudFront that can help you to understand CDN in a better way.

 

TTL(Time To Leave)

It is a concept inside the CloudFront used to delete the caches. Suppose, you have uploaded an image on an S3 bucket(a storage service of AWS) in Mumbai az, and for the first time people accessing globally will get the image from your data center but after that, if somebody requests, that will be provided by their local edge locations. What if the case developer updates that image in the Mumbai server? But there is a local cache in every edge location so the people can't able to see the updated images.

 

To solve this issue Amazon CloudFront has a property called TTL(Time To Leave). TTL is the time after that catches of data in the edge locations are deleted. And now if somebody requests the data, data again comes from the Mumbai data center as per our example. Now, it's all about your strategy. How do we plan to manage the caches? Set the TTL according to your needs. By default, the TTL is of 1 day. 

 

Miss or Hit

There is one more concept in Amazon CloudFront and that is miss or hit of request. When somebody requests and that can be filled by the local edge locations this is called a hit. When somebody requests and that can not be filled by the local edge locations, that is called a miss. The more hits you get the lesser latency you face.

 

Use cases of AWS CloudFront

We have already understood the simple thought process behind this service of AWS. Now, you can easily understand the below-mentioned use cases:

To know detailed information you can follow the official website click here.

 

Final Voice

AWS CloudFront is really great service and is widely used by many companies like Hulu, prime video, slack, canon, and tonnes of others. We have discussed each and every important fact about CloudFront. Hope you understand well, in case you have any doubt you can contact me on Twitter.

 

···