WO2023056873A1 - Data request method, communication apparatus, and communication system - Google Patents

Data request method, communication apparatus, and communication system Download PDF

Info

Publication number
WO2023056873A1
WO2023056873A1 PCT/CN2022/122228 CN2022122228W WO2023056873A1 WO 2023056873 A1 WO2023056873 A1 WO 2023056873A1 CN 2022122228 W CN2022122228 W CN 2022122228W WO 2023056873 A1 WO2023056873 A1 WO 2023056873A1
Authority
WO
WIPO (PCT)
Prior art keywords
communication device
client
communication
message
session
Prior art date
Application number
PCT/CN2022/122228
Other languages
French (fr)
Chinese (zh)
Inventor
朱玲
王晓鹏
桑琰
李晓光
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023056873A1 publication Critical patent/WO2023056873A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • 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/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware

Definitions

  • the present application relates to the computer field, and in particular to a data request method, communication device and communication system.
  • CDN content delivery network
  • the client sends a request message to one of multiple real servers through the load balancing server to request target data. Since the load balancing server cannot perceive the storage location of the target data, the load balancing server sends a request message to a real The server forwards the request message, and the target data may not be stored on the real server, and the real server will obtain the target data from other real servers and send it to the client. The transfer of target data between various real servers will put a lot of pressure on the system bandwidth.
  • Embodiments of the present application provide a data request method, a communication device, and a communication system, which are used to reduce traffic between communication devices storing data.
  • a method for requesting data including: the second communication device receives from the first communication device the connection state information of the first session between the first communication device and the client and the cached communication with the client
  • the message communicated with the client includes a request message, and the request message is used to request target data;
  • the second communication device establishes a second session with the client according to the connection status information;
  • the second communication device sends the client a second session through the second session Send the target data;
  • the second communication device sends the unique identifier of the second communication device to the load balancing server, the unique identifier of the second communication device is used to update the flow entry, and before the update, the flow entry is used to indicate that the message from the client will Forwarding to the first communication device, after updating, the flow entry is used to indicate that the message from the client is forwarded to the second communication device.
  • the data request method provided by the embodiment of the present application replaces the transmission of target data between the communication devices storing data by transmitting the connection state information of the session and the cached message communicated with the client between the communication devices storing data, It can reduce the traffic between communication devices storing data, reduce the number of communication devices, save costs, and reduce the time delay of the first packet (open frequency).
  • the unique identifier of the second communications device is a custom identifier, or a real network protocol address of the second communications device, or a media access control address of the second communications device.
  • the flow entry includes the quintuple and the unique identifier of the second communication device (for example, a custom ID, or the real network protocol address of the second communication device, or the media access control address of the second communication device).
  • the mapping relationship includes the unique identifier of the second communication device. The present application does not limit the specific form of the unique identifier of the second communication device, as long as it can be distinguished from the first communication device.
  • a method for requesting data including: the load balancing server sends a request message from the client to the first communication device, the request message is used to request target data; the load balancing server establishes a flow entry, and the flow entry indicates that the The message from the client is forwarded to the first communication device; the load balancing server receives the unique identifier of the second communication device from the second communication device; the load balancing server updates the flow entry according to the unique identifier of the second communication device, and the flow entry indicates that the flow entry will come from The client's message is forwarded to the second communication device.
  • the unique identifier of the second communications device is a custom identifier, or a real network protocol address of the second communications device, or a media access control address of the second communications device.
  • a data request method including: a first communication device receives a request message from a client from a load balancing server, and the request message is used to request target data; the first communication device establishes a first session with the client; A communication device determines that the target data is stored in the second communication device according to the request message and the resource list; the first communication device sends the connection status information of the first session and the cached communication message with the client to the second communication device; the first The communication device disconnects the first session.
  • a second communication device including: a communication module and a processing module, the communication module is configured to receive from the first communication device the connection status information of the first session between the first communication device and the client, and The cached message communicated with the client, the message communicated with the client includes a request message, the request message is used to request the target data; the processing module is used to establish a second session with the client according to the connection state information; the communication module , used to send the target data to the client through the second session; the communication module is used to send the unique identifier of the second communication device to the load balancing server, and the unique identifier of the second communication device is used to update the flow entry. Before the update, The flow entry is used to indicate that the message from the client is forwarded to the first communication device, and after being updated, the flow entry is used to indicate that the message from the client is forwarded to the second communication device.
  • the unique identifier of the second communications device is a custom identifier, or a real network protocol address of the second communications device, or a media access control address of the second communications device.
  • a third communication device including: a communication module and a processing module, the communication module is configured to send a request message from a client to the first communication device, and the request message is used to request target data; the processing module uses In order to establish a flow entry, the flow entry indicates that the message from the client is forwarded to the first communication device; the communication module is used to receive the unique identifier of the second communication device from the second communication device; the processing module is used to receive the unique identifier of the second communication device according to the second communication The unique identifier of the device updates a flow entry, and the flow entry indicates that the message from the client is forwarded to the second communication device.
  • the unique identifier of the second communications device is a custom identifier, or a real network protocol address of the second communications device, or a media access control address of the second communications device.
  • a first communication device including: a communication module and a processing module, the communication module is configured to receive a request message from a client from a load balancing server, and the request message is used to request target data; the processing module is configured to The first session is established with the client; the processing module is used to determine that the target data is stored in the second communication device according to the request message and the resource list; the communication module is used to send the connection state information of the first session and the cached information to the second communication device A message communicated with the client; a processing module, configured to disconnect the first session.
  • a communication system including the second communication device described in the fourth aspect and any implementation manner thereof, the third communication device described in the fifth aspect and any implementation manner thereof, and, The first communication device as described in the sixth aspect.
  • a computer-readable storage medium storing one or more programs, the one or more programs include instructions, and when the instructions are executed on the communication device, the communication device performs the first aspect and any implementation thereof.
  • a computer program product containing instructions.
  • the communication device When the instructions are run on the communication device, the communication device is made to execute the method described in the first aspect and any implementation thereof, or to execute the method described in the second aspect. The method described in any implementation manner thereof, or, perform the method described in the third aspect.
  • FIG. 1 is a schematic structural diagram of a communication system provided by an embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of another communication system provided by an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of another communication system provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of another communication system provided by an embodiment of the present application.
  • FIG. 5 is a schematic flow diagram of a data request method provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a command issued by a communication device provided in an embodiment of the present application.
  • FIG. 7 is a schematic diagram of migrating connection state information of a session provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of migrating cached messages provided by an embodiment of the present application.
  • Fig. 9 is a schematic diagram of a comparison between an original scheme provided in the embodiment of the present application and this scheme.
  • FIG. 10 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of another communication device provided by an embodiment of the present application.
  • Words such as “exemplary” or “for example” involved in the embodiments of the present application are used to represent examples, illustrations or descriptions. Any embodiment or design described herein as “exemplary” or “for example” is not to be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as “exemplary” or “such as” is intended to present related concepts in a concrete manner.
  • the content delivery network is an intelligent virtual network built on the basis of the existing network, relying on the edge servers deployed in various places, and through the load balancing, content distribution, scheduling and other functions of the central platform, it makes users nearby Obtain the desired content, reduce network congestion, and improve user access response speed and hit rate.
  • Elastic load balancing which automatically distributes incoming application traffic among multiple targets, can handle changing application traffic loads.
  • ALB Application load balancing
  • HTTP hypertext transfer protocol
  • HTTPS hypertext transfer protocol secure
  • HTTPS hypertext transfer protocol secure
  • UDP fast user datagram protocol
  • UDP Internet connections
  • QUIC quick UDP internet connections
  • HTTP an application-layer protocol for distributed, collaborative, and hypermedia information systems, is the basis for data communication on the Internet.
  • HTTPS a transport protocol for secure communication over a computer network.
  • HTTPS communicates over HTTP, but utilizes secure sockets layer (SSL)/transport layer security (TLS) to encrypt packets.
  • SSL secure sockets layer
  • TLS transport layer security
  • UDP a simple datagram-oriented communication protocol, resides at the transport layer.
  • QUIC a general-purpose transport layer network protocol
  • UDP Transmission Control Protocol
  • TCP a connection-oriented, reliable, byte stream-based transport layer communication protocol.
  • MAC Media access control
  • MAC Media access control
  • XDP Express Data Path
  • Inter-board traffic in order to serve the user's traffic request, additional useless data copy and network traffic transmission are generated when the traffic request is provided between the production equipment and the service process.
  • the quintuple refers to the entry in the flow table, including the source Internet protocol (internet protocol, IP) address, source port number, destination IP address, destination port number, and communication protocol of the packet forwarding path.
  • IP Internet protocol
  • the real server (real server, RS), the real server, can also be called the back-end resource node, each node in the cluster, etc.
  • Direct routing direct routing
  • the scheduler of the load balancing server only receives the request message sent by the client and forwards the request message to the back-end RS, and the back-end RS processes the request message directly Send a response message including the target data to the client without going through the dispatcher again.
  • This mode is suitable for scenarios where the upload traffic is small and the download traffic is large.
  • the embodiment of the present application provides a communication system based on a CDN network, including: a client 11, an ELB server 12 and a plurality of RSs 13, wherein the ELB server 12 adopts a direct routing mode.
  • the communication system works as follows:
  • the client 11 sends a request message to the ELB server 12 .
  • Request messages are used to request target data, for example, request to play a video.
  • the ELB server 12 randomly forwards the request message to the RS 13.
  • the ELB server 12 randomly forwards the request message to RS1.
  • S3, RS 13 analyze whether the requested target data of the request message is in the server, if not in the server, then request the target data to other RSs.
  • RS1 checks that the target data requested by the request message is not in RS1, then RS1 requests the target data from RS2.
  • S4 RS 13 returns a response message including target data to the host client.
  • the ELB server 12 cannot perceive the business, so it cannot distribute the request message to the designated RS 13, and inter-board traffic will be generated in step S3, and the inter-board traffic accounts for about 40% of the total traffic, which increases the traffic load , and the accuracy is only 1/N (N is the number of RS 13), resulting in a waste of server resources (wasting (N-1)/N).
  • the embodiment of the present application provides another communication system based on a CDN network, including: a client 11, an ELB server 12, a plurality of RSs 13 and a plurality of ALB servers 14.
  • the communication system works as follows:
  • the client 11 sends a request message to the ELB server 12 .
  • the ELB server 12 forwards the request message to the ALB server 14 according to the distribution rule.
  • the ALB server 14 parses the target address in the request message, and forwards the request message to the corresponding RS 13.
  • S4 RS 13 sends a response message including target data to ALB server 14.
  • the ALB server 14 sends a response message including the target data to the client 11.
  • the problem existing in this communication system Although the ALB server 14 can directly find the RS13 storing the target data, it still cannot solve the problem of inter-board traffic. In the whole process, only the inter-board traffic between RS 13 is transferred to the traffic between RS 13 and ALB server 14, the traffic is not reduced, and the pressure on bandwidth is not eliminated. And the ALB server 14 will become a bottleneck point, causing traffic congestion and increasing time delay. When the traffic is too large, the ALB server 14 will become the bottleneck point in the entire request link, resulting in excessively long delay of the entire request and poor user experience. In addition, resources will be wasted, and the newly added ALB server 14 requires a software server or hardware implementation, which causes large-scale waste of resources and increases the cost of the service provider.
  • the embodiment of the present application provides another communication system based on a CDN network, including: a client 11, an ELB server 12 and a plurality of RS 13.
  • the communication system works as follows:
  • the client 11 sends a request message to the ELB server 12 .
  • the ELB server 12 forwards the request message to the RS 13 according to the distribution rules.
  • the returned response message may also include information such as MAC and IP address of the target RS.
  • the client 11 receives the response message. If the response message includes error information, the client 11 sends the request message again until the target data is hit.
  • the client 11 may directly send the request message to the target RS through the ELB server 12 .
  • the dotted arrow in FIG. 3 shows the interaction process when the target data requested by the request message is not stored in RS1
  • the solid line arrow shows the interaction process when the target data requested by the request message is stored in RS2.
  • the embodiment of the present application provides another communication system based on CDN network, including: client 41, edge gateway 42, load balancing server 43, first communication device 44, second communication device 45, back End host 46 and cloud server 47.
  • the edge gateway 42 is used to forward the request message from the client 41 to the load balancing server 43 .
  • the backend host 46 is used to query the cloud server for resource data and feed back the resource data to the first communication device 44 or the second communication device 45 .
  • the cloud server 47 is used to provide and update resource data (such as video, audio, etc.).
  • the load balancing server 43 is used for distributing the request message from the client 41 to the first communication device 44 or the second communication device 45 .
  • a flow table is stored in the load balancing server 43, and the flow table includes flow entries.
  • the load balancing server 43 receives the request message from the client 41 for the first time, it determines that it needs to be forwarded to the first communication device 44 according to the distribution rule. , the load balancing server 43 creates a new flow entry to instruct to forward subsequent messages from the client 41 to the first communication device 44 . If the load balancing server 43 subsequently receives other messages from the client 41 , the load balancing server 43 may forward the message to the first communication device 44 according to the flow entry.
  • the first communication device 44 and the second communication device 45 may be the aforementioned RS, or a board on the RS, or an RS processor, or the like. Wherein, the differences and connections between the first communication device 44 and the second communication device 45 include: the first communication device 44 does not store the target data requested by the client 41 , and the second communication device 45 stores the target data requested by the client 41 .
  • the virtual internet protocol (virtual internet protocol, VIP) addresses of the first communication device 44 and the second communication device 45 are the same, and the port numbers are the same, but the unique identifiers of the first communication device 44 and the second communication device 45 (such as real IP addresses, MAC addresses) are different, so that the load balancing server 43 distinguishes the first communication device 44 and the second communication device 45 according to the unique identifier.
  • VIP virtual internet protocol
  • the communication system can implement the following data request methods:
  • the client 41 sends a request message to the load balancing server 43 through the edge gateway 42 for the first time to request target data.
  • the load balancing server 43 sends the request message to the first communication device 44 according to the distribution rule.
  • the first communication device 44 establishes a connection with the client 41 after parsing the request message. Since the first communication device 44 does not store the target data requested by the client 41, the first communication device 44 determines that the target data requested by the client 41 is located in the second The communication device 45 , therefore, the management plane of the first communication device 44 sends an instruction to migrate the established session and related data to the second communication device 45 .
  • the second communication device 45 notifies the load balancing server 43 to update the flow table, and locates subsequent request messages for the same target data to the second communication device 45 .
  • the client 41 subsequently sends a request message to the load balancing server 43 through the edge gateway 42, and the load balancing server 43 directly forwards the request message to the second communication device 45 according to the updated flow table.
  • the second communication device can directly send the target data requested by the client 41 to the client 41.
  • the entire interaction process only increases the minimal traffic in the data migration step, and eliminates the inter-board consumption of transmission resources between nodes. flow.
  • this embodiment of the application provides a data request method, as shown in Figure 5, the method includes:
  • the load balancing server 43 receives a request message from the client 41, and forwards it to the first communication device 44 according to a distribution rule.
  • the client 41 sends a request message to the load balancing server 43 through the edge gateway 42 for the first time to request target data, for example, to request live broadcast or video on demand.
  • the load balancing server 43 sends the request message to the first communication device 44 according to the distribution rule.
  • the first communication device 44 receives the request message from the client 41 from the load balancing server 43 .
  • the load balancing server 43 determines to forward the request message to the first communication device 44 according to the distribution rule, and the load balancing server 43 will create a flow entry at this time, and the flow entry includes a quintuple and a unique identifier of the first communication device 44 (such as The user-defined identifier, or the mapping relationship between the real IP address or the MAC address of the first communication device 44, or includes the unique identifier of the first communication device 44 (for example, included in the quintuple of the flow entry).
  • the flow entry is used to indicate to forward the message from the client 41 to the first communication device 44 .
  • source IP address (the IP address of client 41), source port number (port number of client 41), destination IP address (the IP address of the first communication device 44 or the second communication device 45 (real IP address or virtual IP address)), destination port number (the port number of the first communication device 44 or the second communication device 45), and communication protocol.
  • destination IP address the IP address of the first communication device 44 or the second communication device 45 (real IP address or virtual IP address)
  • destination port number (the port number of the first communication device 44 or the second communication device 45)
  • communication protocol the virtual IP addresses of the first communication device 44 and the second communication device 45 are the same but the real IP addresses are different.
  • the quintuples corresponding to the first communication device 44 and the second communication device 45 are different, and the load balancing server 43 according to the quintuples in the flow entry (including the first The unique identifier of the communication device 44) or the unique identifier of the first communication device 44 can forward the subsequently received message from the client 41 to the first communication device 44.
  • the quintuples corresponding to the first communication device 44 and the second communication device 45 are the same, so the flow table
  • the item may include the mapping relationship between the quintuple and the unique identifier of the first communication device 44, so that the load balancing server 43 forwards the subsequently received message from the client 41 to the first communication device 44 according to the mapping relationship in the flow entry. device 44.
  • the first communication device 44 establishes a first session with the client 41.
  • the first communication device 44 establishes a connection with the client 41 after parsing the request message.
  • the first communication device establishes the first session with the client 41 in different ways. For example, for communication protocols such as HTTP and HTTPS, the first communication device establishes a first session with the client 41 through TCP. For communication protocols such as QUIC, the first communication device establishes a first communication connection with the client 41 through UDP.
  • the first communication device 44 determines to store the target data in the second communication device 45 according to the request message and the resource list.
  • the application layer of the first communication device 44 determines that the target data requested by the client 41 is located in the second communication device 45 according to the request message and the resource list.
  • the resource list indicates the mapping relationship between the identifier of the data and the unique identifier (eg, MAC address) of the communication device storing the data. Include the identification of the requested target data in the request message, and the first communication device 44 searches the resource list according to the identification of the target data, thereby determining that the unique identification of the communication device storing the target data is the unique identification of the second communication device 45 (such as a custom identification, or, the real IP address or MAC address of the second communication device 45).
  • the unique identification of the communication device storing the target data is the unique identification of the second communication device 45 (such as a custom identification, or, the real IP address or MAC address of the second communication device 45).
  • the first communication device 44 sends the connection state information of the first session and the cached communication message with the client 41 to the second communication device 45 .
  • the second communication device 45 receives from the first communication device 44 the connection status information of the first session between the first communication device 44 and the client 41 and the request message from the client 41 .
  • the management plane of the first communication device 44 issues a protocol migration command to migrate the stored connection state information of the first session.
  • the first communication device 44 will block (cork) the data flow transmitted between the client 41, or in other words, block the session (session) with the client 41 .
  • the first communication device 44 may send connection status information of the first session based on QUIC, HTTP, HTTPS, TCP, UDP and other communication protocols to the second communication device 45 .
  • connection status information of the first session refers to the link status of the communication protocol, such as the status information of the state machine of the HTTPS communication protocol, and the connection identification number (connection identification) of the QUIC communication protocol. , CID).
  • communication protocols such as TCP and UDP are used, and the connection status information of the first session refers to the socket information of the communication protocol, such as the time window status information of the TCP communication protocol, and the three-way handshake status information of the TCP communication protocol (such as sequence number (sequence number)).
  • the management of the first communication device 44 issues a data migration command to the forwarding module to migrate the cached messages communicated with the client 41 .
  • the message communicated with the client 41 may include the request message received by the first communication device 44 before, and may also include other messages from the client 41 subsequently received by the first communication device 44;
  • the communication message can be sent in the form of the original message or in the form of effective information in the message.
  • the messages communicated with the client 41 cached by the first communication device 44 include messages communicated with the client 41 cached at the application layer (such as an application program (APP)) and cached at the kernel Layer cached messages communicated with the client 41, so the first communication device 44 sends the message communicated with the client 41 cached in the application layer to the second communication device 45 through message forwarding of the application layer,
  • the first communication device 44 sends the message communicated with the client 41 cached at the kernel layer and cached within the time window to the second communication device 45 through message forwarding at the kernel layer (for example, XDP redirection (redirect)). message.
  • the kernel layer for example, XDP redirection (redirect)
  • the second communication device 45 establishes a second session with the client 41 according to the connection status information of the first session.
  • the second communication device 45 uncorks the second session with the client 41 according to the connection status information of the first session, and then resumes the data flow with the client 41 .
  • the client 41 For example, restore the link state of the HTTP communication protocol, restore the link state of the QUIC communication protocol, and so on.
  • the first communication device 44 disconnects the first session with the client 41.
  • the first communication device 44 disconnects the first session with the client 41 , and at this time, the first communication device 44 deletes the connection state information of the first session.
  • the second communication device 45 sends the target data to the client 41 through the second session.
  • the second communication device 45 may adopt the DR mode to send the target data to the client 41 through the second session.
  • steps S105 to S107 are not required to be performed sequentially.
  • the second communication device 45 sends the unique identifier of the second communication device 45 to the load balancing server 43 .
  • the management of the second communication device 45 sends a flow table update command to the load balancing server 43 , and the flow table update command includes the unique identifier of the second communication device 45 .
  • the second communication device 45 may send the unique identifier of the second communication device 45 to the load balancing server 43 to update the flow entry of the flow table in the load balancing server 43 .
  • the unique identification of the second communication device 45 may include a custom identification, or the real IP address or MAC address of the second communication device 45, or the unique identification of the second communication device 45 may include other unique identifier of .
  • the load balancing server 43 updates the flow entry according to the unique identifier of the second communication device 45.
  • the flow entry includes the quintuple and the unique identifier of the first communication device 44 (such as a custom ID, or the real IP address or MAC address of the first communication device 44)
  • the mapping relationship among them or, includes the unique identifier of the first communication device 44, and the flow entry is used to indicate that the message from the client 41 is forwarded to the first communication device 44.
  • the flow entry After the update, the flow entry includes a mapping relationship between the quintuple and the unique identifier of the second communication device 45 (such as a custom ID, or the real IP address or MAC address of the second communication device 45), or, Including the unique identifier of the second communication device 45 , at this time, the flow entry is used to indicate that the message from the client 41 is forwarded to the second communication device 45 .
  • a mapping relationship between the quintuple and the unique identifier of the second communication device 45 such as a custom ID, or the real IP address or MAC address of the second communication device 45
  • the flow entry is used to indicate that the message from the client 41 is forwarded to the second communication device 45 .
  • the client 41 sends a request message to the load balancing server 43 to request target data, for example, request to play a video.
  • the load balancing server 43 randomly forwards the request message to the first communication device 44.
  • the first communication device 44 requests the target data from the second communication device 45 because the target data requested by the parsing request message is not in the local area.
  • the first communication device 44 returns a response message including the target data to the host client 41 .
  • the following process is passed: S1', after the second communication device 45 instructs the load balancing server 43 to update the flow table.
  • S2' The load balancing server 43 may directly forward the subsequently received message from the client 41 to the second communication device 45 according to the updated flow table.
  • S3' the second communication device 45 sends the target data to the client 41.
  • the transmission of target data between the first communication device 44 and the second communication device 45 is avoided.
  • the data request method, communication device, server, and communication system replace the connection status information of the session and the cached communication with the client between the communication devices that store data, instead of
  • the transmission of target data between communication devices can reduce the traffic between communication devices storing data, reduce the number of communication devices, save costs, and reduce the delay of the first packet (open frequency). And it is not limited to cloud scenarios and CDN scenarios, and can also be applied to other scenarios where inter-board traffic exists.
  • the embodiment of the present application also provides a communication device 1000, which can be the first communication device 44, the second communication device 45 or the load balancing server 43 (which can be referred to as the first Three communication devices), configured to execute the method shown in FIG. 5 .
  • the communication device 1000 includes a processing module 1001 and a communication module 1002 .
  • the communication module 1002 is configured to receive a request message from a client from a load balancing server, and the request message is used to request target data.
  • the processing module 1001 is configured to establish a first session with the client.
  • the processing module 1001 is configured to determine, according to the request message and the resource list, that the target data is stored in the second communication device.
  • the communication module 1002 is further configured to send the connection state information of the first session and the cached communication message with the client to the second communication device.
  • the processing module 1001 is also configured to disconnect the first session.
  • the communication module 1002 is configured to receive from the first communication device the connection state information of the first session between the first communication device and the client and the cached
  • the messages communicated between the client and the client include request messages, and the request messages are used to request target data.
  • the processing module 1001 is used to establish a second session with the client according to the connection state information; the communication module 1002 is used to send target data to the client through the second session; the communication module 1002 is used to send the unique identifier of the second communication device to the load balancing server , the unique identifier of the second communication device is used to update the flow entry. Before the update, the flow entry is used to indicate that the message from the client is forwarded to the first communication device. After the update, the flow entry is used to indicate that the message from the client will be forwarded. The message from the terminal is forwarded to the second communication device.
  • the communication module 1002 is used to send a request message from the client to the first communication device, and the request message is used to request target data; the processing module 1001 is used to establish a flow entry, The flow entry indicates that the message from the client is forwarded to the first communication device; the communication module 1002 is used to receive the unique identification of the second communication device from the second communication device; the processing module 1001 is used to update the flow according to the unique identification of the second communication device An entry, the flow entry indicates that the message from the client is forwarded to the second communication device.
  • the first communication device 44, the second communication device 45, and the load balancing server 43 in the embodiment of the present application may be implemented by the communication device (also referred to as a communication device) 1100 in FIG. 11 .
  • FIG. 11 is a schematic structural diagram of a communication device 1100 provided by an embodiment of the present application.
  • the communication device 1100 includes one or more processors 1101 , a memory 1102 and at least one communication interface 1103 .
  • Processor 1101 may be a chip. For example, it can be a field programmable gate array (field programmable gate array, FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), or a central processing unit. It can also be a central processor unit (CPU), a network processor (network processor, NP), a digital signal processing circuit (digital signal processor, DSP), or a microcontroller (micro controller unit, MCU) , and can also be a programmable logic device (programmable logic device, PLD) or other integrated chips.
  • the processor 1101 may correspond to the processing module 1001 described above.
  • the communication interface 1103 may be a transceiver module for communicating with other devices or communication networks, such as Ethernet, wireless local area networks (wireless local area networks, WLAN) and the like.
  • the communication interface 1103 may also be a transceiver circuit located in the processor 1101 to realize signal input and signal output of the processor.
  • the communication interface 1103 is responsible for communicating with other devices or communication networks, which is not specifically limited in this embodiment of the present application.
  • the communication interface 1103 may correspond to the aforementioned communication module 1002 .
  • the storage 1102 may be a device having a storage function.
  • it can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (random access memory, RAM) or other types of memory that can store information and instructions
  • a dynamic storage device can also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be stored by a computer Any other medium, but not limited to.
  • the memory 1102 may exist independently and be connected to the processor through a communication line. Memory can also be integrated with the processor.
  • the memory 1102 is used to store instructions and be executed by the processor 1101 .
  • the processor 1101 is configured to execute instructions stored in the memory 1102, so as to implement the method provided in the embodiment of the present application.
  • the instructions in the embodiment of the present application may also be referred to as application program code, which is not specifically limited in the embodiment of the present application.
  • An embodiment of the present application provides a computer-readable storage medium that stores one or more programs, where the one or more programs include instructions, and when the instructions are executed by a communication device, the communication device executes the method shown in FIG. 5 .
  • An embodiment of the present application provides a computer program product including instructions, and when the instructions are run on a communication device, the communication device is made to execute the method shown in FIG. 5 .
  • sequence numbers of the above-mentioned processes do not mean the order of execution, and the execution order of the processes should be determined by their functions and internal logic, and should not be used in the embodiments of the present application.
  • the implementation process constitutes any limitation.
  • modules and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
  • the disclosed systems, devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the modules is only a logical function division. In actual implementation, there may be other division methods.
  • multiple modules or components can be combined or May be integrated into another device, or some features may be omitted, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or modules may be in electrical, mechanical or other forms.
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • a software program it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server, or data center Transmission to another website site, computer, server or data center via wired (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or may be a data storage device including one or more servers, data centers, etc. that can be integrated with the medium.
  • the available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (Solid State Disk, SSD)), etc.
  • a magnetic medium such as a floppy disk, a hard disk, or a magnetic tape
  • an optical medium such as a DVD
  • a semiconductor medium such as a solid state disk (Solid State Disk, SSD)

