CDN principle, TCP/IP protocol family

CDN principle

CND generally includes a distribution service system, a load balancing system, and a management system.

Distribution Service System

The basic unit of work is each Cache server.Responsible for directly responding to user requests and quickly distributing content to users; at the same time, it is also responsible for content updates to ensure synchronization with the source site content

According to different content types and service types, the distribution service system is divided into multiple sub-service systems, such as: webpage acceleration service, streaming media acceleration service, application acceleration service, etc.

Each sub-service system is a distributed service cluster, which is composed of distributed and deployed Cache clusters with similar functions and close regions.

In addition to undertaking content synchronization, updating and responding to user requests, the distribution service system also needs to feed back the health status, response status, content cache status, etc. of each Cache device to the upper management scheduling system, so that the management scheduling system can follow the set strategy Decide which Cache device will respond to the user's request.

Load balancing system

The load balancing system is the backbone of the entire CDN system.Responsible for scheduling all user requests and determining the final access address provided to users

Use hierarchical implementation. The most basic two-pole scheduling system includes 全局负载均衡(GSLB)and 本地负载均衡(SLB).

GSLB determines the node serving the user based on the user address and the content requested by the user, mainly based on the principle of proximity. It is generally achieved through DNS resolution or application layer redirection (Http 3XX redirection).

SLB is mainly responsible for load balancing within nodes. When a user request is dispatched from GSLB to SLB, SLB will redirect the user request according to the working status and content distribution of each Cache device in the node. The implementation of SLB includes four-layer scheduling (LVS), seven-layer scheduling (Nginx), and link load scheduling.

Management system

Divided into operation management and network management subsystems.

The network management system implements equipment management, topology management, link monitoring and fault management of the CDN system, and provides administrators with a visualized centralized management of the resources of the entire network, which is usually implemented by web.

Operational management is the business management of the CDN system, responsible for the collection, sorting, and delivery of the business-level interaction with external systems.

Including user management, product management, billing management, statistical analysis, etc.

TCP/IP protocol family

TCP / IP only provides connectionless and unreliable services, A three-way handshake is required before transmission.

The main function of IP includes encapsulating upper layer data (such as TCP, UDP data) or other data of the same layer (such as ICMP data) into IP datagrams, and transmitting the IP datagrams to the final destination;

In order to enable data to be transmitted on the link layer, the data is segmented and the path of the datagram to the destination in other networks is determined.

Application Layer Protocol-File Transfer Service (FTP)

Used to transfer files between computers.

The actual Internet FTP service is an anonymous FTP service. A special user name-anonymous is set for public use.

After anonymously logging in to the FTP server, it works in the same way as regular FTP. Usually for security purposes, most anonymous FTP servers only allow downloading, not uploading files.

FTP establishes two TCP connections between the client and the server. One is a control connection, which is mainly used to transfer commands and parameters (port 21); the other is a data connection, which is mainly used to transfer files (port number 20).

Application layer protocol-remote login protocol (Telnet)

The remote login service is really supported by the Telnet protocol. It connects the user's computer and the remote host, and runs the program on the remote computer. The information entered by the user is sent to the remote host through the Telnet protocol. The host monitors the user's request on the TCP port and processes it. The result is returned to the customer through the Telnet protocol. The customer is then displayed on the computer screen after appropriate conversion.

Because the Telnet command is used for remote login, it is called Telnet remote login.

It is composed of three parts: client software, server software and Telnet general protocol.

Application layer protocol-email protocol (SMTP)

E-mail (E-mail) is an electronic media letter that uses a computer to exchange information.

Based on the client/server model, it consists of three parts: E-mail client software, E-mail server, and communication protocol.

Send mail, first arrive at the mail server host registered by yourself, and then transfer to the mail server host at the destination through multiple computers and routes during network transmission, enter the recipient's email address, and finally the recipient of the mail goes online and initiates the email The management program will be automatically downloaded to your computer to complete the acceptance of emails.

  • SMTP: Simple Mail Transfer Protocol
  • MIME: Internet Mail Extension Protocol
  • PEM: Enhanced private mail protection protocol
  • POP: It is a simple plain text protocol to keep the emails that users failed to take away in time. Each transmission is based on regular E-mail, and partial transmission is not provided.

Transport layer protocol-TCP

Provide a reliable, connection-oriented, full-duplex data transmission service for applications on the basis of the unreliable data service provided by IP.

