CN113301099A - Request processing method, data processing method, device, equipment and CDN system - Google Patents

Request processing method, data processing method, device, equipment and CDN system Download PDF

Info

Publication number
CN113301099A
CN113301099A CN202110064804.8A CN202110064804A CN113301099A CN 113301099 A CN113301099 A CN 113301099A CN 202110064804 A CN202110064804 A CN 202110064804A CN 113301099 A CN113301099 A CN 113301099A
Authority
CN
China
Prior art keywords
address
destination
target address
target
storage structure
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110064804.8A
Other languages
Chinese (zh)
Inventor
方建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN202110064804.8A priority Critical patent/CN113301099A/en
Publication of CN113301099A publication Critical patent/CN113301099A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Abstract

The embodiment of the application provides a request processing method, a data processing device, equipment and a CDN system. Receiving an access request, and determining a first destination address; searching a first target address matched with the first destination address; searching a storage structure based on the first target address; the storage structure stores at least one target address; a target address and a plurality of destination addresses have a matching relation; and if the first target address exists in the storage structure, responding to the access request based on the first destination address. The technical scheme provided by the embodiment of the application improves the monitoring performance, further improves the communication performance and ensures the access speed.

Description

Request processing method, data processing method, device, equipment and CDN system
Technical Field
The embodiment of the application relates to the technical field of network communication, in particular to a request processing method, a data processing method, a device, equipment and a CDN system.
Background
When two communication parties carry out network communication, the network communication is realized on the basis of ports in a transport layer. Taking a client accessing a server as an example, an IP address bound by the server may provide tens of thousands of ports, and each port of the IP address may provide a service for the client to access. Currently, a server responds to an access request of a client by monitoring a destination address, where the destination address is composed of an IP address and a port number. The client side initiates an access request based on the IP address and the port number of the request access, and the server side can respond to the access request when confirming that the request access is a monitored destination address.
In practical applications, a server may use multiple ports to provide services, so that the monitored destination addresses are increased, in the prior art, hash tables are used to manage the destination addresses, when an access request is received, the hash tables are searched based on the destination address requesting access, and if the destination address exists in the hash tables, the destination address is considered to be monitored, and then the access request is responded based on the destination address.
The hash table is then limited in capacity and therefore can affect the listening performance and thus the communication performance.
Disclosure of Invention
The embodiment of the application provides a request processing method, a data processing method, a device, equipment and a system, which are used for solving the technical problem that the communication performance is influenced in the prior art.
In a first aspect, an embodiment of the present application provides a request processing method, including:
the edge server receives an access request and determines a first destination address requesting access;
searching a first target address matched with the first destination address;
searching a storage structure based on the first target address; the storage structure stores at least one target address; a target address and a plurality of destination addresses have a matching relation;
and if the first target address exists in the storage structure, responding to the access request based on the first destination address.
In a second aspect, an embodiment of the present application provides a request processing method, including:
receiving an access request, and determining a first destination address requesting access;
searching a first target address matched with the first destination address;
searching a storage structure based on the first target address; the storage structure stores at least one target address; a target address and a plurality of destination addresses have a matching relation;
and if the first target address exists in the storage structure, responding to the access request based on the first destination address.
In a third aspect, an embodiment of the present application provides a data processing method applied in a CDN system, including:
the edge server determines a plurality of destination addresses to be monitored;
establishing a matching relation between the plurality of destination addresses and at least one target address; wherein, a target address is matched with at least two destination addresses;
saving the at least one target address to a storage structure;
wherein the storage structure is used for monitoring the target address.
In a fourth aspect, an embodiment of the present application provides a data processing method, including:
determining a plurality of destination addresses to be monitored;
establishing a matching relation between the plurality of destination addresses and at least one target address; wherein, a target address is matched with at least two destination addresses;
saving the at least one target address to a storage structure;
wherein the storage structure is used for monitoring the target address.
In a fifth aspect, an embodiment of the present application provides a request processing method, including:
receiving a TCP (Transmission control protocol) connection establishing request, and determining a first destination address requesting connection;
searching a first target address matched with the first destination address;
searching a storage structure based on the first target address; the storage structure stores at least one target address; a target address and a plurality of destination addresses have a matching relation;
and if the first target address exists in the storage structure, responding to the TCP connection establishment request based on the first destination address.
In a sixth aspect, an embodiment of the present application provides a request processing apparatus, including:
the receiving module is used for receiving the access request and determining a first destination address requesting access;
the searching module is used for searching a first target address matched with the first destination address;
the monitoring module is used for searching a storage structure based on the first target address; the storage structure stores at least one target address; a target address and a plurality of destination addresses have a matching relation;
a response module, configured to respond to the access request based on the first destination address if the first destination address exists in the storage structure.
In a seventh aspect, an embodiment of the present application provides a data processing apparatus, including:
the device comprises a determining module, a monitoring module and a monitoring module, wherein the determining module is used for determining a plurality of destination addresses to be monitored;
the mapping module is used for establishing a matching relation between the plurality of destination addresses and at least one target address; wherein, a target address is matched with at least two destination addresses;
a monitoring establishing module, configured to store the at least one target address in a storage structure;
wherein the storage structure is used for monitoring the target address.
In an eighth aspect, embodiments of the present application provide a computing device, including a processing component and a storage component;
the storage component stores one or more computer instructions; the one or more computer instructions are configured to be invoked and executed by the processing component to implement the request processing method according to the first aspect or the second aspect.
In a ninth aspect, embodiments of the present application provide a computing device, comprising a processing component and a storage component;
the storage component stores one or more computer instructions; the one or more computer instructions are configured to be invoked and executed by the processing component to implement the request processing method according to the third aspect or the fourth aspect.
In a tenth aspect, an embodiment of the present application provides a CDN system, which includes a request processing method implemented according to the foregoing first aspect or the foregoing second aspect.
In the embodiment of the application, a matching relationship is established between a plurality of destination addresses provided by a destination and at least one destination address, so that one destination address can be matched with at least two destination addresses, the at least one destination address is stored in a storage structure as a monitoring address, when an access request is received, a first destination address determined based on the access request is searched for a matched first destination address, the first destination address is searched for in the storage structure, and if the first destination address exists, monitoring of the first destination address can be considered to be successful, so that the access request can be responded based on the first destination address.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow diagram illustrating one embodiment of a request processing method provided herein;
FIG. 2 is a diagram illustrating a scenario of an embodiment of the present application in a practical application;
FIG. 3 is a flow chart illustrating one embodiment of a data processing method provided herein;
FIG. 4 is a flowchart of a request processing method in an actual application according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating an embodiment of a request processing apparatus provided in the present application;
FIG. 6 illustrates a schematic structural diagram of one embodiment of a computing device provided herein;
FIG. 7 is a block diagram illustrating an embodiment of a data processing apparatus provided herein;
fig. 8 is a schematic structural diagram illustrating a further embodiment of a computing device provided by the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
In some of the flows described in the specification and claims of this application and in the above-described figures, a number of operations are included that occur in a particular order, but it should be clearly understood that these operations may be performed out of order or in parallel as they occur herein, the number of operations, e.g., 101, 102, etc., merely being used to distinguish between various operations, and the number itself does not represent any order of performance. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
The technical solution of the embodiment of the present application is applied to a Transmission layer communication scenario, for example, a Transmission Control Protocol (TCP) -based Transmission layer communication scenario.
The transport layer is one of key layers in a network architecture, and is responsible for providing data transmission services for communication between processes of both communication parties, the current process communicates through a socket, and a destination address described herein may be a socket address, and is formed by an IP (Internet Protocol, Internet interconnection Protocol) address plus a port (port) number, and may be an IP address: the form of the port number. Currently there are a maximum of 65535 ports, since IP addresses can provide tens of thousands of ports available. Still taking the client accessing the server as an example, the server may use multiple ports to provide services, and then multiple processes may be started to provide services, and the server may monitor multiple destination addresses. In practical applications, the services provided by the server may include, for example, login service, download service, upload service, and the like.
As can be seen from the description of the background art, currently, a hash table is used to manage the destination address to be monitored, and the monitoring operation is implemented by searching whether there is a destination address requesting access from the hash table, because the hash table has a limited capacity, if the number of the destination addresses monitored by the server is large, especially if the server binds a plurality of IP addresses, and tens of thousands of ports of each IP address provide services, the number of monitoring can reach hundreds of thousands of levels. The lookup operation that results in the hash table may approach a linear traversal, thereby affecting the snoop performance and, in turn, affecting the communication performance, resulting in communication delay.
The inventor finds that, in the process of implementing the present application, if the manner of increasing the capacity of the hash table is adopted to solve the problem of snooping performance, the macro definition of the system kernel needs to be modified and recompiled, and this manner is not flexible enough and has poor usability. The inventors have thought that the problem of interception performance can be solved if the number of interception can be reduced, but it is necessary to ensure that the service can be provided normally. Accordingly, the inventor provides the technical scheme of the embodiment of the application through a series of creation processes, in the embodiment of the application, normal access can be met only by monitoring a small number of target addresses, the monitoring performance is improved, the communication performance is further improved, the transmission efficiency is ensured, and the application layer and the source end are unaware and cannot cause performance loss.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a flowchart of an embodiment of a request processing method provided in the present application, where the method may include the following steps:
101: and receiving an access request, and determining a first destination address requesting access.
The technical solution of this embodiment is executed by a destination, that is, a request receiving end, of two communication parties, in practical application, the destination may specifically refer to a server, an access request is sent by a source, that is, a request sending end, of the two communication parties, and in practical application, the source may refer to a client. For convenience of understanding and explanation, in one or more embodiments below, the technical solution of the present application is described by mainly taking a source end as a client and a destination end as a server. In addition, in practical application, the technical solution of this embodiment may be specifically implemented by a system kernel of a server, where the system kernel may adopt a Linux (an operating system) kernel.
Based on the IP address and the port number in the access request, the first destination address may be determined, and as can be known from the related introduction of the basic concept, the destination address may refer to a socket address, and the process between the client and the server is based on socket to implement communication.
It should be noted that the manner of initiating the access request by the port used by the client is the same as that in the prior art, and is not described herein again.
It should be noted that the "first" in the first destination address is only for descriptive distinction and does not represent other meanings.
Among them, the access request is determined based on different transport layer protocols, which are exemplified by the currently common TCP and UDP (User data Protocol):
for a communication scenario based on TCP, a connection needs to be established between a client and a server first, and data transmission can be performed based on an established request, so the access request may specifically refer to a connection establishment request initiated by the client to request establishment of a TCP connection with the server.
For the communication scenario based on UDP, connection does not need to be established between the client and the server, and the access request may specifically refer to a data transmission request.
In practical application, because a TCP connection needs to be established in a TCP-based communication scenario, the TCP connection needs to be realized through a complex three-way handshake, and the connection establishment efficiency of the TCP is more significantly affected when a plurality of destination addresses monitored by the server are provided, therefore, when the technical scheme of the embodiment of the application is applied to the TCP communication scenario, the transmission performance of the TCP can be effectively prompted, and the transmission delay of the TCP is reduced.
102: and searching a first target address matched with the first destination address.
In the embodiment of the present application, a matching relationship exists between one destination address and a plurality of destination addresses, and the matching relationship is created in advance, which will be described in detail in the following embodiments.
Based on the pre-created matching relationship, whether a first target address matched with the first destination address exists can be searched. It can be understood that the first destination address is only one of the destination addresses matched with the first destination address, in this embodiment of the present application, one destination address is mapped with at least two destination addresses, and a matching relationship is established.
It should be noted that "the first" of the first target addresses is merely for descriptive distinction, so that the first target addresses represent target addresses matched with the first destination addresses, and have no other meaning.
103: the storage structure is looked up based on the first target address.
In practical application, the storage structure may refer to a hash (hash) table, and may also be other data structures with storage and lookup functions, which is not limited in this application.
Wherein at least one target address is stored in the storage structure; the at least one target address is obtained by mapping a large number of target end addresses which need to be monitored actually, so that the server end can monitor only the target addresses in the storage structure, and the monitoring number is greatly reduced because one target address can correspond to a plurality of target end addresses.
In practical application, a destination address refers to a socket address, each time a service end opens a port to provide service, a socket is created by a function socket () correspondingly, an IP address and a port number are bound to the socket by using a function bind () to obtain a socket address, then a function list () can be used to store the socket address in a monitored storage structure for monitoring, and when an access request is received, the socket address is searched from the storage structure. In this embodiment, a plurality of socket addresses are mapped to one virtual socket address, so that monitoring of the plurality of socket addresses is changed into monitoring of the virtual socket address, the monitoring amount is reduced, and the monitoring performance can be improved.
104: and if the first target address exists in the storage structure, responding to the access request based on the first destination address.
Alternatively, the access request may be responded to with a socket of the first destination address.
If the first destination address exists in the storage structure, it may be considered that the first destination address is successfully snooped, and then the access request is specifically responded based on the first destination address. Therefore, for the application layer and the client, the first target address is not known, and the first target address is still used for communication, so that service differentiation is facilitated, non-perception monitoring of the application layer and the client is realized, and other performance losses are not additionally increased. The embodiment improves the monitoring performance, ensures the communication performance, reduces the communication delay and simultaneously ensures the normal operation of the service.
If the first target address does not exist in the storage structure, the access request is considered to be abnormal access, and the access request can be discarded without response.
In addition, in some embodiments, if the target address matching the first destination address is not found, the storage structure may be found based on the first destination address;
and if the first destination address exists in the storage structure, responding to the access request based on the first destination address.
In some embodiments, finding a first destination address that matches the first destination address may comprise:
searching a target matching rule hit by the first destination address based on matching conditions in different matching rules;
and mapping the first destination address to a first target address configured in the target matching rule according to the execution action configured in the target matching rule.
Each matching rule is configured with a target address, the action is executed to indicate the mapping to the target coordinate, and a plurality of destination addresses having a matching relation with the target address are defined in the matching condition. The specific configuration of the matching rule will be described in detail in the following embodiments.
As can be seen from the foregoing description, the access request may refer to a TCP connection request, and in some embodiments, responding to the access request based on the first destination address may include:
establishing network connection with a source end based on a monitoring socket of a first destination end address;
creating a connection socket based on the first destination address;
and performing network communication with the source terminal by using the connection socket.
The monitoring socket is used for monitoring and establishing connection, after the network connection is established, the server side can establish a connection socket, the connection socket is used for carrying out network communication with the source side, namely data transmission, and the monitoring socket can continuously execute monitoring operation without re-establishment. In practical application, a connection socket may be created by using a function accept (), and in order to ensure transparency to an application layer and no perception of a first destination address, the connection socket is created specifically based on the first destination address, so that the connection socket may return the first destination address to the application layer, the application layer may regard the client as the first destination address, and ensure that the first destination address is completely imperceptible, and a processing mechanism is the same as that of an original manner.
In a practical application, the technical solution of the embodiment of the present application may be applied to a communication scenario in which a CDN (Content Delivery Network) system is used to perform dynamic data acceleration, where a conventional static data acceleration manner is to cache static data of a real server on an edge node of the CDN system, so that a user may access the system nearby, thereby improving an access speed. For dynamic data, which is dynamically generated by a real server, the real-time requirement is high, and the dynamic data cannot be cached in an edge node, a dynamic data acceleration mode can be adopted, that is, an optimal node path is found in a plurality of nodes (including an edge node, a middle node and the like) by combining network performance, and a client side realizes communication interaction with the real server through the nodes on the optimal node path, for example, requests to acquire data and the like. The CDN system can realize data acceleration of accessing different real servers, a user only needs to provide a domain name corresponding to an IP address of a real server, the CDN system is used for data acceleration, a client side needs to access an edge node of the CDN system at first, a plurality of ports can be used at the edge node aiming at the access of different domain names, and a plurality of processes are started, so that a destination end address can be correspondingly monitored aiming at each domain name, when the number of domain names accessed by the CDN system is more, the number of the destination end addresses monitored at the edge node is more, the monitoring performance problem can exist, the communication performance is influenced, and the access response speed is influenced finally. By adopting the technical scheme of the embodiment of the application, the problem of monitoring performance can be solved. The CDN system for dynamic data acceleration can be applied to multiple fields such as finance, games, medical treatment, e-commerce and multimedia, and the edge node can improve the access response speed and further improve the access speed by adopting the technical scheme of the application.
In the scenario diagram shown in fig. 2, a client 201 may initiate an access request based on a target domain name corresponding to a real server 200 requesting access, and the access request may first map the domain name to a corresponding first destination address through a DNS202, so that the access request may be sent to a corresponding edge node 203 based on the first destination address, the edge node 203 may first search for a first destination address corresponding to the first destination address according to the technical solution of this embodiment, and then search for the first destination address in a storage structure, if the first destination address exists in the storage structure, the access request may be responded to based on the first destination address, where the access request is a TCP connection, that is, a TCP connection may be established with the client 201 by using a three-way handshake manner, and a response packet in the three-way handshake process is used as the first destination address, so that the client 201 is not aware, normal access is guaranteed. The operation of the edge node 203 responding to the access request based on the first destination address is the same as that in the prior art, and is not described herein again.
In this practical application, receiving the access request, and determining the first destination address may include:
receiving an access request sent by a source end, and determining a first destination end address; the first destination address is obtained by mapping a destination domain name requested to be accessed by the source end.
The mapping of the target domain name to the corresponding first destination address may be implemented by a domain name system, and after sending the access request, the client may first request the domain name system to search for the first destination address corresponding to the target domain name.
Fig. 3 is a flowchart of an embodiment of a data processing method provided in the present application, where the method may include the following steps:
301: a plurality of destination addresses to be snooped are determined.
The plurality of destination addresses to be monitored can be changed according to actual conditions, and the server opens one port to provide service, namely, one destination address to be monitored is correspondingly generated.
302: and establishing a matching relation between the plurality of destination addresses and at least one target address.
Wherein one destination address matches at least two destination addresses.
Optionally, the multiple destination addresses may establish a matching relationship with the same destination address.
Since one server may bind multiple IP addresses, for convenience of management, optionally: and establishing a matching relation between a plurality of destination end addresses of the same IP address and the same target address.
Of course, a specific matching of a destination address with several destination addresses may be set in connection with actual traffic situations.
303: at least one target address is saved to a storage structure.
Wherein, the storage structure is used for monitoring the target address. The destination address is used to translate the destination address in the access request,
in this embodiment, a matching relationship is established between a plurality of destination addresses and at least one destination address, so that only the destination address can be monitored, after an access request is received, the destination address matched with the destination address in the request is first determined, the destination address is searched from the storage structure, and if the monitoring of the destination address is successful, the access request is responded based on the destination address.
The specific monitoring manner for the storage structure may be described in the foregoing embodiments, and is not described herein again.
In some embodiments, matching a plurality of destination addresses of the same IP address with the same destination address may include:
setting an address set based on the range of ports to be monitored in the same IP address;
the address set is taken as a matching condition and an action is performed based on the target address setting of the IP address matching to create a matching rule.
The executing act is used for indicating that the destination address meeting the matching condition is converted into the target address.
When the Linux kernel verification nonce is used at the server, the matching rule may be created by using IPTABLES, which is an IP packet filtering rule used to set, maintain and check the Linux kernel. The matching rule is also referred to as an IPTABLES rule, and the address set can be implemented by using an ipsec, wherein the ipsec is an extension of IPTABLES, so that the ipsec can create a rule matching the whole address set.
When the matching rule is created by using IPTABLES and ipsec, it is assumed that 1 ten thousand ports with IP addresses of 10000 to 19999 on 1.1.1 are matched with one target address of 127.0.0.1: 10000. Then only a few commands are needed to set the matching rules:
ipset create tcp:1.1.1.1bitmap:port range 1-65535;
ipset add portSet 10000-19999;
iptables-t mangle-A PREROUTING-p tcp-d 1.1.1.1-m set--match-set tcp:1.1.1.1dst-j TPROXY--on-ip 127.0.0.1--on-port 10000。
as can be seen from the foregoing description, the technical solution of the embodiment of the present application may be applied to a communication scenario based on TCP, and the purpose of TCP acceleration may be achieved by using the technical solution of the embodiment of the present application. Therefore, the present application further provides a request processing method, which may include:
receiving a TCP connection establishing request, and determining a first destination address;
searching a first target address matched with the first destination address;
searching a storage structure based on the first target address; the storage structure stores at least one target address; a target address and a plurality of destination addresses have a matching relation;
and if the first destination address exists in the storage structure, responding to the TCP connection establishing request based on the first destination address.
For the convenience of understanding, the technical solution of the present application is described below with reference to an example, and it is still assumed that 1 ten thousand ports with IP addresses of 10000 to 19999 on 1.1.1.1 are matched with one target address of 127.0.0.1:10000, and it is assumed that the destination address of the client requesting access is 1.1.1.1:15000, as shown in fig. 4, the request processing procedure may be as follows:
401: and receiving a TCP connection establishing request, and determining a first destination address 1.1.1.1: 15000.
Wherein 1.1.1.1 is IP address, 15000 is port number
402: and searching for a matching rule based on the ratio of 1.1.1:15000, determining whether the target matching rule is hit, if so, executing the step 403, and if not, executing the step 407.
403: the first target address 127.0.0.1:10000 in the target matching rule is determined.
404: and searching whether the monitored hash table has a ratio of 127.0.0.1:10000, if so, executing the step 405, and if not, ending the process.
405: the request for the connection is responded to with a 1.1.1.1: 15000.
The connection establishment process adopts a three-way handshake mode, and the response packet of the service end is 1.1.1.1: 15000. The three-way handshake process is the same as the prior art, and is not described herein.
406: the connection establishment is completed and data transmission is performed using 1.1.1.1: 15000.
Wherein, when the connection establishment is completed, a connection socket corresponding to 1.1.1.1:15000 is created, and data transmission is realized due to the connection socket.
407: and searching whether the hash table has a ratio of 1.1.1.1:15000, if so, executing the step 405, and if not, ending the process.
When the technical scheme of the embodiment of the application is applied to a TCP communication scene, TCP acceleration can be realized, TCP transmission performance is improved, and transmission delay is reduced.
Fig. 5 is a schematic structural diagram of an embodiment of a request processing apparatus according to an embodiment of the present application, where the apparatus may include:
a receiving module 501, configured to receive an access request, and determine a first destination address requesting access;
a searching module 502, configured to search for a first target address matching the first destination address;
a snooping module 503, configured to search for a storage structure based on the first target address; the storage structure stores at least one target address; a target address and a plurality of destination addresses have a matching relation;
a response module 504, configured to respond to the access request based on the first destination address if the first destination address exists in the storage structure.
In some embodiments, the search module may be specifically configured to search for a target matching rule hit by the first destination address based on a matching condition in different matching rules; and mapping the first destination address to a first target address configured in the target matching rule according to the execution action configured in the target matching rule.
In some embodiments, the snoop module may be specifically configured to respond to the access request with a socket of the first destination address if the first destination address exists in the storage structure.
In some embodiments, the monitoring module is further configured to search the storage structure based on the first destination address if the target address matching the first destination address is not found;
the response module is further configured to respond to the access request based on the first destination address if the first destination address exists in the storage structure.
In some embodiments, the access request is a TCP connection request; the response module is specifically used for establishing network connection with the source end based on the monitoring socket of the first destination end address; creating a connection socket based on the first destination address; and performing network communication with the source terminal by using the connection socket.
In some embodiments, the receiving module may be specifically configured to receive an access request sent by a source end, and determine a first destination address; the first destination address is obtained by mapping a destination domain name requested to be accessed by the source end.
In one implementation, the access request may be a TCP build request.
The request processing apparatus in fig. 5 may execute the request processing method described in the embodiment shown in fig. 1, and the implementation principle and the technical effect are not described again. The specific manner in which each module and unit of the request processing apparatus in the above embodiments perform operations has been described in detail in the embodiments related to the method, and will not be elaborated herein.
In one possible design, the request processing apparatus of the embodiment shown in fig. 5 may be configured in a computing device, which may include a storage component 601 and a processing component 602 as shown in fig. 6;
the storage component 601 stores one or more computer instructions for execution by the processing component 602 to implement a request processing method as described in any of the previous embodiments.
Of course, a computing device may also necessarily include other components, such as input/output interfaces, communication components, and so forth.
The input/output interface provides an interface between the processing components and peripheral interface modules, which may be output devices, input devices, etc.
The communication component is configured to facilitate wired or wireless communication between the computing device and other devices, and the like.
In practice, the computing device may be a remote web server, a computer networking device, a chipset, a desktop computer, a notebook computer, a workstation, or any other processing device or equipment. When the computing device is a physical machine, the server described above may be composed of one or more computing devices, and the server schedules the computing device to implement the request processing method described in any of the foregoing embodiments by using a load balancing principle.
The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a computer, the method for processing a request according to the embodiment shown in fig. 1 may be implemented.
Fig. 7 is a schematic structural diagram of an embodiment of a data processing apparatus according to an embodiment of the present application, where the apparatus may include:
a determining module 701, configured to determine multiple destination addresses to be monitored;
a mapping module 702, configured to establish a matching relationship between multiple destination addresses and at least one destination address; wherein, a target address is matched with at least two destination addresses;
a monitoring establishing module 703, configured to store at least one target address in a storage structure;
wherein the memory structure is used for snooping the target address.
In some embodiments, the mapping module is specifically configured to establish a matching relationship between multiple destination addresses of the same IP address and the same destination address.
In some embodiments, the mapping module is specifically configured to set the address set based on a plurality of ports of the same IP address; the address set is taken as a matching condition and an action is performed based on the target address setting of the IP address matching to create a matching rule.
The request processing device in fig. 7 may execute the data processing method described in the embodiment shown in fig. 3, and the implementation principle and the technical effect are not described again. The specific manner in which each module and unit of the request processing apparatus in the above embodiments perform operations has been described in detail in the embodiments related to the method, and will not be elaborated herein.
In one possible design, the request processing apparatus of the embodiment shown in fig. 7 may be configured in a computing device, as shown in fig. 8, which may include a storage component 801 and a processing component 802;
the storage component 801 stores one or more computer instructions for execution by the processing component 802 to implement a data processing method as described in any of the previous embodiments.
Of course, a computing device may also necessarily include other components, such as input/output interfaces, communication components, and so forth.
The input/output interface provides an interface between the processing components and peripheral interface modules, which may be output devices, input devices, etc.
The communication component is configured to facilitate wired or wireless communication between the computing device and other devices, and the like.
In practice, the computing device may be a remote web server, a computer networking device, a chipset, a desktop computer, a notebook computer, a workstation, or any other processing device or equipment, and so forth. The computing device shown in fig. 8 may be the same device as the computing device shown in fig. 6, or may be different devices.
An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a computer, the data processing method of the embodiment shown in fig. 3 may be implemented.
In addition, an embodiment of the present application further provides a CDN system, which includes an edge server that implements the request processing method according to any one of the above embodiments or the data processing method according to any one of the above embodiments.
Accordingly, an embodiment of the present application further provides a request processing method applied in the CDN system, including:
the edge server receives an access request and determines a first destination address requesting access;
searching a first target address matched with the first destination address;
searching a storage structure based on the first target address; the storage structure stores at least one target address; a target address and a plurality of destination addresses have a matching relation;
and if the first target address exists in the storage structure, responding to the access request based on the first destination address.
The access request may be sent by a client, and the edge server may refer to an edge node in the embodiment shown in fig. 2.
In addition, an embodiment of the present application further provides a data processing method applied to the CDN system, including:
the edge server determines a plurality of destination addresses to be monitored;
establishing a matching relation between the plurality of destination addresses and at least one target address; wherein, a target address is matched with at least two destination addresses;
saving the at least one target address to a storage structure;
wherein the storage structure is used for monitoring the target address.
The processing components referred to in the respective embodiments above may include one or more processors executing computer instructions to perform all or part of the steps of the above-described methods. Of course, the processing elements may also be implemented as one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components configured to perform the above-described methods.
The storage component is configured to store various types of data to support operations at the terminal. The memory components may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
In addition, an embodiment of the present application further provides a CDN system, which includes an edge server that implements the request processing method according to any of the foregoing embodiments, where the edge server may refer to an edge node shown in fig. 2.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (17)