Abstract

The present application relates to the field of computers. Disclosed are a data request method, a communication apparatus, and a communication system, which are used for reducing the traffic between communication apparatuses for storing data. The data request method comprises: a second communication apparatus receiving, from a first communication apparatus, connection state information of a first session between the first communication apparatus and a client, and a message of communication with the client, wherein the message of communication with the client comprises a request message for requesting target data; the second communication apparatus establishing a second session with the client according to the connection state information; the second communication apparatus sending the target data to the client by means of the second session; and the second communication apparatus sending a unique identifier of the second communication apparatus to a load balancing server, wherein the unique identifier of the second communication apparatus is used for updating a flow table entry; and the flow table entry is used for instructing the forwarding of the message from the client to the first communication apparatus before being updated, and the flow table entry is used for instructing the forwarding of the message from the client to the second communication apparatus after being updated.

Description

数据请求方法、通信装置和通信系统Data request method, communication device and communication system
本申请要求于2021年10月9日提交国家知识产权局、申请号为202111178020.4、申请名称为“数据请求方法、通信装置和通信系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to a Chinese patent application with application number 202111178020.4 and titled "Data Request Method, Communication Device, and Communication System" filed with the State Intellectual Property Office on October 9, 2021, the entire contents of which are hereby incorporated by reference In this application.
技术领域technical field
本申请涉及计算机领域,尤其涉及一种数据请求方法、通信装置和通信系统。The present application relates to the computer field, and in particular to a data request method, communication device and communication system.
背景技术Background technique
随着移动互联网、云计算、大数据等互联网新技术、新业务的快速发展,通过建立内容分发网络(content delivery network,CDN)可以缓解互联网网络拥塞,提高互联网业务响应速度,改善用户业务体验。With the rapid development of new Internet technologies and services such as mobile Internet, cloud computing, and big data, the establishment of a content delivery network (CDN) can alleviate Internet network congestion, improve Internet service response speed, and improve user service experience.
在CDN中,客户端通过负载均衡服务器向多个真实服务器中的一个真实服务器发送请求消息,以请求目标数据,由于负载均衡服务器无法感知目标数据的存储位置,所以负载均衡服务器每次向一个真实服务器转发请求消息,目标数据可能不存储在该真实服务器上,该真实服务器会从其他真实服务器获取目标数据并发送给客户端。各个真实服务器之间传输目标数据会对系统带宽造成了很大的压力。In a CDN, the client sends a request message to one of multiple real servers through the load balancing server to request target data. Since the load balancing server cannot perceive the storage location of the target data, the load balancing server sends a request message to a real The server forwards the request message, and the target data may not be stored on the real server, and the real server will obtain the target data from other real servers and send it to the client. The transfer of target data between various real servers will put a lot of pressure on the system bandwidth.
发明内容Contents of the invention
本申请实施例提供一种数据请求方法、通信装置和通信系统,用于减少存储数据的通信装置之间的流量。Embodiments of the present application provide a data request method, a communication device, and a communication system, which are used to reduce traffic between communication devices storing data.
为达到上述目的,本申请的实施例采用如下技术方案:In order to achieve the above object, the embodiments of the present application adopt the following technical solutions:
第一方面,提供了一种数据请求方法,包括:第二通信装置从第一通信装置接收第一通信装置与客户端之间的第一会话的连接状态信息以及缓存的与客户端之间通信的消息,与客户端之间通信的消息包括请求消息,请求消息用于请求目标数据;第二通信装置根据连接状态信息与客户端建立第二会话;第二通信装置通过第二会话向客户端发送目标数据;第二通信装置向负载均衡服务器发送第二通信装置的唯一标识,第二通信装置的唯一标识用于更新流表项,在更新之前,流表项用于指示将来自客户端的消息转发给第一通信装置,在更新之后,流表项用于指示将来自客户端的消息转发给第二通信装置。In a first aspect, a method for requesting data is provided, including: the second communication device receives from the first communication device the connection state information of the first session between the first communication device and the client and the cached communication with the client The message communicated with the client includes a request message, and the request message is used to request target data; the second communication device establishes a second session with the client according to the connection status information; the second communication device sends the client a second session through the second session Send the target data; the second communication device sends the unique identifier of the second communication device to the load balancing server, the unique identifier of the second communication device is used to update the flow entry, and before the update, the flow entry is used to indicate that the message from the client will Forwarding to the first communication device, after updating, the flow entry is used to indicate that the message from the client is forwarded to the second communication device.
本申请实施例提供的数据请求方法,通过在存储数据的通信装置之间传输会话的连接状态信息和缓存的与客户端之间通信的消息,代替在存储数据的通信装置之间传输目标数据,可以减少存储数据的通信装置之间的流量,减少通信装置的数量,节约成本,减少首包(开频)的时延。The data request method provided by the embodiment of the present application replaces the transmission of target data between the communication devices storing data by transmitting the connection state information of the session and the cached message communicated with the client between the communication devices storing data, It can reduce the traffic between communication devices storing data, reduce the number of communication devices, save costs, and reduce the time delay of the first packet (open frequency).
在一种可能的实施方式中,第二通信装置的唯一标识为自定义标识,或者,第二通信装置的真实网络协议地址,或者,第二通信装置的媒体接入控制地址。流表项中包括五元组与第二通信装置的唯一标识(例如自定义标识,或者,第二通信装置的真实网络协议地址,或者,第二通信装置的媒体接入控制地址)之间的映射关系,或者,包括第二通信装置的唯一标识。本申请不限定第二通信装置的唯一标识的具体形式, 只要能与第一通信装置相区别即可。In a possible implementation manner, the unique identifier of the second communications device is a custom identifier, or a real network protocol address of the second communications device, or a media access control address of the second communications device. The flow entry includes the quintuple and the unique identifier of the second communication device (for example, a custom ID, or the real network protocol address of the second communication device, or the media access control address of the second communication device). Alternatively, the mapping relationship includes the unique identifier of the second communication device. The present application does not limit the specific form of the unique identifier of the second communication device, as long as it can be distinguished from the first communication device.
第二方面,提供了一种数据请求方法,包括:负载均衡服务器向第一通信装置发送来自客户端的请求消息,请求消息用于请求目标数据;负载均衡服务器建立流表项,流表项指示将来自客户端的消息转发给第一通信装置;负载均衡服务器从第二通信装置接收第二通信装置的唯一标识;负载均衡服务器根据第二通信装置的唯一标识更新流表项,流表项指示将来自客户端的消息转发给第二通信装置。In a second aspect, a method for requesting data is provided, including: the load balancing server sends a request message from the client to the first communication device, the request message is used to request target data; the load balancing server establishes a flow entry, and the flow entry indicates that the The message from the client is forwarded to the first communication device; the load balancing server receives the unique identifier of the second communication device from the second communication device; the load balancing server updates the flow entry according to the unique identifier of the second communication device, and the flow entry indicates that the flow entry will come from The client's message is forwarded to the second communication device.
在一种可能的实施方式中,第二通信装置的唯一标识为自定义标识,或者,第二通信装置的真实网络协议地址,或者,第二通信装置的媒体接入控制地址。In a possible implementation manner, the unique identifier of the second communications device is a custom identifier, or a real network protocol address of the second communications device, or a media access control address of the second communications device.
第三方面,提供了一种数据请求方法,包括:第一通信装置从负载均衡服务器接收来自客户端的请求消息,请求消息用于请求目标数据;第一通信装置与客户端建立第一会话;第一通信装置根据请求消息和资源列表确定目标数据存储于第二通信装置;第一通信装置向第二通信装置发送第一会话的连接状态信息以及缓存的与客户端之间通信的消息;第一通信装置断开第一会话。In a third aspect, a data request method is provided, including: a first communication device receives a request message from a client from a load balancing server, and the request message is used to request target data; the first communication device establishes a first session with the client; A communication device determines that the target data is stored in the second communication device according to the request message and the resource list; the first communication device sends the connection status information of the first session and the cached communication message with the client to the second communication device; the first The communication device disconnects the first session.
第四方面,提供了一种第二通信装置,包括:通信模块和处理模块,通信模块,用于从第一通信装置接收第一通信装置与客户端之间的第一会话的连接状态信息以及缓存的与客户端之间通信的消息,与客户端之间通信的消息包括请求消息,请求消息用于请求目标数据;处理模块,用于根据连接状态信息与客户端建立第二会话;通信模块,用于通过第二会话向客户端发送目标数据;通信模块,用于向负载均衡服务器发送第二通信装置的唯一标识,第二通信装置的唯一标识用于更新流表项,在更新之前,流表项用于指示将来自客户端的消息转发给第一通信装置,在更新之后,流表项用于指示将来自客户端的消息转发给第二通信装置。In a fourth aspect, a second communication device is provided, including: a communication module and a processing module, the communication module is configured to receive from the first communication device the connection status information of the first session between the first communication device and the client, and The cached message communicated with the client, the message communicated with the client includes a request message, the request message is used to request the target data; the processing module is used to establish a second session with the client according to the connection state information; the communication module , used to send the target data to the client through the second session; the communication module is used to send the unique identifier of the second communication device to the load balancing server, and the unique identifier of the second communication device is used to update the flow entry. Before the update, The flow entry is used to indicate that the message from the client is forwarded to the first communication device, and after being updated, the flow entry is used to indicate that the message from the client is forwarded to the second communication device.
在一种可能的实施方式中,第二通信装置的唯一标识为自定义标识,或者,第二通信装置的真实网络协议地址,或者,第二通信装置的媒体接入控制地址。In a possible implementation manner, the unique identifier of the second communications device is a custom identifier, or a real network protocol address of the second communications device, or a media access control address of the second communications device.
第五方面,提供了一种第三通信装置,包括:通信模块和处理模块,通信模块,用于向第一通信装置发送来自客户端的请求消息,请求消息用于请求目标数据;处理模块,用于建立流表项,流表项指示将来自客户端的消息转发给第一通信装置;通信模块,用于从第二通信装置接收第二通信装置的唯一标识;处理模块,用于根据第二通信装置的唯一标识更新流表项,流表项指示将来自客户端的消息转发给第二通信装置。In a fifth aspect, a third communication device is provided, including: a communication module and a processing module, the communication module is configured to send a request message from a client to the first communication device, and the request message is used to request target data; the processing module uses In order to establish a flow entry, the flow entry indicates that the message from the client is forwarded to the first communication device; the communication module is used to receive the unique identifier of the second communication device from the second communication device; the processing module is used to receive the unique identifier of the second communication device according to the second communication The unique identifier of the device updates a flow entry, and the flow entry indicates that the message from the client is forwarded to the second communication device.
在一种可能的实施方式中,第二通信装置的唯一标识为自定义标识,或者,第二通信装置的真实网络协议地址,或者,第二通信装置的媒体接入控制地址。In a possible implementation manner, the unique identifier of the second communications device is a custom identifier, or a real network protocol address of the second communications device, or a media access control address of the second communications device.
第六方面,提供了一种第一通信装置,包括:通信模块和处理模块,通信模块,用于从负载均衡服务器接收来自客户端的请求消息,请求消息用于请求目标数据;处理模块,用于与客户端建立第一会话;处理模块,用于根据请求消息和资源列表确定目标数据存储于第二通信装置;通信模块,用于向第二通信装置发送第一会话的连接状态信息以及缓存的与客户端之间通信的消息;处理模块,用于断开第一会话。In a sixth aspect, a first communication device is provided, including: a communication module and a processing module, the communication module is configured to receive a request message from a client from a load balancing server, and the request message is used to request target data; the processing module is configured to The first session is established with the client; the processing module is used to determine that the target data is stored in the second communication device according to the request message and the resource list; the communication module is used to send the connection state information of the first session and the cached information to the second communication device A message communicated with the client; a processing module, configured to disconnect the first session.
第七方面,提供了一种通信系统,包括如第四方面及其任一实施方式所述的第二通信装置,如第五方面及其任一实施方式所述的第三通信装置,以及,如第六方面所述的第一通信装置。In a seventh aspect, a communication system is provided, including the second communication device described in the fourth aspect and any implementation manner thereof, the third communication device described in the fifth aspect and any implementation manner thereof, and, The first communication device as described in the sixth aspect.
第八方面,提供了一种存储一个或多个程序的计算机可读存储介质,一个或多个程序包括指令,当指令在通信装置执行时,使得通信装置执行如第一方面及其任一实施方式所述的方法,或者,执行如第二方面及其任一实施方式所述的方法,或者,执行如第三方面所述的方法。In an eighth aspect, there is provided a computer-readable storage medium storing one or more programs, the one or more programs include instructions, and when the instructions are executed on the communication device, the communication device performs the first aspect and any implementation thereof. The method described in the manner, or, execute the method described in the second aspect and any implementation manner thereof, or execute the method described in the third aspect.
第九方面,提供了一种包含指令的计算机程序产品,当指令在通信装置上运行时,使得通信装置执行如第一方面及其任一实施方式所述的方法,或者,执行如第二方面及其任一实施方式所述的方法,或者,执行如第三方面所述的方法。According to the ninth aspect, there is provided a computer program product containing instructions. When the instructions are run on the communication device, the communication device is made to execute the method described in the first aspect and any implementation thereof, or to execute the method described in the second aspect. The method described in any implementation manner thereof, or, perform the method described in the third aspect.
关于第二方面至第九方面的技术效果参照第一方面及其任一实施方式的技术效果。Regarding the technical effects of the second aspect to the ninth aspect, refer to the technical effects of the first aspect and any implementation thereof.
附图说明Description of drawings
图1为本申请实施例提供的一种通信系统的架构示意图;FIG. 1 is a schematic structural diagram of a communication system provided by an embodiment of the present application;
图2为本申请实施例提供的另一种通信系统的架构示意图;FIG. 2 is a schematic structural diagram of another communication system provided by an embodiment of the present application;
图3为本申请实施例提供的又一种通信系统的架构示意图;FIG. 3 is a schematic structural diagram of another communication system provided by an embodiment of the present application;
图4为本申请实施例提供的再一种通信系统的架构示意图;FIG. 4 is a schematic structural diagram of another communication system provided by an embodiment of the present application;
图5为本申请实施例提供的一种数据请求方法的流程示意图;FIG. 5 is a schematic flow diagram of a data request method provided by an embodiment of the present application;
图6为本申请实施例提供的一种通信装置下发命令的示意图;FIG. 6 is a schematic diagram of a command issued by a communication device provided in an embodiment of the present application;
图7为本申请实施例提供的一种会话的连接状态信息进行迁移的示意图;FIG. 7 is a schematic diagram of migrating connection state information of a session provided by an embodiment of the present application;
图8为本申请实施例提供的一种缓存的消息进行迁移的示意图;FIG. 8 is a schematic diagram of migrating cached messages provided by an embodiment of the present application;
图9为本申请实施例提供的一种原方案与本方案对比的示意图;Fig. 9 is a schematic diagram of a comparison between an original scheme provided in the embodiment of the present application and this scheme;
图10为本申请实施例提供的一种通信装置的结构示意图;FIG. 10 is a schematic structural diagram of a communication device provided by an embodiment of the present application;
图11为本申请实施例提供的另一种通信装置的结构示意图。FIG. 11 is a schematic structural diagram of another communication device provided by an embodiment of the present application.
具体实施方式Detailed ways
需要说明的是,本申请实施例涉及的术语“第一”、“第二”等仅用于区分同一类型特征的目的,不能理解为用于指示相对重要性、数量、顺序等。It should be noted that the terms "first", "second" and the like involved in the embodiments of the present application are only used for the purpose of distinguishing features of the same type, and cannot be interpreted as indicating relative importance, quantity, order and the like.
本申请实施例涉及的术语“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。Words such as "exemplary" or "for example" involved in the embodiments of the present application are used to represent examples, illustrations or descriptions. Any embodiment or design described herein as "exemplary" or "for example" is not to be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete manner.
首先对本申请涉及的概念进行描述:First, the concepts involved in this application are described:
内容分发网络(content delivery network,CDN),是构建在现有网络基础之上的智能虚拟网络,依靠部署在各地的边缘服务器,通过中心平台的负载均衡、内容分发、调度等功能,使用户就近获取所需内容,降低网络拥塞,提高用户访问响应速度和命中率。The content delivery network (CDN) is an intelligent virtual network built on the basis of the existing network, relying on the edge servers deployed in various places, and through the load balancing, content distribution, scheduling and other functions of the central platform, it makes users nearby Obtain the desired content, reduce network congestion, and improve user access response speed and hit rate.
弹性负载均衡(elastic load balancing,ELB),在多个目标之间,自动分配传入的应用程序流量,它可以处理不断变化的应用程序流量负载。Elastic load balancing (ELB), which automatically distributes incoming application traffic among multiple targets, can handle changing application traffic loads.
应用负载均衡(application load balancing,ALB),专门面向超文本传输协议(hypertext transfer protocol,HTTP)、超文本传输安全协议(hypertext transfer protocol secure,HTTPS)和快速用户数据报协议(user datagram protocol,UDP)互联网连接(quick UDP internet connections,QUIC)等应用层负载场景的负载均衡服务,具备超强弹性及大规模七层流量处理能力。Application load balancing (ALB), specifically for hypertext transfer protocol (hypertext transfer protocol, HTTP), hypertext transfer protocol secure (hypertext transfer protocol secure, HTTPS) and fast user datagram protocol (user datagram protocol, UDP ) Internet connections (quick UDP internet connections, QUIC) and other application layer load balancing services, with super elasticity and large-scale seven-layer traffic processing capabilities.
HTTP,一种用于分布式、协作式和超媒体信息系统的应用层协议,是互联网的数据通信的基础。HTTP, an application-layer protocol for distributed, collaborative, and hypermedia information systems, is the basis for data communication on the Internet.
HTTPS,一种通过计算机网络进行安全通信的传输协议。HTTPS经由HTTP进行通信,但利用安全套接字协议(secure sockets layer,SSL)/安全传输层协议(transport layer security,TLS)来加密数据包。HTTPS, a transport protocol for secure communication over a computer network. HTTPS communicates over HTTP, but utilizes secure sockets layer (SSL)/transport layer security (TLS) to encrypt packets.
UDP,一种简单的面向数据报的通信协议,位于传输层。UDP, a simple datagram-oriented communication protocol, resides at the transport layer.
QUIC,一种通用的传输层网络协议,使用UDP在两个端点之间创建若干个多路连接来实现,旨在提供几乎等同于传输控制协议(transmission control protocol,TCP)连接的可靠性,但延迟大大减少。QUIC, a general-purpose transport layer network protocol, is implemented using UDP to create several multi-way connections between two endpoints, aiming to provide almost the same reliability as Transmission Control Protocol (TCP) connections, but Latency is greatly reduced.
TCP,一种面向连接的、可靠的、基于字节流的传输层通信协议。TCP, a connection-oriented, reliable, byte stream-based transport layer communication protocol.
媒体接入控制(media access control,MAC),是局域网中数据链路层的下层部分,提供寻址及媒体访问的控制方式,使得不同设备或网络上的节点可以在多点的网络上通信,而不会互相冲突。Media access control (MAC), which is the lower part of the data link layer in the local area network, provides addressing and media access control methods, so that nodes on different devices or networks can communicate on a multi-point network. rather than conflict with each other.
快速数据路径(express data path,XDP),一种为Linux内核提供高性能、可编程的网络数据路径。Express Data Path (XDP), a high-performance, programmable network data path for the Linux kernel.
板间流量,为服务用户的流量请求,生产设备之间、服务进程之间为该流量请求提供服务时额外产生的无用数据拷贝和网络流量传输。Inter-board traffic, in order to serve the user's traffic request, additional useless data copy and network traffic transmission are generated when the traffic request is provided between the production equipment and the service process.
五元组,指流表中的表项,包括报文转发路径的源互联网协议(internet protocol,IP)地址、源端口号、目的IP地址、目的端口号、通信协议。The quintuple refers to the entry in the flow table, including the source Internet protocol (internet protocol, IP) address, source port number, destination IP address, destination port number, and communication protocol of the packet forwarding path.
真实服务器(real server,RS),真正的服务器,也可以称为后端资源节点、集群中各节点等。The real server (real server, RS), the real server, can also be called the back-end resource node, each node in the cluster, etc.
直接路由(direct routing,DR),负载均衡服务器的直接路由模式,负载均衡服务器的调度器只接收客户端发来的请求消息并将请求消息转发给后端的RS,后端的RS处理请求消息后直接把包括目标数据的响应消息发送给客户端,而不用再次经过调度器。该模式适用于上传流量小而下载流量大的场景。Direct routing (direct routing, DR), the direct routing mode of the load balancing server, the scheduler of the load balancing server only receives the request message sent by the client and forwards the request message to the back-end RS, and the back-end RS processes the request message directly Send a response message including the target data to the client without going through the dispatcher again. This mode is suitable for scenarios where the upload traffic is small and the download traffic is large.
如图1所示,本申请实施例提供了一种基于CDN网络的通信系统,包括:客户端11、ELB服务器12和多个RS 13,其中,该ELB服务器12采用直接路由模式。该通信系统的工作原理如下:As shown in Figure 1, the embodiment of the present application provides a communication system based on a CDN network, including: a client 11, an ELB server 12 and a plurality of RSs 13, wherein the ELB server 12 adopts a direct routing mode. The communication system works as follows:
S1、客户端11向ELB服务器12发送请求消息。S1. The client 11 sends a request message to the ELB server 12 .
请求消息用于请求目标数据,例如,请求播放视频。Request messages are used to request target data, for example, request to play a video.
S2、ELB服务器12将请求消息随机转发至RS 13。S2. The ELB server 12 randomly forwards the request message to the RS 13.
例如ELB服务器12将请求消息随机转发至RS1。For example, the ELB server 12 randomly forwards the request message to RS1.
S3、RS 13解析请求消息所请求的目标数据是否在本服务器,如果不在本服务器则向其他RS请求目标数据。S3, RS 13 analyze whether the requested target data of the request message is in the server, if not in the server, then request the target data to other RSs.
例如,RS1检查请求消息所请求的目标数据不在RS1中,则RS1从RS2请求目标数据。For example, RS1 checks that the target data requested by the request message is not in RS1, then RS1 requests the target data from RS2.
S4、RS 13向主机客户端返回包括目标数据的响应消息。S4, RS 13 returns a response message including target data to the host client.
该通信系统存在的问题:ELB服务器12无法感知业务,所以无法将请求消息分发至指定RS 13,在步骤S3中会产生板间流量,板间流量大概占总流量的40%,增加了 流量负荷,同时精度只有1/N(N为RS 13的数目),导致服务器资源浪费(浪费了(N-1)/N)。Problems in this communication system: the ELB server 12 cannot perceive the business, so it cannot distribute the request message to the designated RS 13, and inter-board traffic will be generated in step S3, and the inter-board traffic accounts for about 40% of the total traffic, which increases the traffic load , and the accuracy is only 1/N (N is the number of RS 13), resulting in a waste of server resources (wasting (N-1)/N).
如图2所示,本申请实施例提供了另一种基于CDN网络的通信系统,包括:客户端11、ELB服务器12、多个RS 13和多个ALB服务器14。该通信系统的工作原理如下:As shown in FIG. 2 , the embodiment of the present application provides another communication system based on a CDN network, including: a client 11, an ELB server 12, a plurality of RSs 13 and a plurality of ALB servers 14. The communication system works as follows:
S1、客户端11向ELB服务器12发送请求消息。S1. The client 11 sends a request message to the ELB server 12 .
S2、ELB服务器12将请求消息按照分发规则转发至ALB服务器14。S2. The ELB server 12 forwards the request message to the ALB server 14 according to the distribution rule.
S3、ALB服务器14解析请求消息中的目标地址,向相应的RS 13转发请求消息。S3. The ALB server 14 parses the target address in the request message, and forwards the request message to the corresponding RS 13.
S4、RS 13向ALB服务器14发送包括目标数据的响应消息。S4, RS 13 sends a response message including target data to ALB server 14.
S5、ALB服务器14向客户端11发送包括目标数据的响应消息。S5. The ALB server 14 sends a response message including the target data to the client 11.
该通信系统存在的问题:虽然ALB服务器14可以直接找到存储目标数据的RS13,但是仍无法解决板间流量的问题。在整个流程中,仅是将RS 13之间的板间流量转移为RS 13与ALB服务器14之间的流量,流量并未减少,对于带宽的压力并未消除。并且ALB服务器14会成为瓶颈点,造成流量阻塞并加大时延。当流量过大时,ALB服务器14会成为整个请求链路中的瓶颈点,导致整个请求的时延过长,用户体验差。另外,会造成资源浪费,新增的ALB服务器14需要软件服务器或者硬件实现,这就造成了大规模的资源浪费,增加了服务商的成本。The problem existing in this communication system: Although the ALB server 14 can directly find the RS13 storing the target data, it still cannot solve the problem of inter-board traffic. In the whole process, only the inter-board traffic between RS 13 is transferred to the traffic between RS 13 and ALB server 14, the traffic is not reduced, and the pressure on bandwidth is not eliminated. And the ALB server 14 will become a bottleneck point, causing traffic congestion and increasing time delay. When the traffic is too large, the ALB server 14 will become the bottleneck point in the entire request link, resulting in excessively long delay of the entire request and poor user experience. In addition, resources will be wasted, and the newly added ALB server 14 requires a software server or hardware implementation, which causes large-scale waste of resources and increases the cost of the service provider.
如图3所示,本申请实施例提供了又一种基于CDN网络的通信系统,包括:客户端11、ELB服务器12和多个RS 13。该通信系统的工作原理如下:As shown in FIG. 3 , the embodiment of the present application provides another communication system based on a CDN network, including: a client 11, an ELB server 12 and a plurality of RS 13. The communication system works as follows:
S1、客户端11向ELB服务器12发送请求消息。S1. The client 11 sends a request message to the ELB server 12 .
S2、ELB服务器12根据分发规则将请求消息转发至RS 13。S2. The ELB server 12 forwards the request message to the RS 13 according to the distribution rules.
S3、RS 13请求消息所请求的目标数据是否在本服务器,如果在本服务器则返回包括目标数据的响应消息,如果不在本服务器则返回包括错误指示的响应消息,并断开连接。Whether the requested target data of S3, RS 13 request message is in this server, if then return the response message that comprises target data in this server, if not then return the response message that comprises error indication in this server, and disconnect.
可选的,如果不在本服务器则返回的响应消息中还可以包括目标RS的MAC、IP地址等信息。Optionally, if not in the server, the returned response message may also include information such as MAC and IP address of the target RS.
S4、客户端11接收到响应消息,若响应消息中包括错误信息,则再次发送请求消息,直到命中目标数据。S4. The client 11 receives the response message. If the response message includes error information, the client 11 sends the request message again until the target data is hit.
可选的,如果响应消息中还包括目标RS的MAC、IP地址等信息,则客户端11可以通过ELB服务器12直接向目标RS发送请求消息。Optionally, if the response message further includes information such as the MAC and IP address of the target RS, the client 11 may directly send the request message to the target RS through the ELB server 12 .
例如,图3中虚线箭头示出了RS1中未存储请求消息所请求的目标数据时的交互流程,实线箭头示出了RS2中存储了请求消息所请求的目标数据的交互流程。For example, the dotted arrow in FIG. 3 shows the interaction process when the target data requested by the request message is not stored in RS1, and the solid line arrow shows the interaction process when the target data requested by the request message is stored in RS2.
该通信系统存在的问题:这种多次重连的方式虽然在理论上可以减少板间流量,但是随机性强,并且会导致端到端的流量增加,客户端还需要配合修改代码,可选的,ELB服务器也需要配合修改代码,以适配多次重连,并且影响首包(开频)的时延,且首包时延既不稳定也不可预测。Problems in this communication system: Although this method of multiple reconnections can theoretically reduce the traffic between boards, it is highly random and will lead to an increase in end-to-end traffic. The client also needs to cooperate with modifying the code. Optional , The ELB server also needs to modify the code to adapt to multiple reconnections and affect the delay of the first packet (open frequency), and the delay of the first packet is neither stable nor predictable.
如图4所示,本申请实施例提供了又一种基于CDN网络的通信系统,包括:客户端41、边缘网关42、负载均衡服务器43、第一通信装置44、第二通信装置45、后端主机46和云端服务器47。As shown in Figure 4, the embodiment of the present application provides another communication system based on CDN network, including: client 41, edge gateway 42, load balancing server 43, first communication device 44, second communication device 45, back End host 46 and cloud server 47.
边缘网关42用于将来自客户端41的请求消息转发给负载均衡服务器43。The edge gateway 42 is used to forward the request message from the client 41 to the load balancing server 43 .
后端主机46用于向云端服务器查询资源数据并向第一通信装置44或第二通信装置45反馈资源数据。The backend host 46 is used to query the cloud server for resource data and feed back the resource data to the first communication device 44 or the second communication device 45 .
云端服务器47用于提供并更新资源数据(例如视频、音频等)。The cloud server 47 is used to provide and update resource data (such as video, audio, etc.).
负载均衡服务器43用于将来自客户端41的请求消息分发给第一通信装置44或第二通信装置45。负载均衡服务器43中存储有流表,流表中包括流表项,当负载均衡服务器43第一次接收到来自客户端41的请求消息时,根据分发规则确定需要转发给第一通信装置44后,负载均衡服务器43会新建流表项,以指示将来自客户端41的后续消息转发给第一通信装置44。如果负载均衡服务器43后续再接收到来自客户端41的其他消息,则负载均衡服务器43可以根据流表项将消息转发给第一通信装置44。The load balancing server 43 is used for distributing the request message from the client 41 to the first communication device 44 or the second communication device 45 . A flow table is stored in the load balancing server 43, and the flow table includes flow entries. When the load balancing server 43 receives the request message from the client 41 for the first time, it determines that it needs to be forwarded to the first communication device 44 according to the distribution rule. , the load balancing server 43 creates a new flow entry to instruct to forward subsequent messages from the client 41 to the first communication device 44 . If the load balancing server 43 subsequently receives other messages from the client 41 , the load balancing server 43 may forward the message to the first communication device 44 according to the flow entry.
第一通信装置44和第二通信装置45可以为前文所述的RS,或者,RS上的板卡,或者,RS处理器等。其中,第一通信装置44与第二通信装置45的区别和联系包括:第一通信装置44未存储客户端41请求的目标数据,第二通信装置45存储了客户端41请求的目标数据。第一通信装置44和第二通信装置45的虚拟互联网协议(virtual internet protocol,VIP)地址相同,端口号相同,但是第一通信装置44和第二通信装置45的唯一标识(例如真实IP地址、MAC地址)不同,以便负载均衡服务器43根据唯一标识区分第一通信装置44和第二通信装置45。The first communication device 44 and the second communication device 45 may be the aforementioned RS, or a board on the RS, or an RS processor, or the like. Wherein, the differences and connections between the first communication device 44 and the second communication device 45 include: the first communication device 44 does not store the target data requested by the client 41 , and the second communication device 45 stores the target data requested by the client 41 . The virtual internet protocol (virtual internet protocol, VIP) addresses of the first communication device 44 and the second communication device 45 are the same, and the port numbers are the same, but the unique identifiers of the first communication device 44 and the second communication device 45 (such as real IP addresses, MAC addresses) are different, so that the load balancing server 43 distinguishes the first communication device 44 and the second communication device 45 according to the unique identifier.
该通信系统的可以执行如下数据请求方法:The communication system can implement the following data request methods:
S1、客户端41第一次通过边缘网关42向负载均衡服务器43发送请求消息,以请求目标数据。负载均衡服务器43根据分发规则将请求消息发送给第一通信装置44。S1. The client 41 sends a request message to the load balancing server 43 through the edge gateway 42 for the first time to request target data. The load balancing server 43 sends the request message to the first communication device 44 according to the distribution rule.
S2、第一通信装置44解析请求消息后与客户端41建立连接,由于第一通信装置44未存储客户端41请求的目标数据,第一通信装置44确定客户端41请求的目标数据位于第二通信装置45,因此,第一通信装置44的管理面发送指令,将已经建立好的会话以及相关数据迁移到第二通信装置45。S2. The first communication device 44 establishes a connection with the client 41 after parsing the request message. Since the first communication device 44 does not store the target data requested by the client 41, the first communication device 44 determines that the target data requested by the client 41 is located in the second The communication device 45 , therefore, the management plane of the first communication device 44 sends an instruction to migrate the established session and related data to the second communication device 45 .
S3、第二通信装置45通知负载均衡服务器43更新流表,将针对同一目标数据的后续请求消息定位至第二通信装置45。S3. The second communication device 45 notifies the load balancing server 43 to update the flow table, and locates subsequent request messages for the same target data to the second communication device 45 .
S4、客户端41后续通过边缘网关42向负载均衡服务器43发送请求消息,则负载均衡服务器43根据更新的流表将请求消息直接转发给第二通信装置45。S4. The client 41 subsequently sends a request message to the load balancing server 43 through the edge gateway 42, and the load balancing server 43 directly forwards the request message to the second communication device 45 according to the updated flow table.
S5、第二通信装置可以直接将客户端41所请求的目标数据发送给客户端41,整个交互过程只增加了数据迁移步骤中的极少流量,消除了各节点间传输资源所消耗的板间流量。S5. The second communication device can directly send the target data requested by the client 41 to the client 41. The entire interaction process only increases the minimal traffic in the data migration step, and eliminates the inter-board consumption of transmission resources between nodes. flow.
具体的,本申请实施例提供了一种数据请求方法,如图5所示,该方法包括:Specifically, this embodiment of the application provides a data request method, as shown in Figure 5, the method includes:
S101、负载均衡服务器43从客户端41接收请求消息,并根据分发规则转发给第一通信装置44。S101. The load balancing server 43 receives a request message from the client 41, and forwards it to the first communication device 44 according to a distribution rule.
客户端41第一次通过边缘网关42向负载均衡服务器43发送请求消息,以请求目标数据,例如,请求直播或点播中的视频。负载均衡服务器43根据分发规则将请求消息发送给第一通信装置44。相应地,第一通信装置44从负载均衡服务器43接收来自客户端41的请求消息。The client 41 sends a request message to the load balancing server 43 through the edge gateway 42 for the first time to request target data, for example, to request live broadcast or video on demand. The load balancing server 43 sends the request message to the first communication device 44 according to the distribution rule. Correspondingly, the first communication device 44 receives the request message from the client 41 from the load balancing server 43 .
负载均衡服务器43根据分发规则确定将请求消息转发给第一通信装置44,负载 均衡服务器43此时会建立流表项,流表项中包括五元组与第一通信装置44的唯一标识(例如自定义标识,或者,第一通信装置44的真实IP地址或MAC地址)之间的映射关系,或者,包括第一通信装置44的唯一标识(例如包括在流表项的五元组中)。流表项用于指示将来自客户端41的消息转发给第一通信装置44。The load balancing server 43 determines to forward the request message to the first communication device 44 according to the distribution rule, and the load balancing server 43 will create a flow entry at this time, and the flow entry includes a quintuple and a unique identifier of the first communication device 44 (such as The user-defined identifier, or the mapping relationship between the real IP address or the MAC address of the first communication device 44, or includes the unique identifier of the first communication device 44 (for example, included in the quintuple of the flow entry). The flow entry is used to indicate to forward the message from the client 41 to the first communication device 44 .
五元组中包括源IP地址(客户端41的IP地址)、源端口号(客户端41的端口号)、目的IP地址(第一通信装置44或第二通信装置45的IP地址(真实IP地址或虚拟IP地址))、目的端口号(第一通信装置44或第二通信装置45的端口号)、通信协议。如前文所述的,第一通信装置44和第二通信装置45的虚拟IP地址相同而真实IP地址不同,当客户端41相同时,如果五元组中的目标IP地址采用第一通信装置44或第二通信装置45的真实IP地址,则第一通信装置44和第二通信装置45对应的五元组是不同的,负载均衡服务器43根据流表项中的五元组(其中包括第一通信装置44的唯一标识)或者第一通信装置44的唯一标识即可以将后续接收的来自客户端41的消息转发给第一通信装置44。如果五元组中的目标IP地址采用第一通信装置44或第二通信装置45的虚拟IP地址,则第一通信装置44和第二通信装置45对应的五元组是相同的,所以流表项中可以包括五元组与第一通信装置44的唯一标识之间的映射关系,以便负载均衡服务器43根据流表项中该映射关系将后续接收的来自客户端41的消息转发给第一通信装置44。Include source IP address (the IP address of client 41), source port number (port number of client 41), destination IP address (the IP address of the first communication device 44 or the second communication device 45 (real IP address or virtual IP address)), destination port number (the port number of the first communication device 44 or the second communication device 45), and communication protocol. As mentioned above, the virtual IP addresses of the first communication device 44 and the second communication device 45 are the same but the real IP addresses are different. or the real IP address of the second communication device 45, then the quintuples corresponding to the first communication device 44 and the second communication device 45 are different, and the load balancing server 43 according to the quintuples in the flow entry (including the first The unique identifier of the communication device 44) or the unique identifier of the first communication device 44 can forward the subsequently received message from the client 41 to the first communication device 44. If the target IP address in the quintuple adopts the virtual IP address of the first communication device 44 or the second communication device 45, then the quintuples corresponding to the first communication device 44 and the second communication device 45 are the same, so the flow table The item may include the mapping relationship between the quintuple and the unique identifier of the first communication device 44, so that the load balancing server 43 forwards the subsequently received message from the client 41 to the first communication device 44 according to the mapping relationship in the flow entry. device 44.
S102、第一通信装置44与客户端41建立第一会话。S102. The first communication device 44 establishes a first session with the client 41.
第一通信装置44解析请求消息后与客户端41建立连接,针对第一会话采用的通信协议的不同,第一通信装置与客户端41建立第一会话的方式也不同。例如,对于HTTP、HTTPS等通信协议,第一通信装置与客户端41通过TCP建立第一会话。对于QUIC等通信协议,第一通信装置与客户端41通过UDP建立第一通信连接。The first communication device 44 establishes a connection with the client 41 after parsing the request message. Depending on the communication protocol used in the first session, the first communication device establishes the first session with the client 41 in different ways. For example, for communication protocols such as HTTP and HTTPS, the first communication device establishes a first session with the client 41 through TCP. For communication protocols such as QUIC, the first communication device establishes a first communication connection with the client 41 through UDP.
S103、第一通信装置44根据请求消息和资源列表确定目标数据存储于第二通信装置45。S103. The first communication device 44 determines to store the target data in the second communication device 45 according to the request message and the resource list.
由于第一通信装置44未存储客户端41请求的目标数据,第一通信装置44的应用层根据请求消息和资源列表确定客户端41请求的目标数据位于第二通信装置45。Since the first communication device 44 does not store the target data requested by the client 41 , the application layer of the first communication device 44 determines that the target data requested by the client 41 is located in the second communication device 45 according to the request message and the resource list.
资源列表指示了数据的标识与存储该数据的通信装置的唯一标识(例如MAC地址)之间的映射关系。请求消息中包括请求的目标数据的标识,第一通信装置44根据目标数据的标识查找资源列表,从而确定存储该目标数据的通信装置的唯一标识为第二通信装置45的唯一标识(例如自定义标识,或者,第二通信装置45的真实IP地址或MAC地址)。The resource list indicates the mapping relationship between the identifier of the data and the unique identifier (eg, MAC address) of the communication device storing the data. Include the identification of the requested target data in the request message, and the first communication device 44 searches the resource list according to the identification of the target data, thereby determining that the unique identification of the communication device storing the target data is the unique identification of the second communication device 45 (such as a custom identification, or, the real IP address or MAC address of the second communication device 45).
S104、第一通信装置44向第二通信装置45发送第一会话的连接状态信息以及缓存的与客户端41之间通信的消息。S104 , the first communication device 44 sends the connection state information of the first session and the cached communication message with the client 41 to the second communication device 45 .
相应地,第二通信装置45从第一通信装置44接收第一通信装置44与客户端41之间的第一会话的连接状态信息以及来自客户端41的请求消息。Correspondingly, the second communication device 45 receives from the first communication device 44 the connection status information of the first session between the first communication device 44 and the client 41 and the request message from the client 41 .
对于第一通信装置44向第二通信装置45发送第一会话的连接状态信息:For the first communication device 44 to send the connection state information of the first session to the second communication device 45:
如图6中的S1所示的,第一通信装置44的管理面下发协议迁移命令,以迁移存储的第一会话的连接状态信息。As shown by S1 in FIG. 6 , the management plane of the first communication device 44 issues a protocol migration command to migrate the stored connection state information of the first session.
如图7中的S1所示的,在此期间,第一通信装置44会阻塞(cork)与客户端41 之间传输的数据流,或者说,阻塞与客户端41之间的会话(session)。如图7中的S2所示的,第一通信装置44可以向第二通信装置45发送基于QUIC、HTTP、HTTPS、TCP、UDP等通信协议的第一会话的连接状态信息。As shown in S1 in FIG. 7, during this period, the first communication device 44 will block (cork) the data flow transmitted between the client 41, or in other words, block the session (session) with the client 41 . As shown in S2 in FIG. 7 , the first communication device 44 may send connection status information of the first session based on QUIC, HTTP, HTTPS, TCP, UDP and other communication protocols to the second communication device 45 .
对于第一会话采用QUIC、HTTP、HTTPS等通信协议,第一会话的连接状态信息指该通信协议的链路状态,例如HTTPS通信协议的状态机的状态信息,QUIC通信协议的连接号(connection identification,CID)。对于第一会话采用TCP、UDP等通信协议,第一会话的连接状态信息指该通信协议的套接字信息,例如TCP通信协议的时间窗口状态信息,TCP通信协议的三次握手状态信息(例如顺序号(sequence number))。For the first session, communication protocols such as QUIC, HTTP, and HTTPS are used, and the connection status information of the first session refers to the link status of the communication protocol, such as the status information of the state machine of the HTTPS communication protocol, and the connection identification number (connection identification) of the QUIC communication protocol. , CID). For the first session, communication protocols such as TCP and UDP are used, and the connection status information of the first session refers to the socket information of the communication protocol, such as the time window status information of the TCP communication protocol, and the three-way handshake status information of the TCP communication protocol (such as sequence number (sequence number)).
对于第一通信装置44向第二通信装置45发送缓存的与客户端41之间通信的消息:For the first communication device 44 to send the buffered message for communication with the client 41 to the second communication device 45:
如图6中的S2所示的,第一通信装置44的管理面向转发模块下发数据迁移命令,以迁移缓存的与客户端41之间通信的消息。As shown in S2 in FIG. 6 , the management of the first communication device 44 issues a data migration command to the forwarding module to migrate the cached messages communicated with the client 41 .
其中,与客户端41之间通信的消息既可以包括第一通信装置44之前接收的请求消息,还可以包括第一通信装置44后续接收的来自客户端41的其他消息;与客户端41之间通信的消息既可以以原报文的形式发送,也可以以报文中有效信息的形式发送。Wherein, the message communicated with the client 41 may include the request message received by the first communication device 44 before, and may also include other messages from the client 41 subsequently received by the first communication device 44; The communication message can be sent in the form of the original message or in the form of effective information in the message.
如图8所示,第一通信装置44缓存的与客户端41之间通信的消息包括在应用层(例如应用程序(application,APP))缓存的与客户端41之间通信的消息以及在内核层缓存的与客户端41之间通信的消息,所以,第一通信装置44通过应用层的报文转发来向第二通信装置45发送在应用层缓存的与客户端41之间通信的消息,第一通信装置44通过内核层的报文转发(例如XDP重定向(redirect))来向第二通信装置45发送在内核层缓存的与客户端41之间通信的消息以及在时间窗口期内缓存的报文。As shown in FIG. 8 , the messages communicated with the client 41 cached by the first communication device 44 include messages communicated with the client 41 cached at the application layer (such as an application program (APP)) and cached at the kernel Layer cached messages communicated with the client 41, so the first communication device 44 sends the message communicated with the client 41 cached in the application layer to the second communication device 45 through message forwarding of the application layer, The first communication device 44 sends the message communicated with the client 41 cached at the kernel layer and cached within the time window to the second communication device 45 through message forwarding at the kernel layer (for example, XDP redirection (redirect)). message.
S105、第二通信装置45根据第一会话的连接状态信息与客户端41建立第二会话。S105. The second communication device 45 establishes a second session with the client 41 according to the connection status information of the first session.
如图7中的S3所示的,第二通信装置45根据第一会话的连接状态信息恢复(uncork)与客户端41的第二会话,进而恢复与客户端41之间的数据流。例如恢复HTTP通信协议的链路状态,恢复QUIC通信协议的链路状态等。As shown in S3 in FIG. 7 , the second communication device 45 uncorks the second session with the client 41 according to the connection status information of the first session, and then resumes the data flow with the client 41 . For example, restore the link state of the HTTP communication protocol, restore the link state of the QUIC communication protocol, and so on.
S106、第一通信装置44断开与客户端41的第一会话。S106. The first communication device 44 disconnects the first session with the client 41.
如图7中的S4所示的,第一通信装置44断开与客户端41的第一会话,此时,第一通信装置44会删除第一会话的连接状态信息。As shown in S4 in FIG. 7 , the first communication device 44 disconnects the first session with the client 41 , and at this time, the first communication device 44 deletes the connection state information of the first session.
S107、第二通信装置45通过第二会话向客户端41发送目标数据。S107. The second communication device 45 sends the target data to the client 41 through the second session.
第二通信装置45可以采用DR模式,通过第二会话向客户端41发送目标数据。The second communication device 45 may adopt the DR mode to send the target data to the client 41 through the second session.
需要说明的是步骤S105-步骤S107无先后执行顺序的要求。It should be noted that steps S105 to S107 are not required to be performed sequentially.
S108、第二通信装置45向负载均衡服务器43发送第二通信装置45的唯一标识。S108 , the second communication device 45 sends the unique identifier of the second communication device 45 to the load balancing server 43 .
如图6中S3所示的,第二通信装置45的管理面向负载均衡服务器43发送流表更新命令,流表更新命令中包括第二通信装置45的唯一标识。如图7中S5所示的,第二通信装置45可以向负载均衡服务器43发送第二通信装置45的唯一标识,以更新负载均衡服务器43中的流表的流表项。As shown in S3 in FIG. 6 , the management of the second communication device 45 sends a flow table update command to the load balancing server 43 , and the flow table update command includes the unique identifier of the second communication device 45 . As shown in S5 in FIG. 7 , the second communication device 45 may send the unique identifier of the second communication device 45 to the load balancing server 43 to update the flow entry of the flow table in the load balancing server 43 .
第二通信装置45的唯一标识可以包括自定义标识,或者,第二通信装置45的真实IP地址或MAC地址,或者,第二通信装置45的唯一标识可以包括其他能够唯一指示第二通信装置45的唯一标识。The unique identification of the second communication device 45 may include a custom identification, or the real IP address or MAC address of the second communication device 45, or the unique identification of the second communication device 45 may include other unique identifier of .
S109、负载均衡服务器43根据第二通信装置45的唯一标识更新流表项。S109. The load balancing server 43 updates the flow entry according to the unique identifier of the second communication device 45.
如步骤S101中所描述的,在更新之前,流表项中包括五元组与第一通信装置44的唯一标识(例如自定义标识,或者,第一通信装置44的真实IP地址或MAC地址)之间的映射关系,或者,包括第一通信装置44的唯一标识,此时流表项用于指示将来自客户端41的消息转发给第一通信装置44。在更新之后,流表项中包括五元组与第二通信装置45的唯一标识(例如自定义标识,或者,第二通信装置45的真实IP地址或MAC地址)之间的映射关系,或者,包括第二通信装置45的唯一标识,此时流表项用于指示将来自客户端41的消息转发给第二通信装置45。As described in step S101, before updating, the flow entry includes the quintuple and the unique identifier of the first communication device 44 (such as a custom ID, or the real IP address or MAC address of the first communication device 44) The mapping relationship among them, or, includes the unique identifier of the first communication device 44, and the flow entry is used to indicate that the message from the client 41 is forwarded to the first communication device 44. After the update, the flow entry includes a mapping relationship between the quintuple and the unique identifier of the second communication device 45 (such as a custom ID, or the real IP address or MAC address of the second communication device 45), or, Including the unique identifier of the second communication device 45 , at this time, the flow entry is used to indicate that the message from the client 41 is forwarded to the second communication device 45 .
如图9所示,与图1中原方案相比,如果采用原方案则要经过如下过程:S1、客户端41向负载均衡服务器43发送请求消息以请求目标数据,例如,请求播放视频。S2、负载均衡服务器43将请求消息随机转发至第一通信装置44。S3、第一通信装置44解析请求消息所请求的目标数据不在本地,所以向第二通信装置45请求目标数据。S4、第一通信装置44向主机客户端41返回包括目标数据的响应消息。As shown in FIG. 9 , compared with the original solution in FIG. 1 , if the original solution is adopted, the following process is required: S1, the client 41 sends a request message to the load balancing server 43 to request target data, for example, request to play a video. S2. The load balancing server 43 randomly forwards the request message to the first communication device 44. S3. The first communication device 44 requests the target data from the second communication device 45 because the target data requested by the parsing request message is not in the local area. S4. The first communication device 44 returns a response message including the target data to the host client 41 .
而采用本申请上述方案后,则经过如下过程:S1’、第二通信装置45指示负载均衡服务器43更新流表后。S2’、负载均衡服务器43可以根据更新后的流表,将后续接收的来自客户端41的消息直接转发给第二通信装置45。S3’、第二通信装置45将目标数据发送给客户端41。从而避免第一通信装置44与第二通信装置45之间传输目标数据。After adopting the above solution of the present application, the following process is passed: S1', after the second communication device 45 instructs the load balancing server 43 to update the flow table. S2'. The load balancing server 43 may directly forward the subsequently received message from the client 41 to the second communication device 45 according to the updated flow table. S3', the second communication device 45 sends the target data to the client 41. Thus, the transmission of target data between the first communication device 44 and the second communication device 45 is avoided.
本申请实施例提供的数据请求方法、通信装置、服务器和通信系统,通过在存储数据的通信装置之间传输会话的连接状态信息和缓存的与客户端之间通信的消息,代替在存储数据的通信装置之间传输目标数据,可以减少存储数据的通信装置之间的流量,减少通信装置的数量,节约成本,减少首包(开频)的时延。并且不限于云场景、CDN场景,还可以应用于存在板间流量的其他场景。The data request method, communication device, server, and communication system provided by the embodiments of the present application replace the connection status information of the session and the cached communication with the client between the communication devices that store data, instead of The transmission of target data between communication devices can reduce the traffic between communication devices storing data, reduce the number of communication devices, save costs, and reduce the delay of the first packet (open frequency). And it is not limited to cloud scenarios and CDN scenarios, and can also be applied to other scenarios where inter-board traffic exists.
如图10所示,本申请实施例还提供了一种通信装置1000,该通信装置1000可以为前文所述的第一通信装置44、第二通信装置45或负载均衡服务器43(可称为第三通信装置),用于执行图5所示的方法。该通信装置1000包括处理模块1001和通信模块1002。As shown in Figure 10, the embodiment of the present application also provides a communication device 1000, which can be the first communication device 44, the second communication device 45 or the load balancing server 43 (which can be referred to as the first Three communication devices), configured to execute the method shown in FIG. 5 . The communication device 1000 includes a processing module 1001 and a communication module 1002 .
例如,当该通信装置1000为第一通信装置44时,通信模块1002用于从负载均衡服务器接收来自客户端的请求消息,请求消息用于请求目标数据。处理模块1001用于与客户端建立第一会话。处理模块1001用于根据请求消息和资源列表确定目标数据存储于第二通信装置。通信模块1002还用于向第二通信装置发送第一会话的连接状态信息以及缓存的与客户端之间通信的消息。处理模块1001还用于断开第一会话。For example, when the communication device 1000 is the first communication device 44, the communication module 1002 is configured to receive a request message from a client from a load balancing server, and the request message is used to request target data. The processing module 1001 is configured to establish a first session with the client. The processing module 1001 is configured to determine, according to the request message and the resource list, that the target data is stored in the second communication device. The communication module 1002 is further configured to send the connection state information of the first session and the cached communication message with the client to the second communication device. The processing module 1001 is also configured to disconnect the first session.
再例如,当该通信装置1000为第二通信装置45时,通信模块1002用于从第一通信装置接收第一通信装置与客户端之间的第一会话的连接状态信息以及缓存的与客户端之间通信的消息,与客户端之间通信的消息包括请求消息,请求消息用于请求目标数据。处理模块1001用于根据连接状态信息与客户端建立第二会话;通信模块1002用于通过第二会话向客户端发送目标数据;通信模块1002用于向负载均衡服务器发送第二通信装置的唯一标识,第二通信装置的唯一标识用于更新流表项,在更新之前,流表项用于指示将来自客户端的消息转发给第一通信装置,在更新之后,流表项用于 指示将来自客户端的消息转发给第二通信装置。For another example, when the communication device 1000 is the second communication device 45, the communication module 1002 is configured to receive from the first communication device the connection state information of the first session between the first communication device and the client and the cached The messages communicated between the client and the client include request messages, and the request messages are used to request target data. The processing module 1001 is used to establish a second session with the client according to the connection state information; the communication module 1002 is used to send target data to the client through the second session; the communication module 1002 is used to send the unique identifier of the second communication device to the load balancing server , the unique identifier of the second communication device is used to update the flow entry. Before the update, the flow entry is used to indicate that the message from the client is forwarded to the first communication device. After the update, the flow entry is used to indicate that the message from the client will be forwarded. The message from the terminal is forwarded to the second communication device.
再例如,当该通信装置1000为负载均衡服务器43时,通信模块1002用于向第一通信装置发送来自客户端的请求消息,请求消息用于请求目标数据;处理模块1001用于建立流表项,流表项指示将来自客户端的消息转发给第一通信装置;通信模块1002用于从第二通信装置接收第二通信装置的唯一标识;处理模块1001用于根据第二通信装置的唯一标识更新流表项,流表项指示将来自客户端的消息转发给第二通信装置。For another example, when the communication device 1000 is the load balancing server 43, the communication module 1002 is used to send a request message from the client to the first communication device, and the request message is used to request target data; the processing module 1001 is used to establish a flow entry, The flow entry indicates that the message from the client is forwarded to the first communication device; the communication module 1002 is used to receive the unique identification of the second communication device from the second communication device; the processing module 1001 is used to update the flow according to the unique identification of the second communication device An entry, the flow entry indicates that the message from the client is forwarded to the second communication device.
本申请实施例中的第一通信装置44、第二通信装置45和负载均衡服务器43可以通过图11中的通信装置(也可以称之为通信设备)1100来实现。图11所示为本申请实施例提供的通信设备1100的结构示意图。该通信设备1100包括一个或多个处理器1101、存储器1102以及至少一个通信接口1103。The first communication device 44, the second communication device 45, and the load balancing server 43 in the embodiment of the present application may be implemented by the communication device (also referred to as a communication device) 1100 in FIG. 11 . FIG. 11 is a schematic structural diagram of a communication device 1100 provided by an embodiment of the present application. The communication device 1100 includes one or more processors 1101 , a memory 1102 and at least one communication interface 1103 .
处理器1101可以是一个芯片。例如,可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(application specific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。处理器1101可以对应前文所述的处理模块1001。 Processor 1101 may be a chip. For example, it can be a field programmable gate array (field programmable gate array, FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), or a central processing unit. It can also be a central processor unit (CPU), a network processor (network processor, NP), a digital signal processing circuit (digital signal processor, DSP), or a microcontroller (micro controller unit, MCU) , and can also be a programmable logic device (programmable logic device, PLD) or other integrated chips. The processor 1101 may correspond to the processing module 1001 described above.
通信接口1103,可以是收发模块用于与其他设备或通信网络通信,如以太网、无线局域网(wireless local area networks,WLAN)等。通信接口1103也可以是位于处理器1101内的收发电路,用以实现处理器的信号输入和信号输出。通信接口1103负责与其他设备或通信网络通信,本申请实施例对此不做具体限定。通信接口1103可以对应前文所述的通信模块1002。The communication interface 1103 may be a transceiver module for communicating with other devices or communication networks, such as Ethernet, wireless local area networks (wireless local area networks, WLAN) and the like. The communication interface 1103 may also be a transceiver circuit located in the processor 1101 to realize signal input and signal output of the processor. The communication interface 1103 is responsible for communicating with other devices or communication networks, which is not specifically limited in this embodiment of the present application. The communication interface 1103 may correspond to the aforementioned communication module 1002 .
存储器1102可以是具有存储功能的装置。例如可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器1102可以是独立存在,通过通信线路与处理器相连接。存储器也可以和处理器集成在一起。The storage 1102 may be a device having a storage function. For example, it can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (random access memory, RAM) or other types of memory that can store information and instructions A dynamic storage device can also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage ( including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be stored by a computer Any other medium, but not limited to. The memory 1102 may exist independently and be connected to the processor through a communication line. Memory can also be integrated with the processor.
其中,存储器1102用于存储指令,并由处理器1101来执行。处理器1101用于执行存储器1102中存储的指令,从而实现本申请实施例中提供的方法。本申请实施例中的指令也可以称之为应用程序代码,本申请实施例对此不做具体限定。Wherein, the memory 1102 is used to store instructions and be executed by the processor 1101 . The processor 1101 is configured to execute instructions stored in the memory 1102, so as to implement the method provided in the embodiment of the present application. The instructions in the embodiment of the present application may also be referred to as application program code, which is not specifically limited in the embodiment of the present application.
本申请实施例提供一种存储一个或多个程序的计算机可读存储介质,一个或多个程序包括指令,当指令被通信装置执行时使通信装置执行如图5所示的方法。An embodiment of the present application provides a computer-readable storage medium that stores one or more programs, where the one or more programs include instructions, and when the instructions are executed by a communication device, the communication device executes the method shown in FIG. 5 .
本申请实施例提供一种包括指令的计算机程序产品,当指令在通信装置上运行时,使得通信装置执行如图5所示的方法。An embodiment of the present application provides a computer program product including instructions, and when the instructions are run on a communication device, the communication device is made to execute the method shown in FIG. 5 .
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺 序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that, in various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the order of execution, and the execution order of the processes should be determined by their functions and internal logic, and should not be used in the embodiments of the present application. The implementation process constitutes any limitation.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those skilled in the art can appreciate that the modules and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device, and module can refer to the corresponding process in the foregoing method embodiment, and details are not repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、设备和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个设备,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,设备或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or May be integrated into another device, or some features may be omitted, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or modules may be in electrical, mechanical or other forms.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式来实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(Digital Subscriber Line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可以用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质(例如,DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using a software program, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server, or data center Transmission to another website site, computer, server or data center via wired (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or may be a data storage device including one or more servers, data centers, etc. that can be integrated with the medium. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (Solid State Disk, SSD)), etc.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the application, but the scope of protection of the application is not limited thereto. Anyone familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the application. Should be covered within the protection scope of this application. Therefore, the protection scope of the present application should be determined by the protection scope of the claims.

Claims (12)

  1. 一种数据请求方法,其特征在于,包括:A data request method, characterized in that, comprising:
    第二通信装置从第一通信装置接收所述第一通信装置与客户端之间的第一会话的连接状态信息以及缓存的与所述客户端之间通信的消息,与所述客户端之间通信的消息包括请求消息,所述请求消息用于请求目标数据;The second communication device receives from the first communication device the connection status information of the first session between the first communication device and the client and the cached message communicated with the client, and communicates with the client The communicated message includes a request message for requesting target data;
    所述第二通信装置根据所述连接状态信息与所述客户端建立第二会话;The second communication device establishes a second session with the client according to the connection state information;
    所述第二通信装置通过所述第二会话向所述客户端发送所述目标数据;The second communication device sends the target data to the client through the second session;
    所述第二通信装置向负载均衡服务器发送所述第二通信装置的唯一标识,所述第二通信装置的唯一标识用于更新流表项,在更新之前,所述流表项用于指示将来自所述客户端的消息转发给所述第一通信装置,在更新之后,所述流表项用于指示将来自所述客户端的消息转发给所述第二通信装置。The second communication device sends the unique identifier of the second communication device to the load balancing server, the unique identifier of the second communication device is used to update the flow entry, and before the update, the flow entry is used to indicate that the The message from the client is forwarded to the first communication device, and after being updated, the flow entry is used to indicate that the message from the client is forwarded to the second communication device.
  2. 根据权利要求1所述的方法,其特征在于,所述第二通信装置的唯一标识为自定义标识,或者,所述第二通信装置的真实网络协议地址,或者,所述第二通信装置的媒体接入控制地址。The method according to claim 1, wherein the unique identifier of the second communication device is a self-defined identifier, or the real network protocol address of the second communication device, or the address of the second communication device Media access control address.
  3. 一种数据请求方法,其特征在于,包括:A data request method, characterized in that, comprising:
    负载均衡服务器向第一通信装置发送来自客户端的请求消息,所述请求消息用于请求目标数据;The load balancing server sends a request message from the client to the first communication device, where the request message is used to request target data;
    所述负载均衡服务器建立流表项,所述流表项指示将来自所述客户端的消息转发给所述第一通信装置;The load balancing server establishes a flow entry, and the flow entry indicates that the message from the client is forwarded to the first communication device;
    所述负载均衡服务器从第二通信装置接收所述第二通信装置的唯一标识;The load balancing server receives the unique identifier of the second communication device from the second communication device;
    所述负载均衡服务器根据所述第二通信装置的唯一标识更新所述流表项,所述流表项指示将来自所述客户端的消息转发给所述第二通信装置。The load balancing server updates the flow entry according to the unique identifier of the second communication device, and the flow entry indicates that the message from the client is forwarded to the second communication device.
  4. 根据权利要求3所述的方法,其特征在于,所述第二通信装置的唯一标识为自定义标识,或者,所述第二通信装置的真实网络协议地址,或者,所述第二通信装置的媒体接入控制地址。The method according to claim 3, wherein the unique identifier of the second communication device is a self-defined identifier, or the real network protocol address of the second communication device, or the address of the second communication device Media access control address.
  5. 一种数据请求方法,其特征在于,包括:A data request method, characterized in that, comprising:
    第一通信装置从负载均衡服务器接收来自客户端的请求消息,所述请求消息用于请求目标数据;The first communication device receives a request message from the client from the load balancing server, and the request message is used to request target data;
    所述第一通信装置与所述客户端建立第一会话;The first communication device establishes a first session with the client;
    所述第一通信装置根据所述请求消息和资源列表确定所述目标数据存储于第二通信装置;The first communication device determines that the target data is stored in the second communication device according to the request message and the resource list;
    所述第一通信装置向所述第二通信装置发送所述第一会话的连接状态信息以及缓存的与所述客户端之间通信的消息;The first communication device sends the connection state information of the first session and the cached message communicated with the client to the second communication device;
    所述第一通信装置断开所述第一会话。The first communication device disconnects the first session.
  6. 一种第二通信装置,其特征在于,包括:通信模块和处理模块,A second communication device, characterized by comprising: a communication module and a processing module,
    所述通信模块,用于从第一通信装置接收所述第一通信装置与客户端之间的第一会话的连接状态信息以及缓存的与所述客户端之间通信的消息,与所述客户端之间通信的消息包括请求消息,所述请求消息用于请求目标数据;The communication module is configured to receive, from the first communication device, the connection state information of the first session between the first communication device and the client and the cached message for communication with the client, and communicate with the client The message communicated between the ends includes a request message, and the request message is used to request target data;
    所述处理模块,用于根据所述连接状态信息与所述客户端建立第二会话;The processing module is configured to establish a second session with the client according to the connection state information;
    所述通信模块,用于通过所述第二会话向所述客户端发送所述目标数据;The communication module is configured to send the target data to the client through the second session;
    所述通信模块,用于向负载均衡服务器发送所述第二通信装置的唯一标识,所述第二通信装置的唯一标识用于更新流表项,在更新之前,所述流表项用于指示将来自所述客户端的消息转发给所述第一通信装置,在更新之后,所述流表项用于指示将来自所述客户端的消息转发给所述第二通信装置。The communication module is configured to send the unique identifier of the second communication device to the load balancing server, the unique identifier of the second communication device is used to update the flow entry, and before the update, the flow entry is used to indicate The message from the client is forwarded to the first communication device, and after the update, the flow entry is used to indicate that the message from the client is forwarded to the second communication device.
  7. 根据权利要求6所述的第二通信装置,其特征在于,所述第二通信装置的唯一标识为自定义标识,或者,所述第二通信装置的真实网络协议地址,或者,所述第二通信装置的媒体接入控制地址。The second communication device according to claim 6, wherein the unique identifier of the second communication device is a self-defined identifier, or the real network protocol address of the second communication device, or the second The MAC address of the communication device.
  8. 一种第三通信装置,其特征在于,包括:通信模块和处理模块,A third communication device, characterized by comprising: a communication module and a processing module,
    所述通信模块,用于向第一通信装置发送来自客户端的请求消息,所述请求消息用于请求目标数据;The communication module is configured to send a request message from the client to the first communication device, where the request message is used to request target data;
    所述处理模块,用于建立流表项,所述流表项指示将来自所述客户端的消息转发给所述第一通信装置;The processing module is configured to establish a flow entry, and the flow entry indicates that the message from the client is forwarded to the first communication device;
    所述通信模块,用于从第二通信装置接收所述第二通信装置的唯一标识;The communication module is configured to receive the unique identifier of the second communication device from the second communication device;
    所述处理模块,用于根据所述第二通信装置的唯一标识更新所述流表项,所述流表项指示将来自所述客户端的消息转发给所述第二通信装置。The processing module is configured to update the flow entry according to the unique identifier of the second communication device, and the flow entry indicates that the message from the client is forwarded to the second communication device.
  9. 根据权利要求8所述的第三通信装置,其特征在于,所述第二通信装置的唯一标识为自定义标识,或者,所述第二通信装置的真实网络协议地址,或者,所述第二通信装置的媒体接入控制地址。The third communication device according to claim 8, wherein the unique identifier of the second communication device is a self-defined identifier, or the real network protocol address of the second communication device, or the second The MAC address of the communication device.
  10. 一种第一通信装置,其特征在于,包括:通信模块和处理模块,A first communication device, characterized by comprising: a communication module and a processing module,
    所述通信模块,用于从负载均衡服务器接收来自客户端的请求消息,所述请求消息用于请求目标数据;The communication module is configured to receive a request message from a client from a load balancing server, and the request message is used to request target data;
    所述处理模块,用于与所述客户端建立第一会话;The processing module is configured to establish a first session with the client;
    所述处理模块,用于根据所述请求消息和资源列表确定所述目标数据存储于第二通信装置;The processing module is configured to determine, according to the request message and the resource list, that the target data is stored in the second communication device;
    所述通信模块,用于向所述第二通信装置发送所述第一会话的连接状态信息以及缓存的与所述客户端之间通信的消息;The communication module is configured to send the connection state information of the first session and the cached message communicated with the client to the second communication device;
    所述处理模块,用于断开所述第一会话。The processing module is configured to disconnect the first session.
  11. 一种通信系统,其特征在于,包括如权利要求6-7任一项所述的第二通信装置,如权利要求8-9任一项所述的第三通信装置,以及,如权利要求10所述的第一通信装置。A communication system, characterized by comprising the second communication device according to any one of claims 6-7, the third communication device according to any one of claims 8-9, and, according to claim 10 The first communication device.
  12. 一种存储一个或多个程序的计算机可读存储介质,其特征在于,所述一个或多个程序包括指令,当所述指令在通信装置执行时,使得所述通信装置执行如权利要求1-2任一项所述的方法,或者,执行如权利要求3-4任一项所述的方法,或者,执行如权利要求5所述的方法。A computer-readable storage medium storing one or more programs, characterized in that the one or more programs include instructions, and when the instructions are executed in the communication device, the communication device performs the following claims 1- 2, or execute the method according to any one of claims 3-4, or execute the method according to claim 5.
PCT/CN2022/122228 2021-10-09 2022-09-28 Data request method, communication apparatus, and communication system WO2023056873A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111178020.4A CN115967679A (en) 2021-10-09 2021-10-09 Data request method, communication device and communication system
CN202111178020.4 2021-10-09

Publications (1)

Publication Number Publication Date
WO2023056873A1 true WO2023056873A1 (en) 2023-04-13

Family

ID=85803914

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/122228 WO2023056873A1 (en) 2021-10-09 2022-09-28 Data request method, communication apparatus, and communication system

Country Status (2)

Country Link
CN (1) CN115967679A (en)
WO (1) WO2023056873A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102333130A (en) * 2011-10-31 2012-01-25 北京蓝汛通信技术有限责任公司 Method and system for accessing cache server and intelligent cache scheduler
US20150341431A1 (en) * 2014-01-31 2015-11-26 Edgecast Networks, Inc. Control message routing within anycast reliant platforms
CN106302225A (en) * 2016-10-18 2017-01-04 上海优刻得信息科技有限公司 A kind of method and apparatus of server load balancing
CN107872478A (en) * 2016-09-26 2018-04-03 中国移动通信有限公司研究院 A kind of content buffering method, device and system
CN108076142A (en) * 2017-11-28 2018-05-25 郑州云海信息技术有限公司 A kind of method and system for accelerating user's request based on CDN technologies

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102333130A (en) * 2011-10-31 2012-01-25 北京蓝汛通信技术有限责任公司 Method and system for accessing cache server and intelligent cache scheduler
US20150341431A1 (en) * 2014-01-31 2015-11-26 Edgecast Networks, Inc. Control message routing within anycast reliant platforms
CN107872478A (en) * 2016-09-26 2018-04-03 中国移动通信有限公司研究院 A kind of content buffering method, device and system
CN106302225A (en) * 2016-10-18 2017-01-04 上海优刻得信息科技有限公司 A kind of method and apparatus of server load balancing
CN108076142A (en) * 2017-11-28 2018-05-25 郑州云海信息技术有限公司 A kind of method and system for accelerating user's request based on CDN technologies

Also Published As

Publication number Publication date
CN115967679A (en) 2023-04-14

Similar Documents

Publication Publication Date Title
US10694005B2 (en) Hardware-based packet forwarding for the transport layer
WO2020228505A1 (en) Method, device, and system for selecting mobile edge computing node
US10534601B1 (en) In-service software upgrade of virtual router with reduced packet loss
CA2968964C (en) Source ip address transparency systems and methods
US9647954B2 (en) Method and system for optimizing a network by independently scaling control segments and data flow
US11277313B2 (en) Data transmission method and corresponding device
EP4009593A1 (en) Data transmission method and apparatus, network card and storage medium
US8676980B2 (en) Distributed load balancer in a virtual machine environment
US8447871B1 (en) Simplified method for processing multiple connections from the same client
WO2018133454A1 (en) Method for controlling remote service access path, and relevant apparatus
US20040260745A1 (en) Load balancer performance using affinity modification
JP6395867B2 (en) OpenFlow communication method and system, control unit, and service gateway
WO2019242638A1 (en) Load balancing method and device
WO2021047515A1 (en) Service routing method and apparatus
WO2014023003A1 (en) Method, apparatus, and system for controlling data transmission
CN111107672B (en) Method, device and system for establishing sub-streams of multi-path connection
WO2023151264A1 (en) Load balancing method and apparatus, node, and storage medium
Kogias et al. Bypassing the load balancer without regrets
CN112929264A (en) Service flow transmission method, system and network equipment
WO2013159492A1 (en) Method and system for reporting and downloading information
WO2023186109A1 (en) Node access method and data transmission system
WO2023056873A1 (en) Data request method, communication apparatus, and communication system
WO2022089169A1 (en) Method and apparatus for sending computing routing information, device, and storage medium
KR20230158620A (en) proxyless protocol
US11272014B2 (en) Systems and methods for reducing connection setup latency

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22877892

Country of ref document: EP

Kind code of ref document: A1