CDN is Content Delivery Network. Focus on distributing and accessing static resources, such as an image, a text file, a video, a CSS, a JS, and so on. The application server and the resource server should be decoupled, meaning that the application server only handles the logic, while the resource server houses the content, or resources. There are specializations, and mixing them together can slow down the application server. \

For example, the headquarters of KFC is in the United States, but there is also a KFC downstairs in your house, and the hamburgers are identical, this is the CDN (this metaphor comes from Zhihu, feel very appropriate). KFC has deployed many CDN to provide services around the world. Users find the nearest store. This calculation process is called “nearby access”. \

\

There are two KFC in a business district. One organizes an activity and eats chicken legs freely, so all the customers rush to this store, which is already packed, while the other store is empty. At this time, the CDN’s scheduling function will come into play, another restaurant also released a message saying, buy a burger, 50% off. At this time, the customers who could not get the drumsticks in the first store immediately went to the second store, and the flow of the two stores was in equilibrium. This is the scheduling of THE CDN.

\

KFC headquarters in the United States developed a new dish, called “twizzed-pot meat burger”, this time the headquarters to distribute this “content” to the world, so that every branch, can start to sell twizzed-pot meat burger, so that the new and old products can keep pace, this is the content distribution network “distribution”. When you want a twice-cooked pork burger, you can just go downstairs. To sum up, CDN is a method of distributed storage and backup of resources.