1. A request processing method applied to a CDN is characterized by comprising the following steps:
the edge server receives an access request and determines a first destination address requesting access;
searching a first target address matched with the first destination address;
searching a storage structure based on the first target address; the storage structure stores at least one target address; a target address and a plurality of destination addresses have a matching relation;
and if the first target address exists in the storage structure, responding to the access request based on the first destination address.
2. A method for processing a request, comprising:
receiving an access request, and determining a first destination address requesting access;
searching a first target address matched with the first destination address;
searching a storage structure based on the first target address; the storage structure stores at least one target address; a target address and a plurality of destination addresses have a matching relation;
and if the first target address exists in the storage structure, responding to the access request based on the first destination address.
3. The method of claim 2, wherein the finding the first destination address that matches the first destination address comprises:
searching a target matching rule hit by the first destination address based on matching conditions in different matching rules;
and mapping the first destination address to a first destination address configured in the target matching rule according to the execution action configured in the target matching rule.
4. The method of claim 2, wherein responding to the access request based on the first destination address if the first destination address exists in the memory structure comprises:
and if the first target address exists in the storage structure, responding to the access request by using the socket of the first destination address.
5. The method of claim 2, further comprising:
if the target address matched with the first destination address is not found, searching the storage structure based on the first destination address;
and if the first destination address exists in the storage structure, responding to the access request based on the first destination address.
6. The method of claim 2, wherein the access request is a TCP connection request; the responding to the access request based on the first destination address comprises:
establishing network connection with a source end based on the monitoring socket of the first destination end address;
creating a connection socket based on the first destination address;
and carrying out network communication with the source end by utilizing the connection socket.
7. The method of claim 2, wherein receiving the access request and determining the first destination address comprises:
receiving an access request sent by a source end, and determining a first destination end address requesting access; and the first destination address is obtained based on the target domain name mapping requested to be accessed by the source end.
8. A data processing method applied to a CDN system is characterized by comprising the following steps:
the edge server determines a plurality of destination addresses to be monitored;
establishing a matching relation between the plurality of destination addresses and at least one target address; wherein, a target address is matched with at least two destination addresses;
saving the at least one target address to a storage structure;
wherein the storage structure is used for monitoring the target address.
9. A data processing method, comprising:
determining a plurality of destination addresses to be monitored;
establishing a matching relation between the plurality of destination addresses and at least one target address; wherein, a target address is matched with at least two destination addresses;
saving the at least one target address to a storage structure;
wherein the storage structure is used for monitoring the target address.
10. The method of claim 9, wherein matching the plurality of destination addresses with at least one destination address comprises:
and establishing a matching relation between a plurality of destination end addresses of the same IP address and the same target address.
11. The method of claim 10, wherein matching a plurality of destination addresses of the same IP address with the same destination address comprises:
setting an address set based on a plurality of ports of the same IP address;
and taking the address set as a matching condition, and performing an action based on the target address setting matched by the IP address to create a matching rule.
12. A method for processing a request, comprising:
receiving a TCP (Transmission control protocol) connection establishing request, and determining a first destination address requesting connection;
searching a first target address matched with the first destination address;
searching a storage structure based on the first target address; the storage structure stores at least one target address; a target address and a plurality of destination addresses have a matching relation;
and if the first target address exists in the storage structure, responding to the TCP connection establishment request based on the first destination address.
13. A request processing apparatus, comprising:
the receiving module is used for receiving the access request and determining a first destination address requesting access;
the searching module is used for searching a first target address matched with the first destination address;
the monitoring module is used for searching a storage structure based on the first target address; the storage structure stores at least one target address; a target address and a plurality of destination addresses have a matching relation;
a response module, configured to respond to the access request based on the first destination address if the first destination address exists in the storage structure.
14. A data processing apparatus, comprising:
the device comprises a determining module, a monitoring module and a monitoring module, wherein the determining module is used for determining a plurality of destination addresses to be monitored;
the mapping module is used for establishing a matching relation between the plurality of destination addresses and at least one target address; wherein, a target address is matched with at least two destination addresses;
a monitoring establishing module, configured to store the at least one target address in a storage structure;
wherein the storage structure is used for monitoring the target address.
15. A computing device comprising a processing component and a storage component;
the storage component stores one or more computer instructions; the one or more computer instructions are used for being called and executed by the processing component to realize the request processing method according to any one of claims 2-7.
16. A computing device comprising a processing component and a storage component;
the storage component stores one or more computer instructions; the one or more computer instructions for execution by the processing component to perform the data processing method of any of claims 9 to 11.
17. A CDN system comprising an edge server implementing the request processing method according to any one of claims 2 to 7.
CN202110064804.8A 2021-01-18 2021-01-18 Request processing method, data processing method, device, equipment and CDN system Pending CN113301099A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110064804.8A CN113301099A (en) 2021-01-18 2021-01-18 Request processing method, data processing method, device, equipment and CDN system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110064804.8A CN113301099A (en) 2021-01-18 2021-01-18 Request processing method, data processing method, device, equipment and CDN system

