Limited Time Free!  Sign up for 1TB of data transfer and get free trials of WAF and Bot Management!
Get Started Now 
Tencent EdgeOne Blog
Tencent EdgeOne Blog
Tech

How to Configure EdgeOne Cache?

Tencent EdgeOne - Product Manager

Tencent EdgeOne is Tencent Cloud’s security and site acceleration solution for the global market built on Tencent’s edge node network. This article will walk us through the steps to create your first EdgeOne caching configuration. We’ll start with a review of what caching is, followed by a brief glossary of important terms.

What is Caching

Caching is a fundamental part of computing and networking, yet it is often misunderstood. There’s a famous quotation from Phil Karlton, “There are only two hard things in Computer Science: cache invalidation and naming things,” which touches on the idea that caching is difficult. Fortunately, Tencent EdgeOne’s CDN platform makes caching straightforward to use and abstracts the complexities that make Karlton’s words true to this day. But first, what is caching exactly and why is it helpful? As usual, an analogy probably works best.

Let’s pretend that you’re in search of a particular book at the library. You walk in and ask the librarian for the title. Because this particular library lacks the Dewey Decimal System, the librarian begins to search through every shelf and corner of the library. The process takes longer than you would like, but they eventually find it.

The next day, someone else comes into the library and asks for the same exact book. Again, the librarian must search every shelf and corner until they find the title. This is starting to become quite tedious, so they wonder if there’s a faster way to find and deliver books to customers.

They devise a new system where they track how popular each book is by keeping a tally on a piece of paper. Every time someone requests Book A, its count increases by one. And every time someone requests Book B, its count also increases by one. The librarian decides to keep the top 10 most popular books on a shelf near the front door of the library. By doing so, they greatly improve the efficiency of the finding and delivering process. They can find the requested book faster because it’s on a small shelf with only 10 books on it. And they can deliver the book faster because the shelf is near the front door, which removes the need to walk through long hallways and up and down flights of stairs.

Content Delivery Networks (CDNs) work in a very similar way. They intelligently keep track of how often web resources (HTML, CSS, images, video, etc.) are requested by clients, such as web browsers, smartphones, etc. They then temporarily store (a.k.a. cache) the most popular web resources on servers near the client, much like how the librarian stored the most popular books on a shelf near the front door. CDNs also have the benefit of dealing with digital content, so they can easily make copies of web resources and store them on “shelves” around the world, benefiting clients who may be located far away.

Now, let’s walk through how to configure the cache in Tencent EdgeOne.

Glossary

  • Resource - the file requested by end users. Common examples are HTML, CSS, images, and video. Keep in mind that it's possible to request a subset of a resource using an HTTP range header
  • Origin - where you upload your resources and where EdgeOne will download resources from
  • DNS record - this defines the specific network location behind a hostname such as example.com
  • example.com is the site domain name for your EdgeOne caching configuration
  • image.jpeg is the asset we will download from the EdgeOne

Configure cache in EdgeOne

  1. Log in to the Tencent Cloud console.
  2. Select Tencent Cloud EdgeOne from the list of products.
  3. Select Site List from the left-side panel and click New Site
  4. Enter the domain name, e.g., example.com
  5. Select the appropriate payment plan
  6. Select the acceleration area
  7. Verify ownership of your domain, example.com, by creating a TXT record at your DNS registrar
  8. Select Domain Name Service from the left-side panel and then Domain Management. Press Add domain name. For example, test.example.com, or if you simply want to use the root, example.com, enter @
  9. If desired, select a template Rule Engine configuration. You can also create your own by navigating to the Rule Engine page in the EdgeOne console
  10. Make note of the CNAME that is generated (e.g., example.com.eo.dnse5.com)
  11. At your DNS registrar, create a CNAME record to point example.com to the generated CNAME (example.com.eo.dnse5.com)
  12. Download the asset at the URL example.com/image.jpeg in your web browser

Good job! You now have your first caching configuration. From here, you can explore other features such as image optimization, file compression, cross-border acceleration, custom Rules, Edge Functions, etc. by navigating to the left-side panel in the console.

Author

Ray Fung is a Solutions Architect at Tencent. He is a member of the Tencent Cloud International team and focuses on the EdgeOne service for customers based in North America. His area of expertise encompasses content delivery for video (VOD and live streaming) and game/software downloads and has worked with some of the most recognized media companies including Disney+, HBO, Prime Video, NFL, Microsoft, and Valve.


Tencent EdgeOne is an integrated security and acceleration platform based on 3,200 Tencent Cloud edge nodes worldwide. It supports domain name resolution, dynamic/static content acceleration, L4 TCP/UDP acceleration, DDoS mitigation/CC protection/Web application firewall/Bot protection, edge function compute, and more. It helps customers respond to user requests more quickly, securely, and flexibly.

Don't miss out on exclusive content - follow us!

follow us on xfollow us on youtubecontact us now
EdgeOne