From browser input url to page loading (6) Little knowledge of routers and optical fibers that the front end must understand

foreword

In the last chapter, we talked about the story of the data packet in the network cable, about the twisted pair , and about the twist . This chapter continues to go down this line, and talk about some small knowledge related to CDN and routers, operators and optical fibers, which front-end students should understand

 

Table of contents

foreword

1. Is there any relationship between CDN and router?

2. Can your computer directly access the Internet?

3. Operator's manhole cover

4. Communication line service 

5. Summary


1. Is there any relationship between CDN and router?

When we do front-end development, we often talk about the topic of CDN acceleration , which means that for example, when our website is deployed in a county, when people in the village visit the website, they need to send request data, enter the url, and then request to start from the production team and arrive at the village . We went to the township, then went to the county , finally found the server, accessed the content of the website, and then the data returned to the production team from the county, and then the corresponding web page content was displayed on our mobile phone.

This must be a long way, so in order to solve this problem, a service provider appeared in the county to provide CDN acceleration services . They have deployed CDN caching nodes in 18 towns and towns in the county. Every time the county upgrades its website, it deploys the latest content to the CDN caching nodes in 18 towns and towns. In this way, when we are in our own home, when we send out a request, we will directly request the data in our own township. Isn't this very fast? Therefore, if this CDN service provider is strong enough, it can also deploy nodes to 193 storage brigade secretaries in the county, so that we can access the website faster at home .

In the process of data electrical signal transmission, the request packet is sent from the village to the township, and from the township to the county. We know that each data direction is determined by the router based on the configuration information. Therefore, after the router and CDN server are configured, the router will know how to dispatch to the appropriate cache server. Of course, the router can also allocate according to the proximity between the user and the server, the device status of the server, and so on.

When answering CDN questions, if you can talk about some router knowledge points by the way, it will be absolutely useful. But it doesn't rule out that the interviewer doesn't know about this, thinks you are talking nonsense, and then concludes that your answer is not good.

 

 

2. Can your computer directly access the Internet?

Many times, such as personal computers in the company, there is no public address , which means that your personal computer is not actually directly connected to the Internet.

Generally, we use the company's computer to look up information on the Internet, and go to CSDN to find codes. In fact, we must go through the company's large router equipment. But at home, if your network cable is directly plugged into the computer, you have actually configured TCP/IP information for your computer, which is equivalent to having a public address for your computer at home. But on the company's computer, this public address will be configured on the router, and our personal computer is configured with a private address, and we must rely on this large router to access the Internet.

Many companies have relatively strict controls. I remember that I couldn’t send pictures to my friends once. I found out later that my computer used whistle as a proxy for debugging, which caused a conflict with the company’s proxy server and was blocked. .

But if a personal computer is configured with TCP/IP information, it has a public address, which means that packets from the Internet can reach the computer directly, which may lead to the computer being attacked . Therefore, for client computers that directly access the Internet, we should take defensive measures such as installing firewall software.

3. Operator's manhole cover

Our ordinary users want to visit a website, and the middle must go through the operator's site. (Yes, the operator is the infrastructure) After our visit, the data packets will definitely not only pass through the site of one operator, and their jurisdiction is intricate.

 Generally, our company’s computer room or personal home computer is that kind of network cable. The twisted pair cable mentioned in the previous chapter is sufficient for use, but the amount of data transmitted by operators must be huge, and they will use more optical fibers. (Haha, in recent years, in the door of the community unit, I often see a piece of paper written on the wall with fiber-optic access. What does it mean? )

Optical fiber is not like ordinary electric wires, just build a high-voltage line tower (I have seen that kind of high-voltage line tower more than once and thought, when will I be able to climb up). Optical fibers need to be laid underground, and if problems arise, a large number of maintenance personnel are required to troubleshoot and repair them. Daily inspections and maintenance are also required. Therefore, operators who can afford optical fibers must be very capable. Moreover, the manhole covers we usually see on the road are not all sewers, and indeed some are related to operators.

4. Communication line service 

Operators have optical fiber, and there are also some small ones such as telephone companies (our operator is the telephone company), they do not have optical fiber, but if the telephone line uses optical fiber transmission speed, it will be quite fast. What to do if there is no optical fiber, rent it. But one optical fiber does not only transmit one piece of voice data, the optical fiber can be multiplexed, and one piece of voice data only accounts for part of its communication capacity.

In this way, operators with optical fibers can bring certain income by collecting rent and service fees. This is the communication line service.

In fact, on the topic of " from entering the url in the browser to loading the page ", you can change the question,

  • For example, what is the process of loading an image on our page?
  • For example, what is the process of sending an ajax request?
  • You can even ask, when you make a phone call, you say "Good Ah You", and the other party replies "Ai mu fai Sankeyou", what is the process like?

Therefore, regardless of the telephone service or the Internet service, they actually have something in common in terms of transmission. Do you want to ask, my Android phone needs to use optical fiber to make a call? I'm talking about this phone, as shown in the picture below:

 

5. Summary

In fact, after learning this section, we can explain many problems, such as why we can visit some foreign websites, but some cannot; for example, why those well-known websites can access so fast (sorting their own web performance optimization); for example Why do the manhole covers we see every day still have the operator's logo ?

 I have carefully prepared the voting session for everyone , you will definitely like it! ! !

Guess you like

Origin blog.csdn.net/xingyu_qie/article/details/131216422