When you build solutions that have users in many different countries or geographies, caching is one of the considerations in the solution architecture on the Cloud. The concept of Edge Location and Regional Edge Location are two very strange concepts and may make you confuse or think they are the same. Actually not so, in this article let’s learn about the difference when mentioning Edge Location and Regional Edge Location.
Edge Cache Location
Edge Location is where your data is stored closer to the user, ensuring performance and speed of access instead of the user having to access the data origin all the time. This can be time consuming and reduce the user experience.
For example, you have a website in Singapore Region, users around Singapore can access it very well because of its geographical proximity. But besides that you have a group of customers in the US and also need access to this website.
- At this time, US customers will by default send HTTP requests and receive HTTP Responses on a US-Singapore round trip. It’s been a long time and it doesn’t seem reasonable, right?
- You can completely deploy a clone system similar to Singapore in the US, but this is expensive and has to maintain replication between 02 regions. This is not always an option.
- The most common way is that we implement a cache in the US, which stores the most frequently accessed objects or data. When users in the US access it, they will get data in Local America, any data that is not available in the US will be retrieved to Origin in Singapore.
This is the mission of Edge Location. AWS offers Amazon Cloudfront service that allows you to configure caching for your application easily.
Regional Edge Cache Location
Regional Edge Location is a feature of CloudFront introduced in 2016 to improve performance and user experience when using. The goal of the Regional Edge Location is also to limit the user hitting their Origin a lot, optimizing the round trip of the data. But the biggest difference is:
- The Regional Edge Location is located between the Edge Location and the Origin. If there is an object in the Edge Location whose popularity has decreased, it can be moved to the Regional Edge, so that the object is stored longer instead of being discarded so that it has to be traced back to the origin next time.
- The Regional Edge Location is designed to be larger than the “bigger cache”. That way CloudFront keeps more content closer to the user.
Regional Edge Location is a feature that is automatically enabled and does not charge for use.
Hope this article helps you to clarify the difference between Edge Cache and Regional Cache when using Amazon CloudFront.