Network Composition

The network consists of two parts:

  1. Web applications. For example, browsers, Web servers, and so on
  2. A mechanism for moving digital information

Browser, Web server

The interaction between the browser and the Web server is simple and can be summarized as follows:

  1. The browser sends the request

  2. The server sends a response (to the browser based on the request)

What are requests and responses?

Essentially electrical signals and light signals, which can be damaged by noise.

A mechanism for moving digital information

Interaction between the two requires a mechanism for passing requests and responses between the two. This mechanism needs to meet several requirements:

  1. The mechanism must ensure that requests and responses are sent correctly to the other party. Because the network is composed of many computers and other devices connected to each other, it can be lost or damaged in the process of transmission.

  2. The mechanism must be able to carry digital information. Because both the request and response are numeric information made up of zeros and ones.

The basic idea of this mechanism is as follows:

Digital information is broken up into small pieces and shipped in containers called packets. It can be understood as follows: a package is equivalent to a package, and the head of the package stores control information such as destination. Express companies sort the packages according to the control information of the head of the package (switches and routers are equivalent to sorting and processing areas of post offices or express companies), and then move them step by step to the destination.

Overview of the bag’s journey of discovery

The Web browser

The browser generates a request based on the URL we enter and sends it to the Web server.

Of course, the browser does not deliver the message itself; it delegates the message to a mechanism that handles digital information. That is, the browser entrusts network control software in the operating system to send messages to the server.

Protocol stack and nic

The network control software described above is called the protocol stack.

The software packages messages received from the browser and adds control information such as the destination address.

The protocol stack then hands the packet to the nic. (Network card: Hardware responsible for Ethernet or wireless network communication.)

The network adapter then converts the packet into an electrical signal and sends it over the network cable, so that the packet enters the network.

So where will the bag go from here?

Hub, switch, router

Packets pass through devices such as switches to routers connected to the Internet. (Behind the router is the Internet.)

The network operator delivers the package to its destination.

Access network, network operator

Packets travel from the router connected to the Internet and into the interior of the Internet.

The entry line to the Internet is called an access network. (Generally speaking, we can access the Internet with telephone lines, ISDN, ADSL, cable TV, light, special lines and other communication lines, collectively known as access network.)

An access network connects to a contracted network operator and accesses a device called a PoP (Point ofPresence). (The entity of the access point is a router designed for carriers, and it can be thought of as the nearest post office, where letters collected from individual boxes are sorted and sent across the country or the world.)

So, it is understood that network packets are first sent to the access point through the access network, and from there to the rest of the world.

Firewall, cache server

The network packet is relayed by several routers to the LAN where the Web server resides.

Next, it encounters a firewall, which checks the packet entry. See if there’s any dangerous bags mixed in.

After checking, network packets may encounter a cache server. (The data that can be reused is stored in the cache server. If the data of the page you want to visit happens to be found in the cache server, you can read the data directly from the cache server without bothering the server.)

In larger sites, you may also have load balancers. It is responsible for distributing messages across multiple Web servers; There may also be services that use caching servers distributed throughout the Internet to distribute content.

After these mechanisms, the network packet arrives at the Web server.

The Web server

When the network packet arrives at the Web server, the data is unpacked (again by the protocol stack) and restored to the original request message, which is then handed to the Web server program.

Next, the Web server analyzes the meaning of the request message, loads the data into the response message, and sends it back to the client.

The process of responding to the message back to the client is the reverse of the process described earlier.

When the response arrives at the client, the browser reads the data from the web page and displays it on the screen.

At this point, the series of operations to access the Web server is complete, and our “package” exploration is over.