preface

Is the so-called, their own flag, tearful also want to achieve.

Front-end Caching Best Practices

In my opinion, CDN is composed of servers scattered all over the place. Users can access the nearest node when they visit, so as to realize acceleration.

Inadequate level, how to dissect? I’ll tell you a story! Do not spray if you do not like it.

Tell a story

A long time ago, there was a boss named Xiao Dong. He liked milk tea very much, especially the milk tea on the campus of Tsinghua University.

One day, the boss in Guangzhou suddenly wanted to drink milk tea, so he asked his secretary to buy a cup of Qinghua brand milk tea. However, the boss waited for a long time, still did not see the cup of milk tea, until it was dark, the secretary did not buy back. BOSS is very angry, furious: I am so thirsty, you just come back!

The secretary feels very aggrieved! Without stopping, without taking a breath, he galloped back! I can’t believe you hate me for being slow. So the secretary told the boss all the hard work:

I got the milk tea and came out of Tsinghua university. Have you ever been to Tsinghua University? That door, so small, there are so many people lined up to visit, people mountain sea ah! Finally, I came out of Tsinghua, took a taxi and went straight to the airport. All the way to listen to the song of the five rings to the airport, GG, the plane late ah! Well, the plane finally took off. Fly ah fly, to Guangzhou, or called a taxi, ha ha, met the rush hour ah, traffic jam! For the last kilometer, the taxi couldn’t get in, so I stepped on an Ofo and lost the chain. Finally, I ran to get there. You see, I am not easy!

The boss thought, it is really not easy, good at analysis, he summed up the main problem:

  • Kilometre one: The door is too small and there are too many people
  • Change of transportation: The plane is late and there is a wait
  • City traffic hub: traffic jam, can’t help it
  • Last mile: The road is too small, so you can only ride a bike

Keen on drinking milk tea, he could not bear these problems! So he said to the secretary, I have money, you help me think of a way to solve these problems, I hope that no matter where I am next time, can drink milk tea for the first time!

Money makes things easy. The secretary had a brainwave and bought the milk tea brand directly. Then we set up milk tea warehouses in all the places the boss frequented, and hired a chief distribution officer to deliver the latest milk tea distribution from the headquarters to the warehouses in each place on a regular basis. The secretary also hired a chief scheduler. Every time the boss needed milk tea, the secretary asked him to go to the most suitable warehouse. In this way, the secretary can get the boss’s milk tea as quickly as possible.

When the boss saw the result, he was very happy. Such a great set, always give him a shocking world qiguishen title, think about it, this is a special transmission of my small east to drink milk tea scheme, called “spread east milk”. The secretary can not help laughing out, how can so low! The secretary once again show his wisdom and wisdom, say: boss, we want to be in line with international standards, take a lofty name, not equal to pinyin abbreviation, call CDN. Boss clap leg praise: good!

However, this routine also has its disadvantages, that is, there will be a delay problem, in a certain period of time, the milk tea in the local warehouse is not the latest. This didn’t seem like a big deal, but it really put the boss through hell! Once in the United States, suddenly want to drink milk tea, so in the local warehouse to take a cup of herbal milk tea, the result is not fresh, drinking poison. It is said to have been poisoned by a poison called fairy jump. Oh, the pain!

Declare: the above story is pure fiction, if there are similarities, pure coincidence!

What exactly is a CDN?

The full name of CDN is Content Delivery Network.

The basic idea is to avoid the bottlenecks and links that may affect the speed and stability of data transmission on the Internet as far as possible, so that the content transmission is faster and more stable. Through the server placed throughout the network node of a layer of intelligence on the basis of the existing Internet virtual network, CDN system can in real time according to the network traffic and each node connections, load condition and to the user’s distance and comprehensive information such as response time will the user’s request to guide users closest service node.

Its purpose is to enable users to obtain the content needed nearby, solve the situation of crowded Internet network, improve the response speed of users to visit the website.

If you want to learn more, check out the reference article. This aspect dabble not deep, I will not teach a fish to swim!

Refer to the article

  • What is a CDN?
  • CDN technology details

conclusion

Suddenly think of a word: the sun has become slow, car, horse, mail are slow, life is only enough to love a person.

Above, if there are mistakes, welcome to correct!

@ the Author: TDGarden