TCP establishes and closes the connection operation between the source host and the destination, both of which require a three-way handshake to confirm whether the establishment and closing are successful. Although TCP provides a reliable data transmission service, it does so at the expense of traffic.

TCP uses the retransmission technology: When sending data, it starts a timer and resends the data packet if no confirmation message is received within the specified time.

Transport layer protocol-UDP

The User Datagram Protocol is an unreliable and connectionless protocol. Compared with the connection-oriented TCP of the same layer, UDP is a connectionless protocol (no error detection function). TCP helps to provide a reliable connection, and UDP helps to improve the high rate of transmission.

It is not responsible for resending lost packets, does not sort the received data, does not eliminate duplicate IP datagrams, and is not responsible for establishing and terminating connections. (All UDP applications are responsible)

TCP: Interactive session application (FTP, etc.).

UDP: Perform error detection by yourself, no need to detect errors (DNS, SNMP).

Internet Protocol—IP

IP only provides connectionless and unreliable services, and delegates services such as error detection and flow control to protocols at other layers.

The main functions of IP:

  • Encapsulate the upper layer data (TCP, UDP data) or other data of the same layer (ICMP data) into the IP datagram;
  • Deliver the IP datagram to the final destination;
  • In order to enable data to be transmitted on the link layer, the data is segmented;
  • Determine the path of a datagram to a destination in another network.

Internet Protocol—ICMP

Internet Control Information Protocol, a protocol used to send error checking messages. ICMP makes IP more stable. It also uses IP to transmit messages. The ping tool uses ICMP messages to test whether the target is reachable.

5 types of error messages: (source suppression, timeout, destination unreachable, redirection and request segmentation)

Four types of information messages: response request, response response, address mask request and address mask response.

Internet Protocol-ARP and RARP

Address Resolution Protocol (ARP) and Anti-Address Resolution Protocol (RARP)

The function of ARP is to convert an IP address into a physical address, and the function of RARP is to convert a physical address into an IP address. Each device has a unique physical address (given by the network card). In order to shield the differences in the underlying protocol and physical address, the IP protocol uses an IP address.

Therefore, during the transmission process, the IP address and the physical address must be converted mutually.

Network interface layer protocol-Ethernet (Ethernet IEEE 802.3)

Ethernet IEEE 802.3: Standard local area network, speed 10Mps, transmission medium is copper cable.

Ethernet IEEE 802.3u: Fast Ethernet, speed 100Mps, transmission medium is twisted pair.

Ethernet IEEE 802.3z: Gigabit Ethernet, speed 1000Mps, transmission medium is optical fiber or twisted pair.

Network Interface Layer Protocol—Token Ring Network (Ethernet IEEE 802.5)

  • You can send data only if you have the token.
  • When sending data, a token needs to be captured.
  • The token is not empty and needs to wait.

Network Interface Layer Protocol—Fiber Distributed Data Interface (FDDI)

Use optical fiber as the transmission medium.

Using a double-ring system structure, the information on the two rings flows in opposite directions. One ring of the double ring is called the main ring, and the other ring is called the secondary ring. Under normal circumstances, the primary ring transmits data and the secondary ring is in an idle state.

The purpose of the double loop design is to provide high reliability and stability. The transmission medium defined by FDDI has two kinds of single-mode fiber and multi-mode fiber.

Network Interface Layer Protocol—Point-to-Point Protocol (PPP)

Mainly used for "dial-up Internet" this wide area connection mode. The advantages are simple, with user authentication function, can solve the IP allocation and so on. It is a universal solution for simple connection between various hosts, bridges and routers.

The method of using Ethernet resources to run PPP on the Ethernet for user authentication access is called PPPoE. It is the most extensive technical standard in the current ADSL access method.

The ATM network Sahua Girl runs PPP to manage user re-authentication and becomes PPPoA.

PPPoA and PPPoE operate on the same principle, but the difference is in the operating environment.

Others—ADSL (Asymmetric User Data Line)

There are 3 dial-up modes for ADSL Modem Internet access, namely dedicated line mode (static IP), PPPoA and PPPoE.

ADSL exclusive bandwidth, safe and reliable. Low cost, using the old telephone line, you can separate the telephone and ADSL Modem (Internet access).

Other—IPv4 and IPv6

IPv4: 32-bit binary, which can represent the number of IP addresses: 2^32=4.2 billion.

IPv6: 128-bit two-level system, which can express the number of IP addresses: 2 ^128=3.4 * 10 ^38.

Guess you like

Origin blog.csdn.net/qq_32727095/article/details/114175297