
Use a CDN for Static Resources
May 7, 2025About 3 min
Use a CDN for Static Resources 관련
The Front-End Performance Optimization Handbook – Tips and Strategies for Devs
When you’re building a website, you’ll want it to be responsive, fast, and efficient. This means making sure the site loads quickly, runs smoothly, and provides a seamless experience for your users, among other things. So as you build, you’ll want to...
The Front-End Performance Optimization Handbook – Tips and Strategies for Devs
When you’re building a website, you’ll want it to be responsive, fast, and efficient. This means making sure the site loads quickly, runs smoothly, and provides a seamless experience for your users, among other things. So as you build, you’ll want to...
A Content Delivery Network (CDN) is a set of web servers distributed across multiple geographic locations. We all know that the further the server is from the user, the higher the latency. CDNs are designed to solve this problem by deploying servers in multiple locations, bringing users closer to servers, thereby shortening request times.
CDN Principles
When a user visits a website without a CDN, the process is as follows:
- The browser needs to resolve the domain name into an IP address, so it makes a request to the local DNS.
- The local DNS makes successive requests to the root server, top-level domain server, and authoritative server to get the IP address of the website's server.
- The local DNS sends the IP address back to the browser, and the browser makes a request to the website server's IP address and receives the resources.
If the user is visiting a website that has deployed a CDN, the process is as follows:
- The browser needs to resolve the domain name into an IP address, so it makes a request to the local DNS.
- The local DNS makes successive requests to the root server, top-level domain server, and authoritative server to get the IP address of the Global Server Load Balancing (GSLB) system.
- The local DNS then makes a request to the GSLB. The main function of the GSLB is to determine the user's location based on the local DNS's IP address, filter out the closest local Server Load Balancing (SLB) system to the user, and return the IP address of that SLB to the local DNS.
- The local DNS sends the SLB's IP address back to the browser, and the browser makes a request to the SLB.
- The SLB selects the optimal cache server based on the resource and address requested by the browser and sends it back to the browser.
- The browser then redirects to the cache server based on the address returned by the SLB.
- If the cache server has the resource the browser needs, it sends the resource back to the browser. If not, it requests the resource from the source server, sends it to the browser, and caches it locally.
::: ino References:
Content delivery network - Wikipedia
A content delivery network (CDN) or content distribution network is a geographically distributed network of proxy servers and their data centers. The goal is to provide high availability and performance ...
How to Use CDNs to Improve Performance in your Front-end Projects
In web development, styling plays a crucial role in the visual presentation of web applications. According to a study by Adobe, 59% of users would choose a beautifully designed website over a “simple and plain” design. So designs that are crafted in ...
:::