What is AWS CloudFront?
Previously, we have got the idea about the S3(Simple Storage Service) of AWS and now we are going to discuss one of the best services i.e. AWS CloudFront. You may have listened about this service and wondered what is AWS CloudFront?
Before directly jumping to the CloudFront make sure that already have knowledge about the S3 and some other basics of AWS. In case you don’t have any idea that you can follow this link.
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 created technically known as Edge locations. According to the AWS global infrastructure, there are 210+ edge locations and 12 regional edge cases.
Before discussing much the use cases and benefits let’s understand why 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 we get to stand 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, and 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 the client is accessing the data from a very long distance. But in CloudFront, there are different-different edge locations that are meant to store the caches, we store 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.
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 in Mumbai az and people accessing globally will get the image the first time from your data center but after that, if somebody requests, that will be provided by their local edge locations. What if the case somebody update that image? People could not be able to watch new content.
To solve this issue Amazon CloudFront has a property called TTL(Time To Leave). TTL is the time after that catches of data are deleted. And now if somebody requests the data, data it again comes from the Mumbai data center as per our example.
Now, it’s all about your strategy. How you 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 hit 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, this simpler thought process can help in many use cases like
- Live and On demand video streaming: The Amazon CloudFront provide multiple options for streaming the content. Here CDN cache the media fragment and collapse multiple request at local edge and reduce the traffic on origin.
- Security: CloudFront integrates seamlessly with AWS Shield for Layer 3/4 DDoS mitigation and AWS WAF for the Layer 7 protection. Additonally, it also use TLS connections with highest security ciphers.
Customizable content delivery with [email protected]: We haven’t talk about the Lambda yet. But in simpler manner it is service where you can run your code independently. By [email protected], you can run your code seamlessly across the globe. You can read here for more.
Dynamic Content and API acceleration: Amazon CloudFront can be used to secure and accelerate your WebSocket traffic as well as API calls. CloudFront uses optimized AWS backbone network paths to securely and fastly reach your API server. You can read more about API acceleration.
- Software Distribution: Using CDN you can make available your software at the edge where your clients are. This speeds up the availability of your content and also improves the customer experience.
To know detailed information you can follow the official website click here.
AWS CloudFront is really great service and widely used by many companies like Hulu, prime video, slack, canon, and tonnes of others.
In case of any query, you can comment that below or you can connect with the author on
For more such content stay tunned with BrighterBees.
You may want to check our cloud category