CDN knowledge,
Why is there a good market for CDN to focus on providing this service? Or what happens if there is no CDN network?
The first thing to say is that the application server and the resource server should be decoupled, that is, the application server only processes the logic, and the resource server stores the content or resources. There are specializations in the industry. mixing them together will slow down the speed of application servers. If CDN is not used to handle resources, all resources may be deployed far away from users, which will not guarantee the user experience, professional CDN service providers are dedicated here, and their costs are constantly decreasing, just as many of the company's peripheral products are outsourced and can be done by themselves, however, companies specializing in the production of gifts will be more efficient, professional, and cheaper, without consuming the company's human resources.
Suppose you are starting a business. If you only rent one server and put the resources on the server, the experience for users nationwide will be far from that for users throughout the country, if the server is located in Beijing, users in Guangdong will have to go a longer way and cannot handle cross-carrier access and other issues.
What is the CDN principle? Why can a user access the server closest to him? This issue has previously been described. It mainly uses DNS to determine the user location and then returns the resource address to the server of the nearest data center.
KFC is headquartered in the United States, but there is also a KFC downstairs in your house, and the hamburger is exactly the same. This is CDN (this metaphor comes from zhihu and I think it is very appropriate ). KFC has deployed many cdns to provide services around the world, and users have found the nearest store. This computing process is just described as "nearby access 」.
There are two KFC stores in one business area, one of which is organized to eat chicken legs at will. Therefore, all the customers arrive at this store, which is no longer accessible. At this time, the CDN scheduling function will play a role. Another store also published a message saying that it would take off to buy a hamburger. At this time, customers who couldn't grab chicken legs in the first store immediately ran to the second store. At this time, the traffic of the two stores was balanced. This is CDN scheduling.
The KFC headquarters in the United States developed a new dish called "back-to-pot meat burger". At this time, the headquarters will distribute the "content" to the whole world so that every branch can start selling back-to-pot Meat burgers, this is the "distribution" of the content delivery network 」. At this time, you can go directly to the downstairs of your house when you want to eat a hamburger.
To sum up, CDN is a method for storing and backing up resources in a distributed manner.