Publications (1)

Publication Number Publication Date
CN113301099A true CN113301099A (en) 2021-08-24

Family

ID=77318708

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110064804.8A Pending CN113301099A (en) 2021-01-18 2021-01-18 Request processing method, data processing method, device, equipment and CDN system

Country Status (1)

Country Link
CN (1) CN113301099A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113938395A (en) * 2021-08-30 2022-01-14 阿里巴巴(中国)有限公司 Data analysis method, system, device and storage medium
WO2023142699A1 (en) * 2022-01-26 2023-08-03 华为技术有限公司 Communication method and apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113938395A (en) * 2021-08-30 2022-01-14 阿里巴巴(中国)有限公司 Data analysis method, system, device and storage medium
CN113938395B (en) * 2021-08-30 2024-01-19 阿里巴巴(中国)有限公司 Data analysis method, system, equipment and storage medium
WO2023142699A1 (en) * 2022-01-26 2023-08-03 华为技术有限公司 Communication method and apparatus

Similar Documents

Publication Publication Date Title
US10616137B2 (en) Capacity-based server selection
US10089153B2 (en) Synchronizing load balancing state information
US8286232B2 (en) System and method for transparent cloud access
KR101969194B1 (en) Offloading packet processing for networking device virtualization
JP5855867B2 (en) Service virtualization via content-centric network
CN112470436A (en) Multi-cloud connectivity using SRV6 and BGP
US20210336921A1 (en) Systems and methods to operate devices with domain name system (dns) caches
US10795577B2 (en) De-duplication of client-side data cache for virtual disks
CN113301099A (en) Request processing method, data processing method, device, equipment and CDN system
US10369461B2 (en) Cloud gaming system and method of initiating a gaming session
AU2018351990A1 (en) Method to track SSL session states for SSL optimization of SaaS based applications
CN112261094A (en) Message processing method and proxy server
WO2020236806A1 (en) Network traffic steering with programmatically generated proxy auto-configuration files
US10404651B2 (en) Domain name system network traffic management
US20220012110A1 (en) Networking-related system call interception and modification
US10341292B2 (en) Increased port address space
US11750716B2 (en) Methods for publishing resource, and gateway
CN112165449A (en) Control method of real-time authority of web application, electronic device and storage medium
TW201644249A (en) Devices and methods for performing TCP handshakes
CN115242882A (en) Method and device for accessing k8s container environment based on transport layer route
US20220321667A1 (en) Proxyless Protocol
KR20090071542A (en) Host posing network device and method thereof
D’Elia et al. A Multi-broker Platform for the Internet of Things
CN111416851A (en) Method for session synchronization among multiple load balancers and load balancer
CN111416852A (en) Method for session synchronization among multiple load balancers and load balancer

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination