First, let’s introduce what a CDN is, CDN or Content Delivery Network is a network of servers that are distributed globally throughout the world. One of its functions is file caching, where static or unchanging files such as js, css and images on the website will be stored on the CDN server.
For example:
- Not using CDN
If I create a website with a server located in America and try to access it
from Indonesia, there will be a fairly long delay. Because the distance is
too far. - Using CDN
On the other hand, if you use a CDN and try to access it from Indonesia, it will feel fast. Because static files such as JS, CSS and Images will be stored on the server closest to us, namely Singapore. Then what if accessed from another country? keep in mind that CDN servers are spread all over the world, on every continent.
So, wherever we access it, it will take content from the closest server.
There are several other CDN providers besides CloudFront such as Cloudflare, CacheFly, Akamai, Edgecast, Fastly and many more. Some CDNs are Free and some are Paid. Cloudflare is one of the powerful CDN providers because of its Unlimited Bandwidth and of course free. While Cloudfront initially limited Bandwidth to only 50 GB and only got free facilities for the first 1 Year. If more than that then a fee per GB of bandwidth will be charged which is quite expensive. But now we can
get 1TB free every month and it is valid forever, there is no longer a limitation of 1 first Year of use. But still, if the usage is more than that, a separate fee will be charged.
From the picture above, it can be seen that the cost is quite high if the usage is more than 1 TB.
Actually, there are other costs, but if we talk about Tunneling, then the Bandwidth that comes out is the point. For example, for the Indonesian region only, for the price per GB of the first 10TB usage, the cost is $0.120 per GB, if it is over 100 GB, it becomes 100 x $0.120 = $12. What if it is over 1TB? around $120 is needed.