WO2023151264A1 - Procédé et appareil d'équilibrage de charge, noeud et support de stockage - Google Patents

Procédé et appareil d'équilibrage de charge, noeud et support de stockage Download PDF

Info

Publication number
WO2023151264A1
WO2023151264A1 PCT/CN2022/116443 CN2022116443W WO2023151264A1 WO 2023151264 A1 WO2023151264 A1 WO 2023151264A1 CN 2022116443 W CN2022116443 W CN 2022116443W WO 2023151264 A1 WO2023151264 A1 WO 2023151264A1
Authority
WO
WIPO (PCT)
Prior art keywords
load balancing
node
resource request
client
information
Prior art date
Application number
PCT/CN2022/116443
Other languages
English (en)
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 WO2023151264A1 publication Critical patent/WO2023151264A1/fr

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing

Definitions

  • the present application relates to the technical field of communications, and in particular to a load balancing method, device, node and storage medium.
  • CDN services enable users to obtain the required resources nearby and reduce network congestion through functions such as load balancing, content distribution, and scheduling.
  • the CDN service directs the user's resource request to the CDN cluster (or region) closest to the user through domain name resolution (DNS) scheduling, and then directs the resource request to the CDN cluster in the CDN cluster through the load balancer.
  • DNS domain name resolution
  • the service node which returns the resources required by the user.
  • load balancers can be divided into four-layer load balancers and seven-layer load balancers according to the open system interconnection reference model (OSI) layer in which they work.
  • OSI open system interconnection reference model
  • the layer-4 load balancer after receiving the user's resource request, sends the resource request to the layer-7 load balancer, and the layer-7 load balancer analyzes the resource request, and sends the resource request to corresponding service node.
  • the resource request needs to go through the four-layer load balancer and the seven-layer load balancer in turn, and finally reach the corresponding service node.
  • the service node needs to send the resource request Forwarding to the layer-7 load balancer corresponding to other service nodes, other service nodes return the resources to the service node, and the service node returns the resources required by the user, resulting in a large amount of cross-device east-west traffic, causing the device
  • the north-south traffic is squeezed, the pressure on switches and service nodes is high, and the efficiency of CDN services is low.
  • Embodiments of the present application provide a load balancing method, device, node, and storage medium, which can improve the efficiency of CDN services.
  • the technical solution is as follows:
  • the present application provides a load balancing method, which is executed by a first load balancing node, and the method includes:
  • connection protocol information between the first load balancing node and the client to the first service node
  • the connection protocol information includes the adopted network protocol, the address information of the client, and the first load balancing node
  • the address information of the node, the connection protocol information is used for the service node to send the response message of the resource request to the client, so as to transmit the target resource to the client, and the source address information of the response message is the first payload The address information of the balance node.
  • the target resources can be pictures, audio, video, text, etc., which are not limited in this embodiment of the application.
  • the load balancing node receives the resource request from the client, it can locate the resource at one time. Accurate service nodes, so as to avoid a large amount of cross-device east-west traffic and reduce the pressure on switches and service nodes. Further, the load balancing node sends resource requests and connection protocol information to the service node, where the connection protocol information includes the adopted The network protocol, the address information of the client and the address information of the load balancing node. In this way, based on the connection protocol information, the service node can pretend to be the response message of the load balancing node and send it to the client. The response message bypasses the load balancing node and realizes the separation and flow of resource requests and response messages. , form the efficient forwarding of the DR mode of the application layer, and improve the efficiency of CDN services.
  • the sending the resource request, the connection protocol information between the first load balancing node and the client to the first service node includes:
  • the target message carries the connection protocol information, the network protocol used by the target message and the network protocol used to establish a connection between the first load balancing node and the service node are: the same network protocol.
  • the first load balancing node transmits the connection protocol information to the first service node in the form of a separate data packet.
  • the network protocol used to establish the connection between the first load balancing node and the client is the first network protocol
  • the network protocol used to establish the connection between the first load balancing node and the service node is For the second network protocol
  • the first network protocol is different from the second network protocol
  • the connection protocol information also includes the information carried in the difference field in the packet headers of the first network protocol and the second network protocol.
  • the first load balancing node can obtain the resource request using the first Necessary information for data transmission between the network protocol and the client, so that there is no need to parse the complete resource request, reducing the request delay.
  • the first network protocol is HTTPS
  • the second network protocol is HTTP
  • the connection protocol information also includes the connection protocol established between the first load balancing node and the client. Key information required to connect.
  • the first network protocol is a full-duplex communication protocol websocket based on transmission control protocol TCP
  • the second network protocol is hypertext transfer protocol HTTP
  • the connection protocol information also includes the first load balancing node and The key information required to establish a connection between the clients and the request type of the resource request, the request type is used to identify that the resource request is a web socket type request.
  • the first network protocol is Hypertext Transfer Protocol HTTP1.1
  • the second network protocol is Hypertext Transfer Protocol HTTP
  • the connection protocol information also includes the connection between the first load balancing node and the client Data range information required to establish a connection.
  • the method also includes:
  • the sending of the resource request and the connection protocol information between the first load balancing node and the client to the first service node includes:
  • the response report of the first service node can still be directly returned to the client without going through the first load balancing node again, realizing the separation and flow of resource requests and response messages, forming efficient forwarding in the DR mode of the application layer, and improving the efficiency of CDN services.
  • the first service node and the first load balancing node belong to the same data center.
  • the method also includes:
  • the target resource In response to the resource request, if the target resource does not exist in the data center where the first load balancing node is located, send the resource request and the connection protocol information to the second load balancing node, and the second load balancing node and the second load balancing node A load balancing node belongs to different data centers.
  • the first load balancing node can transfer resource requests and connection protocol information to load balancing nodes in other data centers in a timely manner when there is no target resource, thus realizing Resource request and response messages are separated and transferred to form efficient forwarding in the DR mode of the application layer, which improves the efficiency of CDN services.
  • the connection protocol information between the first load balancing node and the client can be transferred across data centers, so that data centers can be interconnected and mutually scheduled, forming a distributed protocol scheduling capability, which effectively improves The efficiency of CDN services.
  • the present application provides a load balancing method, which is performed by a service node, and the method includes:
  • connection protocol information between the first load balancing node and the client, the connection protocol information including the adopted network protocol, the address information of the client and the address information of the first load balancing node, the The resource request is used to obtain the target resource;
  • the source address information of the response message is the first load balancing Node address information.
  • a response message of the resource request is sent to the client, including:
  • the service node and the first load balancing node belong to the same data center.
  • the resource request and the connection protocol information are sent by the first load balancing node.
  • the resource request and the connection agreement information are sent by another service node of the data center.
  • connection protocol information between the first load balancing node and the client can be transferred across devices, enabling devices to communicate with each other and schedule each other, forming a distributed protocol scheduling capability and effectively improving the efficiency of CDN services .
  • the service node and the first load balancing node belong to different data centers.
  • the resource request and the connection protocol information are sent by the first load balancing node to the second load balancing node, they are sent by the second load balancing node, and the second load balancing node and the service node belong to In the same data center, the second load balancing node and the first load balancing node belong to different data centers.
  • connection protocol information between the first load balancing node and the client can be transferred across data centers, enabling data centers to communicate with each other and schedule each other, forming a distributed protocol scheduling capability, which effectively improves the CDN service. efficiency.
  • the present application provides a load balancing device, which includes:
  • a service node determination module configured to determine a first service node in response to a resource request from a client, where the resource request is used to obtain a target resource;
  • a connection protocol information transfer module configured to send the resource request, connection protocol information between the first load balancing node and the client to the first service node, the connection protocol information includes the adopted network protocol, the client's address information and the address information of the first load balancing node, the connection protocol information is used for the service node to send the response message of the resource request to the client, so as to transmit the target resource to the client, and the response message is
  • the source address information is address information of the first load balancing node.
  • connection protocol information transfer module is used for:
  • the target message carries the connection protocol information, the network protocol used by the target message and the network protocol used to establish a connection between the first load balancing node and the service node are: the same network protocol.
  • the network protocol used to establish the connection between the first load balancing node and the client is the first network protocol
  • the network protocol used to establish the connection between the first load balancing node and the service node is For the second network protocol
  • the first network protocol is different from the second network protocol
  • the connection protocol information also includes the information carried in the difference field in the packet headers of the first network protocol and the second network protocol.
  • the first network protocol is HTTPS
  • the second network protocol is HTTP
  • the connection protocol information also includes the connection protocol established between the first load balancing node and the client. Key information required to connect.
  • the first network protocol is a full-duplex communication protocol websocket based on transmission control protocol TCP
  • the second network protocol is hypertext transfer protocol HTTP
  • the connection protocol information also includes the first load balancing node and The key information required to establish a connection between the clients and the request type of the resource request, the request type is used to identify that the resource request is a web socket type request.
  • the first network protocol is Hypertext Transfer Protocol HTTP1.1
  • the second network protocol is Hypertext Transfer Protocol HTTP
  • the connection protocol information also includes the connection between the first load balancing node and the client Data range information required to establish a connection.
  • the device further includes a protocol conversion module, configured to perform protocol conversion on the resource request based on the target protocol when the resource request is not generated based on the target protocol, to obtain the resource request after protocol conversion , the target protocol represents the protocol used between the first load balancing node and the service node;
  • connection protocol information transfer module is used for:
  • the first service node and the first load balancing node belong to the same data center.
  • connection protocol information transfer module is also used for:
  • the target resource In response to the resource request, if the target resource does not exist in the data center where the first load balancing node is located, send the resource request and the connection protocol information to the second load balancing node, and the second load balancing node and the second load balancing node A load balancing node belongs to different data centers.
  • the present application provides a data processing device, which includes:
  • An information receiving module configured to receive a resource request from a client, connection protocol information between the first load balancing node and the client, the connection protocol information including the adopted network protocol, address information of the client, and the first load balancing node The address information of the node, the resource request is used to obtain the target resource;
  • the response message sending module is used to respond to the resource request, based on the connection protocol information, send the response message of the resource request to the client, so as to transmit the target resource to the client, the source of the response message
  • the address information is the address information of the first load balancing node.
  • the response message sending module is configured to respond to the resource request, based on the connection protocol information, using the address information of the first load balancing node as the source address information, and using the client's address information as the destination address information, and send the response message of the resource request to the client.
  • the service node and the first load balancing node belong to the same data center.
  • the resource request and the connection protocol information are sent by the first load balancing node.
  • the resource request and the connection agreement information are sent by another service node of the data center.
  • the service node and the first load balancing node belong to different data centers.
  • the resource request and the connection protocol information are sent by the first load balancing node to the second load balancing node, they are sent by the second load balancing node, and the second load balancing node and the service node belong to In the same data center, the second load balancing node and the first load balancing node belong to different data centers.
  • the present application provides a load balancing node, the load balancing node includes a processor and a memory, and the memory is used to store at least one piece of program code, and the at least one piece of program code is loaded by the processor and executes the aforementioned first aspect Or the load balancing method provided by any possible implementation manner of the first aspect.
  • the present application provides a service node, the service node includes a processor and a memory, the memory is used to store at least one piece of program code, the at least one piece of program code is loaded by the processor and executes the aforementioned second aspect or the first A load balancing method provided by any possible implementation of the two aspects.
  • the present application provides a computer-readable storage medium, the computer-readable storage medium is used to store at least one piece of program code, and the at least one piece of program code is used to implement any one of the aforementioned first aspect or any one of the first aspects.
  • the storage medium includes but not limited to volatile memory, such as random access memory, and nonvolatile memory, such as flash memory, hard disk drive (hard disk drive, HDD), and solid state drive (solid state drive, SSD).
  • the present application provides a computer program product, the computer program product includes computer program code, and when the computer program code is executed by a load balancing node, the load balancing node executes any possibility of the aforementioned first aspect or the first aspect
  • the load balancing method provided in the implementation manner of the above-mentioned second aspect or the load balancing method provided in any possible implementation manner of the second aspect when the computer program code is executed by the service node.
  • the computer program product may be a software installation package, and the computer program product may be downloaded and executed on a load balancing node or a service node when the aforementioned load balancing method needs to be used.
  • FIG. 1 is a schematic diagram of an implementation environment of a load balancing method provided in an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • FIG. 3 is a flow chart of a load balancing method provided in an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a load balancing method provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a load balancing method provided by a related technology and a load balancing method provided by an embodiment of the present application;
  • FIG. 6 is a flowchart of a load balancing method provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a load balancing method provided by an embodiment of the present application.
  • FIG. 8 is a flowchart of a load balancing method provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a load balancing method provided by an embodiment of the present application.
  • FIG. 10 is a flowchart of a load balancing method provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram of a load balancing method provided by an embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of a load balancing device provided by an embodiment of the present application.
  • Fig. 13 is a schematic structural diagram of a data processing device provided by an embodiment of the present application.
  • 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.
  • Load balancing is a scheduling method based on the existing network structure, which can expand the bandwidth of network devices and servers, increase throughput, strengthen network data processing capabilities, and improve network flexibility and availability.
  • a uniform resource locator (uniform resource locator, URL) is the address of a standard resource on the Internet, also known as a web page address.
  • the direct routing (director routing, DR) mode is a method of sending the resource request to the application server by modifying the target media access control address (MAC) address of the resource request, so that the application server will respond to the processing The result is directly returned to the client's working mode.
  • the DR mode at the application layer is called the mode of separation and flow of requests and responses.
  • 302 scheduling is a resource scheduling method.
  • the scheduling center finds that the resource requested by the client has a more suitable CDN node to provide services, it uses the hypertext transfer protocol (hyper text transfer protocol) , HTTP) 302 status code, allowing the client to initiate a resource request to a more suitable CDN node.
  • hypertext transfer protocol hypertext transfer protocol
  • HTTP Hypertext transfer protocol
  • the load balancing method provided by the embodiment of the present application can be applied in a network system that stores, schedules and distributes resources through CDN services.
  • resources are usually stored in a service cluster composed of hundreds or thousands of service nodes, and the service nodes provide external services through load balancing nodes.
  • the load balancing node receives the resource request sent by the client, the load balancing node parses the resource request and forwards the resource request to the corresponding service node to ensure a high resource hit rate.
  • the embodiment of the present application provides a load balancing method.
  • a load balancing node receives a resource request from a client, it can locate an accurate service node at one time, thereby avoiding a large amount of cross-device east-west traffic and reducing the cost of switches and Service node pressure, further, the load balancing node sends a resource request and connection protocol information to the service node, wherein the connection protocol information includes the adopted network protocol, address information of the client and address information of the load balancing node.
  • the service node can pretend to be the response message of the load balancing node and send it to the client.
  • the response message bypasses the load balancing node and realizes the separation and flow of resource requests and response messages. , form the efficient forwarding of the DR mode of the application layer, and improve the efficiency of CDN services.
  • FIG. 1 is a schematic diagram of an implementation environment of a load balancing method provided by an embodiment of the present application.
  • the implementation environment includes a client 101, a load balancing node 102 and a service node 103, and the client 101, the load balancing node 102 and the service node 103 are directly or indirectly connected through a wired network or a wireless network.
  • the client 101 is configured to send a corresponding resource request to the load balancing node 102 according to the user's resource requirement.
  • the client 101 may be a user-side terminal or a server.
  • a terminal is also called a smart terminal or a mobile smart terminal, which refers to a type of device that has rich human-computer interaction methods, has the ability to access the Internet, is usually equipped with various operating systems, and has strong processing capabilities.
  • the types of mobile smart terminals include, but are not limited to, smart phones, tablet computers, desktop computers, vehicle-mounted terminals, handheld game consoles, etc., but are not limited thereto.
  • a server may be a server cluster composed of one or more computing devices. It should be noted that the client 101 may generally refer to one of multiple clients, and this embodiment of the present application only uses the client 101 as an example for illustration.
  • the load balancing node 102 is used to realize the load balancing function, and can distribute the resource request to the corresponding service node 103 according to the resource request of the client 101 .
  • the load balancing node 102 implements the load balancing function through a server or a server cluster composed of multiple servers.
  • the load balancing node 102 implements the load balancing function through a virtual machine or a container engine (docker), which is not limited in this embodiment of the present application.
  • the load balancing nodes 102 include a first load balancing node 1021 and a second load balancing node 1022, etc., wherein, the first load balancing node 1021 belongs to the first data center, and the second load balancing node 1022 belongs to the second data center, and the embodiment of the present application does not limit the number of load balancing nodes.
  • the service node 103 is used to provide a resource storage function, and can feed back resources corresponding to the resource request to the client 101 according to the received resource request.
  • the service node 103 refers to a service node capable of providing CDN services.
  • the service node 103 is an independent physical server, or a server cluster or a distributed file system composed of multiple physical servers, and can also provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage Cloud servers for basic cloud computing services such as network services, cloud communications, middleware services, domain name services, security services, big data and artificial intelligence platforms.
  • the service nodes 103 may belong to different data centers, for example, the first load balancing node 1021 belongs to the first data center, and the first data center It includes a plurality of service nodes 1031 ; the second load balancing node 1022 belongs to a second data center, and the second data center includes a plurality of service nodes 1032 . It should be noted that what is shown in the figure is only illustrative, and the number of service nodes 103 may be more or less, which is not limited in this embodiment of the present application.
  • the wireless or wired network described above uses standard communication technologies and/or protocols.
  • the network is usually the Internet, but can be any network, including but not limited to local area network (LAN), metropolitan area network (MAN), wide area network (WAN), mobile, wired or wireless Any combination of network, private network, or virtual private network.
  • data exchanged over the network is represented using technologies and/or formats including hyper text markup language (HTML), extensible markup language (XML), and the like.
  • HTTP hyper text markup language
  • XML extensible markup language
  • custom and/or dedicated data communication techniques can also be used instead of or in addition to the data communication techniques described above.
  • FIG. 2 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • the network device 200 includes a memory 201 , a processor 202 , a communication interface 203 and a bus 204 .
  • the memory 201 , the processor 202 , and the communication interface 203 are connected to each other through the bus 204 .
  • the memory 201 may be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or other types that can store information and instructions It can also be an electrically erasable programmable read-only memory (EEPROM), 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 programmed by a computer Any other medium accessed, but not limited to.
  • the memory 201 can store at least one piece of program code. When the program code stored in the memory 201 is executed by the processor 202, the processor 202 and the communication interface 203 are used to execute the load balancing node or service node in the following method embodiments. balanced approach.
  • the processor 202 may be a network processor (network processor, NP), a central processing unit (central processing unit, CPU), a specific application integrated circuit (application-specific integrated circuit, ASIC), or an integrated circuit for controlling the execution of the program program of this application. circuit.
  • the processor 202 may be a single-core (single-CPU) processor, or a multi-core (multi-CPU) processor. The number of the processor 202 may be one or more. Each of these processors is, for example, a single-core processor, or a multi-core processor.
  • a processor herein alternatively refers to one or more devices, circuits, and/or processing cores for processing data such as computer program instructions.
  • the communication interface 203 uses a transceiver module such as a transceiver to implement communication between the network device 200 and other devices or communication networks. For example, data can be acquired through the communication interface 203 .
  • the memory 201 and the processor 202 may be provided separately, or may be integrated together.
  • the bus 204 may include a path for transferring information between various components of the network device 200 (eg, memory 201 , processor 202 , communication interface 203 ).
  • the processor 202 implements the methods in the following embodiments by reading the program code stored in the memory 201, or, the processor 202 implements the methods in the following embodiments through the program code stored internally. In the case that the processor 202 implements the methods in the following embodiments by reading the program code stored in the memory 201, the memory 201 stores the program code for implementing the load balancing method provided in the embodiment of the present application.
  • processor 202 implements the above functions, please refer to the descriptions in the various method embodiments below, which will not be repeated here.
  • the embodiment of the present application also provides a computer-readable storage medium including program codes, such as the memory 201 including program codes.
  • the above program codes can be executed by the processor 202 of the network device 200 to complete the load balancing method.
  • the computer-readable storage medium is a read-only memory (read-only memory, ROM), a random access memory (random access memory, RAM), a compact-disc read-only memory (CD- ROM), magnetic tape, floppy disk, and optical data storage devices, etc.
  • FIG. 3 is a flowchart of a load balancing method provided by an embodiment of the present application. As shown in FIG. 3 , the interaction among the client, the first load balancing node and the first service node is taken as an example for illustration.
  • the load balancing method includes the following steps 301 to 305 .
  • the client sends a resource request to the first load balancing node, where the resource request is used to obtain a target resource.
  • the first load balancing node refers to any load balancing node in the network system that provides CDN services.
  • the client establishes a connection with the first load balancing node according to the request behavior initiated by the user for the target resource, and sends a resource request to the first load balancing node through the connection, and the resource request is used to obtain the target resource.
  • the target resource is a picture, audio, video, text, etc., and the embodiment of the present application does not limit the type of the target resource.
  • the client uses a transmission control protocol (transmission control protocol, TCP)/user datagram protocol (user datagram protocol, UDP) and an upper layer network protocol to establish a connection with the first load balancing node.
  • TCP transmission control protocol
  • UDP user datagram protocol
  • the connection is a transmission tunnel, which can support efficient transmission of data. It should be noted that, in some embodiments, the client can select different network protocols to establish a connection with the first load node according to actual needs.
  • the network protocols include: HTTP, HTTP1.1, HTTP2.0, HTTP3.0, hyper text transfer protocol over SecureSocket layer (HTTPS), high-speed UDP Internet connection protocol (quick UDP internet connection, QUIC) and TCP-based full-duplex communication protocol (web socket), etc.,
  • HTTPS hyper text transfer protocol over SecureSocket layer
  • QUIC high-speed UDP Internet connection protocol
  • QUIC TCP-based full-duplex communication protocol
  • the first load balancing node determines a first service node in response to the resource request of the client.
  • the first service node is used to provide target resources
  • the first load balancing node receives the resource request sent by the client, and determines the first service node from multiple service nodes in response to the resource request.
  • the plurality of service nodes and the first load balancing node belong to the same data center.
  • the first load balancing node 1021 belongs to the first data center
  • the first data center includes a plurality of service nodes 1031 .
  • this step 302 includes the following two steps:
  • Step 1 the first load balancing node responds to the resource request, analyzes the resource request, and obtains the application layer characteristics of the resource request.
  • the first load balancing node parses the target field in the resource request to obtain the application layer characteristics of the resource request.
  • the application layer feature of the resource request includes the URL identifier of the resource request, and the URL identifier can uniquely identify the target resource requested by the resource request.
  • the application layer feature of the resource request further includes a resource type corresponding to the resource request, and the resource type is used to indicate the type of the target resource requested by the resource request.
  • the application layer feature of the resource request further includes other information, which is not limited in this embodiment of the present application.
  • the position of the target field can be set according to actual needs, which is not limited in this embodiment of the present application.
  • the resource request of the client is a resource request under the HTTP protocol
  • the resource request is used to request http://a.com/x
  • the target field of the resource request is a.com/x
  • the first load balancing The node parses the resource request, and obtains that the application layer characteristic of the resource request is a.com/x, which is the URL identifier of the resource request.
  • Step 2 The first load balancing node determines the first service node corresponding to the application layer feature based on the application layer feature.
  • the first load balancing node invokes the target algorithm, and based on the application layer feature, determines the first service node corresponding to the application layer feature.
  • the target algorithm is a consistent hashing algorithm.
  • the first load balancing node uses a hash function to process the application layer feature to obtain a hash value corresponding to the application feature, and then uses a modulo function according to the number of multiple service nodes to obtain the hash value The value is modulo the number, so as to determine the first service node from the plurality of service nodes.
  • a plurality of service nodes include service node A, service node B, and service node C, which are respectively represented by numbers 0, 1, and 2.
  • the first load balancing node invokes a consistent hash algorithm, and the application layer feature a.com/ x is processed to obtain a hash value of 5, and the modulo function is used to take the modulus of the number of service nodes 3 to obtain 2, which corresponds to service node C, and then the service node C is determined as the first service node. Since each service node in the network system is used to store resources corresponding to a certain hash value, the process of determining the first service node by the first load balancing node can also be understood as that the first load balancing node calculates the hash value based on the characteristics of the application layer. The hash value corresponding to the application layer feature determines where the target resource should be stored.
  • the above-mentioned target algorithm can be set according to actual requirements, for example, weighted round-robin algorithm, weighted random algorithm, minimum connection number algorithm, etc., which are not limited in this embodiment of the present application.
  • the first load balancing node can locate the accurate first service node at one time according to the application layer characteristics of resource requests, thereby avoiding a large amount of cross-device east-west traffic and effectively reducing the number of switches and service nodes. pressure. Moreover, by sensing the application layer characteristics in the resource request in real time, request scheduling is performed according to the application layer characteristics, which expands the flexibility of scheduling.
  • the first load balancing node sends the resource request, the connection protocol information between the first load balancing node and the client to the first service node, and the connection protocol information includes the adopted network protocol and the address of the client information and address information of the first load balancing node.
  • the first load balancing node after determining the first service node, sends the client's resource request and connection protocol information to the first service node.
  • the connection protocol information is used by the service node to send a response message of the resource request to the client to transmit the target resource to the client, and the source address information of the response message is the address information of the first load balancing node .
  • any service node in the network system can implement data transmission with the client based on the connection protocol information, that is, the connection protocol information includes necessary information for data transmission between the client and the service node.
  • the address information of the client includes a port number and an Internet protocol (internet protocol, IP) address of the client; the address information of the first load balancing node includes the port number and the address of the first load balancing node IP address.
  • IP Internet protocol
  • the first load balancing node sends the resource request to the first service node, and sends a target message to the first service node, the target message carries the connection protocol information, and the network protocol adopted by the target message
  • the network protocol used to establish the connection between the first load balancing node and the service node is the same network protocol. That is, the first load balancing node transmits the connection protocol information to the first service node in the form of a separate data packet. For example, taking HTTP as an example for establishing a connection between the first load balancing node and the service node, when the first load balancing node sends the resource request to the first service node, it uses HTTP to send the resource request to the first The service node sends the target message.
  • the network protocol used to establish the connection between the first load balancing node and the client is the same network protocol as the network protocol used to establish the connection between the first load balancing node and the service node.
  • the connection protocol information may be obtained when the first load balancing node establishes a connection with the client, or it may be obtained by analyzing the resource request when the first load balancing node receives the resource request from the client. This embodiment of the present application does not limit it.
  • connection protocol information also includes the connection status (such as established connection) between the first load balancing node and the client, the connection holding time, the sequence number based on the TCP protocol, the first load balancing node and the client
  • connection status such as established connection
  • the network protocol used to establish the connection between the first load balancing node and the client and the network protocol used to establish the connection between the first load balancing node and the service node can also be different network protocols.
  • the connection protocol information will be introduced in the subsequent embodiment shown in FIG. 6 , and will not be repeated here.
  • the first service node receives the resource request and the connection protocol information.
  • the first service node In response to the resource request, based on the connection protocol information, the first service node sends a response packet of the resource request to the client, so as to transmit the target resource to the client.
  • the first service node in response to the resource request, based on the connection protocol information, uses the address information of the first load balancing node as the source address information, and uses the address information of the client as the destination address information to send The client sends a response message to the resource request (that is, to construct a response message in the DR mode of the application layer), and the response message carries the target resource.
  • the response message of the first service node can be directly returned to the client without going through the first load balancing node again, thereby realizing the separation and flow of resource requests and response messages, forming efficient forwarding of the DR mode of the application layer, Improved CDN service efficiency.
  • FIG. 4 is a schematic diagram of a load balancing method provided by an embodiment of the present application.
  • the client uses HTTP to request target resources from the service node through the first load balancing node as an example.
  • the client establishes a connection with the first load balancing node, and uses HTTPS to send a resource request to the first load balancing node through the switch, and the resource request is used to request the target resource http://a.com/x.
  • the first load balancing node responds to the resource request, parses the resource request, and obtains the URL identifier a.com/x of the resource request, that is, extracts the application layer feature in the resource request, and determines the first resource request based on the URL identifier.
  • a service node thereby avoiding the generation of a large amount of cross-device east-west traffic, reducing the pressure on switches and service nodes.
  • the first load balancing node sends the resource request and connection protocol information to the first service node, and the first service node After the node receives the resource request and the connection protocol information, based on the connection protocol information, the address information of the first load balancing node is used as the source address information, and the address information of the client is used as the destination address information to generate a response corresponding to the resource request message, the response message carries the target resource, and the response message is sent directly to the client through the switch, which realizes the separation and transfer of resource request and response message, forms the efficient forwarding of the DR mode of the application layer, and improves the CDN service efficiency. Moreover, in this process, by real-time perception of the application layer characteristics in the resource request of the client, request scheduling is performed according to the application layer characteristics, which expands the flexibility of scheduling.
  • FIG. 5 is a schematic diagram of a load balancing method provided by a related technology and a load balancing method provided by an embodiment of the present application.
  • the load balancing method provided by the related technology includes the following steps:
  • the client sends a resource request for the target resource to the Layer 4 load balancer through the switch, with the address of the Layer 4 load balancer as the destination address and the address of the client as the source address;
  • the four-layer load balancer performs load balancing based on the received resource request, takes the address of the four-layer load balancer as the destination address, and takes the client's address as the source address, and transparently transmits the resource request to the seven-layer load balancer ;
  • the seven-layer load balancer establishes a connection with the client based on the received resource request, and performs load balancing based on the application layer characteristics in the resource request, with the address of the service node as the destination address and the seven-layer load balancer's The address is the source address, and the resource request is sent to the service node;
  • the service node Based on the received resource request, the service node sends the target resource to the layer-7 load balancer with the address of the layer-7 load balancer as the destination address and the address of the service node as the source address;
  • the seven-layer load balancer uses the address of the client as the destination address and the address of the four-layer load balancer as the source address to generate a response message for the resource request, bypassing the four-layer load balancing device and transmit it to the client through the switch.
  • resource requests need to pass through the four-layer load balancer and the seven-layer load balancer in sequence, and finally reach the corresponding service node, resulting in a high request delay.
  • the service node will obtain the target resource from other service nodes, thereby generating a large amount of cross-device east-west traffic, resulting in greater pressure on switches and service nodes.
  • related technologies often need to deploy tens of thousands of seven-layer load balancers to ensure the efficiency of CDN services, resulting in load balancing problems. The cost is greatly increased.
  • the load balancing method includes the following steps:
  • the client sends a resource request for the target resource to the load balancing node with the address of the load balancing node as the destination address and the address of the client as the source address through the switch;
  • the load balancing node establishes a connection with the client based on the received resource request, and performs load balancing based on the application layer characteristics in the resource request, with the address of the service node as the destination address and the address of the load balancing node as the source address , sending the resource request and connection protocol information to the service node;
  • the service node uses the address of the load balancing node as the source address information and the address of the client as the destination address to generate a response message for the resource request, and sends the response message
  • the file bypasses the load balancing node and is transmitted to the client through the switch.
  • the load balancing node when the load balancing node receives the resource request from the client, it can locate the accurate service node at one time, thereby avoiding the generation of a large amount of cross-device east-west traffic and reducing the cost of switches and services. Node pressure. Further, the load balancing node sends a resource request and connection protocol information to the service node, wherein the connection protocol information includes the adopted network protocol, address information of the client and address information of the load balancing node. In this way, based on the connection protocol information, the service node can pretend to be the response message of the load balancing node and send it to the client.
  • the response message bypasses the load balancing node and realizes the separation of resource requests and response messages. Transfer, form the efficient forwarding of DR mode at the application layer, and improve the efficiency of CDN services. Moreover, in the load balancing method provided by the embodiment of the present application, the load balancing node does not need to parse the complete resource request, which takes a short time. Therefore, on the basis of ensuring the CDN service efficiency, there is no need to configure too many load balancing nodes in the network system. nodes, thus effectively reducing the cost of load balancing.
  • the above load balancing methods shown in FIG. 3 and FIG. 4 introduce a basic implementation manner of the load balancing solution provided by the embodiment of the present application.
  • the network protocol used between the client and the first load balancing node and the network protocol used between the first load balancing node and the service node are the same network protocol.
  • the network protocol used to establish the connection between the first load balancing node and the client is the first network protocol
  • the network protocol used to establish the connection between the first load balancing node and the service node is the first network protocol.
  • Two network protocols, the first network protocol and the second network protocol are different. Based on the embodiment shown in FIG. 6 , the load balancing method in this case will be introduced below.
  • FIG. 6 is a flowchart of a load balancing method provided by an embodiment of the present application. As shown in FIG. 6 , the interaction among the client, the first load balancing node and the first service node is taken as an example for illustration.
  • the load balancing method includes the following steps 601 to 606 .
  • the client sends a resource request to the first load balancing node, where the resource request is used to obtain a target resource.
  • this step 601 is the same as that of the above-mentioned step 301, so details are not repeated here.
  • the first load balancing node performs protocol conversion on the resource request based on the second network protocol, and obtains the resource request after the protocol conversion.
  • the second network protocol indicates a network protocol used to establish a connection between the first load balancing node and the service node.
  • the first load balancing node receives the resource request, based on the first network protocol and the second network protocol adopted by the resource request, it determines that the resource request is not generated based on the second network protocol, and the resource request Perform protocol conversion, so that the protocol used by the resource request after protocol conversion is the second network protocol.
  • the first network protocol used by the client's resource request is HTTPS
  • the resource request includes https://a.com/x
  • the second network protocol is HTTP
  • the first load balancing node is based on HTTP.
  • Protocol conversion the resource request obtained after the protocol conversion is http://a.com/x. It should be noted that the example here is only for illustration, and the embodiment of the present application does not limit the types of the first network protocol and the second network protocol.
  • the first load balancing node determines the first service node based on the resource request.
  • the first service node is used to provide target resources, and the process for the first load balancing node to determine the first service node based on the resource request is the same as the above step 302, so it will not be repeated here.
  • the first load balancing node determines the first service node based on the protocol-converted resource request during the process of performing the above step 603 .
  • the first load balancing node first performs the above step 603 to determine the first service node, and then performs the above step 602 to obtain the resource request after the protocol conversion. That is, the embodiment of the present application does not limit the timing of protocol conversion by the first load balancing node and the determination of the protocol type of the resource request on which the first service node depends.
  • the first load balancing node sends the protocol-converted resource request and connection protocol information between the first load balancing node and the client to the first service node, where the connection protocol information includes the adopted network protocol, the The address information of the client and the address information of the first load balancing node.
  • the process of the first load balancing node sending the resource request and the connection protocol information to the first service node in step 604 is the same as that of step 303 above, so it will not be repeated here.
  • the first load balancing node can obtain The necessary information for data transmission between the first network protocol and the client, so that there is no need to parse a complete resource request, and the request delay is reduced.
  • the connection protocol information also includes the information carried in the difference fields in the packet headers of the first network protocol and the second network protocol. That is, in response to the resource request, the first load balancing node parses the difference field in the packet header corresponding to the second network protocol in the resource request to obtain corresponding information.
  • the first network protocol is HTTPS
  • the second network protocol is HTTP.
  • HTTPS is a protocol for encrypting and transmitting data on the basis of HTTP.
  • the difference fields of the corresponding messages of the two network protocols include the field where the key information is located.
  • the first load balancing node parses the field where the key information is located in the resource request, and obtains the key information required for establishing a connection between the first load balancing node and the client. That is, in this case, the above connection protocol information also includes key information required to establish a connection between the first load balancing node and the client, such as a public key, a private key, and a digital certificate.
  • the first network protocol is web socket
  • the second network protocol is HTTP
  • web socket is a protocol that realizes full-duplex communication in the form of long connection.
  • the difference fields between websocket and HTTP corresponding messages include the field where the key information is located and the field where the request type is located.
  • web socket upgrade: web socket
  • Sec-WebSocket-Key is a base64-encoded ciphertext, which is the key information.
  • the first load balancing node parses the key information and the field of the request type in the resource request, and obtains the key information required for establishing a connection between the first load balancing node and the client and the request type of the resource request. That is, in this case, the above connection protocol information also includes key information required to establish a connection between the first load balancing node and the client and the request type of the resource request, and the request type is used to identify the resource
  • the request is a web socket type request.
  • the first network protocol is HTTP1.1
  • the second network protocol is HTTP.
  • HTTP1.1 is a protocol that supports communication in the form of long connections on the basis of HTTP.
  • the difference fields of the packets corresponding to the two network protocols include the field where the data range is located and the like. For example, there will be a range (range) field in the header of the HTTP1.1 corresponding message, which is used to identify the data range in bytes.
  • the first load balancing node parses the data range field in the resource request to obtain data range information required for establishing a connection between the first load balancing node and the client. That is, in this case, the above connection protocol information also includes data range information required to establish a connection between the first load balancing node and the client.
  • the first load balancing node stores difference field information corresponding to different network protocols, and the first load balancing node can determine the corresponding difference field information according to the network protocol type of the resource request received, thereby parsing the resource
  • the corresponding difference field in the request header can get the corresponding information and improve the efficiency of load balancing.
  • the first load balancing node stores the difference field information corresponding to HTTPS and HTTP, such as the field where the key information is located, in the first load balancing node
  • the difference field information corresponding to HTTPS and HTTP, such as the field where the key information is located
  • the field where the key information is located in the resource request can be parsed to obtain corresponding key information, etc., which is not limited in this embodiment of the present application.
  • the above-mentioned types are only examples. In practical applications, the difference fields of packets corresponding to different network protocols may also include more content.
  • the above-mentioned first network protocol and second network protocol may also adopt other forms. There is no limit to this.
  • the first load balancing node when establishing a connection with the client using the first network protocol, the first load balancing node obtains the connection protocol information based on the established connection, which is not limited in this embodiment of the present application.
  • the first service node receives the protocol-converted resource request and the connection protocol information.
  • the first service node In response to the protocol-converted resource request, the first service node sends a response message of the resource request to the client based on the connection protocol information, so as to transmit the target resource to the client.
  • this step 606 the specific implementation of this step 606 is the same as the above step 303.
  • the network protocol used by the response message generated by the first service node is the first network The protocol is the same as the network protocol used to establish the connection between the first load balancing node and the client, thereby realizing the network protocol adopted between the client and the first load balancing node and the connection between the first load balancing node and the service node.
  • the response message of the first service node can still be returned directly to the client without going through the first load balancing node again, realizing the separation and flow of resource requests and response messages, forming an application Efficient forwarding of layer DR mode improves CDN service efficiency.
  • FIG. 7 is a schematic diagram of a load balancing method provided by an embodiment of the present application.
  • the client uses the first network protocol HTTPS to request the target resource from the service node through the first load balancing node.
  • the client establishes a connection with the first load balancing node, and uses the first network protocol HTTPS to send a resource request to the first load balancing node through the switch, and the resource request is used to request the target resource https://a.com/x.
  • the first load balancing node determines that the protocol adopted by the resource request is not the second network protocol HTTP, performs protocol conversion on the resource request, and obtains a resource request after protocol conversion.
  • the resource request after protocol conversion uses to request http://a.com/x. Therefore, the first load balancing node sends the protocol-converted resource request and connection protocol information to the first service node, and after receiving the resource request and connection protocol information, the first service node uses the first connection protocol information based on the connection protocol information.
  • the address information of the load balancing node is the source address information, and the address information of the client is used as the destination address information to generate a response message corresponding to the resource request.
  • the response message carries the target resource, and the response message is directly transmitted through the switch. sent to the client, so that when the network protocol adopted between the client and the first load balancer is different from the network protocol adopted between the first load balancer node and the service node, the response of the first service node
  • the message can still be directly returned to the client without going through the first load balancing node again, which realizes the separation and flow of resource request and response messages, forms the efficient forwarding of the DR mode at the application layer, and improves the efficiency of CDN services.
  • a load balancing node when a load balancing node receives a resource request from a client, it can locate an accurate resource at one time when the network protocol used by the resource request is different from the network protocol used between the load balancing node and the service node.
  • Service nodes so as to avoid a large amount of cross-device east-west traffic and reduce the pressure on switches and service nodes.
  • the load balancing node sends resource requests and connection protocol information to the service node, where the connection protocol information includes the adopted network Protocol, client address information and load balancing node address information.
  • the service node can pretend to be the response message of the load balancing node and send it to the client.
  • the response message bypasses the load balancing node and realizes the separation and flow of resource requests and response messages. , form the efficient forwarding of the DR mode of the application layer, and improve the efficiency of CDN services.
  • the load balancing node can locate the accurate service node storing the target resource at one time, and the service node provides the target resource to the client. Based on the embodiment shown in FIG. 8 , the load balancing method provided by the embodiment of the present application will be introduced below in the case that the service node determined by the load balancing node does not have the target resource.
  • FIG. 8 is a flowchart of a load balancing method provided by an embodiment of the present application. As shown in FIG. 8 , the interaction among the client, the first load balancing node, the first service node and the second service node is taken as an example for illustration.
  • the load balancing method includes the following steps 801 to 807 .
  • the client sends a resource request to the first load balancing node, where the resource request is used to obtain a target resource.
  • this step 801 is the same as that of the above-mentioned step 301, so it will not be repeated here.
  • the first load balancing node determines a second service node in response to the client's resource request.
  • step 802 the specific implementation manner of step 802 is the same as that of step 302 above, that is, the first load balancing node determines the second service node from multiple service nodes in response to the resource request.
  • the first load balancing node sends the resource request, the connection protocol information between the first load balancing node and the client to the second service node, and the connection protocol information includes the adopted network protocol and the address of the client information and address information of the first load balancing node.
  • this step 803 is the same as that of the above-mentioned step 303, so it will not be repeated here.
  • the second service node receives the resource request and the connection protocol information.
  • the second service node determines the first service node when the target resource does not exist on the second service node.
  • the first service node is used to provide the target resource. After the second service node receives the resource request, if the target resource does not exist in the second service node, based on the target resource, The first service node storing the target resource is re-determined from multiple service nodes, where the multiple service nodes and the first load balancing node belong to the same data center.
  • the multiple service nodes can update the resources stored by themselves in time according to the target rules.
  • the target rule can be set according to actual requirements, which is not limited.
  • the service node stores a certain resource, and if the resource has not been accessed for a long time, the service node deletes the resource; another example, the service node stores a certain resource, and the storage time of the resource exceeds the preset time In the case of , the service node deletes the resource, etc., which is not limited in this embodiment of the present application.
  • the second service node may have deleted the original stored target resource. Therefore, The second service node needs to re-determine the service node storing the target resource.
  • the second service node invokes a target algorithm to determine the first service node corresponding to the resource request based on the resource request. This process is the same as the process of determining the first service node by the first load balancing node in step 302 above, so it will not be repeated here. In this way, each of the multiple service nodes can quickly locate the service node storing the target resource when the target resource does not exist in its own service node, thereby improving CDN service efficiency.
  • the second service node can also determine the service node adjacent to itself as the first service node, and so on, that is, the embodiment of the present application determines the specific The method is not limited.
  • the second service node sends the resource request and the connection protocol information to the first service node.
  • the first service node In response to the resource request, based on the connection protocol information, the first service node sends a response packet of the resource request to the client, so as to transmit the target resource to the client.
  • this step 807 is the same as that of the above-mentioned step 305 .
  • the service node will determine the first service node that can provide the target resource by itself, and send a resource request to the first service node and connection protocol information, so that the response message of the first service node can be directly returned to the client without going through the first load balancing node again, so that the resource request and response message can be separated and transferred without the client's perception , form the efficient forwarding of the DR mode of the application layer, and improve the service efficiency of the CDN.
  • the first service node when the target resource does not exist, continues to determine other service nodes from multiple service nodes, and sends resource requests and connection protocol information to other service nodes, The target resource is provided to the client by other service nodes.
  • FIG. 9 is a schematic diagram of a load balancing method provided by an embodiment of the present application. As shown in FIG. 9 , it is taken as an example that a client requests a target resource from a service node through a first load balancing node.
  • the client establishes a connection with the first load balancing node, sends a resource request to the first load balancing node, and the first load balancing node determines the second service node in response to the resource request, and sends the resource request and connection to the second service node Protocol information, the second service node determines the first service node when there is no target resource, sends a resource request and connection protocol information to the first service node, and the first service node receives the resource request and connection protocol information Then, based on the connection protocol information, the address information of the first load balancing node is used as the source address information, and the address information of the client is used as the destination address information to generate a response message corresponding to the resource request, and the response message carries the target Resource, and the response message is sent directly to the client through the switch, so that when the service node determined by the first load balancing node does not have the target resource and the client has no perception, the resource request and response message are separated and flowed , form the efficient
  • the resource request and connection protocol information received by the first service node that provides the target resource to the client are sent by the first load balancing node
  • the resource request and connection protocol information received by the first service node that provides the target resource to the client is sent by another service node, that is, in this way , the connection protocol information between the first load balancing node and the client can be transferred across devices, so that the devices can be interconnected and mutually scheduled, forming a distributed protocol scheduling capability, and effectively improving the efficiency of CDN services.
  • the above load balancing methods shown in FIG. 3 to FIG. 9 introduce several implementation manners of the load balancing solution provided by the embodiment of the present application. Among them, the load balancing node and the service node belong to the same data center. Based on the embodiment shown in FIG. 10 , the load balancing method provided by the embodiment of the present application will be introduced below when the implementation environment of the load balancing method includes multiple data centers.
  • FIG. 10 is a flowchart of a load balancing method provided by an embodiment of the present application. As shown in FIG. 10 , taking the interaction among the client, the first load balancing node, the second load balancing node and the third service node as an example for illustration, the load balancing method includes the following steps 1001 to 1007 .
  • a client sends a resource request to a first load balancing node, where the resource request is used to obtain a target resource.
  • this step 1001 is the same as that of the above step 301, so it will not be repeated here.
  • the first load balancing node In response to the client's resource request, the first load balancing node sends the resource request, the first load balancing node and The connection protocol information between the clients, the connection protocol information includes the adopted network protocol, the address information of the client and the address information of the first load balancing node.
  • the first load balancing node and the second load balancing node belong to different data centers.
  • Each data center corresponds to multiple service nodes.
  • the first load balancing node 1021 belongs to a first data center, and the first data center includes a plurality of service nodes 1031; the second load balancing node 1022 belongs to a second data center, and the second data center
  • the center includes multiple service nodes 1032 .
  • the first load balancing node receives the resource request, if the target resource does not exist in the data center where the first load balancing node is located, it determines the second load balancing node based on the target resource, and sends The second load balancing node sends the resource request and connection protocol information.
  • the first load balancing node can transfer resource requests and connection protocol information to load balancing nodes in other data centers in a timely manner when the target resource does not exist in the data center where it is located, so that when the client does not perceive , realizing the separation and transfer of resource requests and response messages, forming efficient forwarding in the DR mode of the application layer, and improving the efficiency of CDN services.
  • the first load balancing node stores resource storage conditions of multiple data centers, and the resource storage conditions of multiple data centers are used to indicate the resources stored in each data center and the network address of each data center.
  • the first load balancing node determines the second load balancing node based on resource storage conditions of multiple data centers stored by the first load balancing node. In this way, each load balancing node can quickly locate the data center that stores the target resource when the target resource does not exist in its own data center, improving CDN service efficiency.
  • the first load balancing node can also determine the load balancing node of the adjacent data center as the second load balancing node, and so on, that is, the embodiment of the present application determines the second load balancing node for the first load balancing node
  • the specific manner of the load balancing node is not limited.
  • the second load balancing node receives the resource request and the connection protocol information.
  • the second load balancing node determines a third service node in response to the resource request, and the third service node is used to provide the target resource.
  • this step 1004 is the same as that of the above-mentioned step 302 . It should be noted that the third service node and the second service node belong to the same data center, that is, the third service node and the first load balancing node belong to different data centers.
  • the second load balancing node sends the resource request and connection protocol information to the third service node.
  • the third service node receives the resource request and the connection protocol information.
  • the third service node In response to the resource request, based on the connection protocol information, the third service node sends a response message of the resource request to the client, so as to transmit the target resource to the client.
  • this step 1007 is the same as that of the above-mentioned step 305 .
  • the first load balancer can determine other data centers that can provide the target resource by itself, and send the data to the second load balancer corresponding to the data center.
  • the node sends the resource request and connection protocol information, so that the second load balancing node can determine the third service node from its own data center, and the response message of the third service node can be directly returned to the client without having to
  • the first load balancing node and the second load balancing node resource requests and response messages are separated and transferred without the client being aware, forming efficient forwarding in the DR mode of the application layer, and improving CDN service efficiency.
  • the second load balancing node when the second load balancing node does not have the target resource in the data center where the second load balancing node is located, continue to determine other data centers, and report to the corresponding load balancing nodes of other data centers Send the resource request and connection protocol information, and the service nodes in other data centers will provide the target resource to the client.
  • FIG. 11 is a schematic diagram of a load balancing method provided by an embodiment of the present application.
  • a client requests a target resource from a service node through a first load balancing node.
  • the client establishes a connection with the first load balancing node, sends a resource request to the first load balancing node, and the first load balancing node responds to the resource request, and if the data center where the first load balancing node is located does not have the target resource , send the resource request and connection protocol information to the second load balancing node.
  • the second load balancing node After receiving the resource request and connection protocol information, the second load balancing node responds to the resource request and selects Determine the third service node, send the resource request and connection protocol information to the third service node, based on the connection protocol information, the third service node uses the address information of the first load balancing node as the source address information, and uses the address information of the client
  • the information is the destination address information, and a response message corresponding to the resource request is generated, the response message carries the target resource, and the response message is directly sent to the client through the switch, so that the data center where the first load balancing node is located
  • the resource request and response packets are separated and transferred, and the efficient forwarding of the DR mode at the application layer is formed without the client being aware of it, which improves the efficiency of CDN services.
  • the resource request and connection protocol information received by the third service node that provides the target resource to the client is sent by the first load balancing node to the second load balancing node.
  • the connection protocol information between the first load balancing node and the client can be transferred across data centers, so that the data centers can be interconnected and communicate with each other. Scheduling, forming a distributed protocol scheduling capability, effectively improving the efficiency of CDN services.
  • the scheduling center finds that the resource requested by the client has a more suitable CDN node to provide services, it needs to pass the HTTP 302 status code to let the client initiate a request to a more suitable CDN node.
  • the resource request requires the client to establish more than 2 connections, and the resource request delay is doubled.
  • the client when the load balancing node finds that the resource requested by the client has a more suitable data center
  • the client does not need to re-initiate the resource request through the HTTP 302 status code, but can directly transfer the resource request and connection protocol information to the corresponding load balancing nodes of other data centers, realizing the situation that the client has no perception
  • resource requests and response messages are separated and flowed to form efficient forwarding in the DR mode of the application layer. Compared with 302 scheduling, it can effectively reduce the delay of resource requests while improving CDN service efficiency.
  • FIG. 12 is a schematic structural diagram of a load balancing device provided by an embodiment of the present application.
  • the load balancing device 1200 shown in FIG. 12 implements, for example, the function of the first load balancing node in the load balancing methods shown in FIGS. 3 to 11 above.
  • the load balancing device 1200 includes a service node determination module 1201 and a connection protocol information transfer module 1202 .
  • a service node determining module 1201, configured to determine a first service node in response to a resource request from a client, where the resource request is used to obtain a target resource;
  • a connection protocol information transfer module 1202 configured to send the resource request, connection protocol information between the first load balancing node and the client to the first service node, the connection protocol information includes the adopted network protocol, the client The address information of the terminal and the address information of the first load balancing node, the connection protocol information is used for the service node to send the response message of the resource request to the client, so as to transmit the target resource to the client, the response message
  • the source address information of is the address information of the first load balancing node.
  • connection protocol information transfer module 1202 is configured to:
  • the target message carries the connection protocol information, the network protocol used by the target message and the network protocol used to establish a connection between the first load balancing node and the service node are: the same network protocol.
  • the network protocol used to establish the connection between the first load balancing node and the client is the first network protocol
  • the network protocol used to establish the connection between the first load balancing node and the service node is For the second network protocol
  • the first network protocol is different from the second network protocol
  • the connection protocol information also includes the information carried in the difference field in the packet headers of the first network protocol and the second network protocol.
  • the first network protocol is HTTPS
  • the second network protocol is HTTP
  • the connection protocol information also includes the connection protocol established between the first load balancing node and the client. Key information required to connect.
  • the first network protocol is a full-duplex communication protocol websocket based on transmission control protocol TCP
  • the second network protocol is hypertext transfer protocol HTTP
  • the connection protocol information also includes the first load balancing node The key information required to establish a connection with the client and the request type of the resource request, which is used to identify the resource request as a web socket type request.
  • the first network protocol is Hypertext Transfer Protocol HTTP1.1
  • the second network protocol is Hypertext Transfer Protocol HTTP
  • the connection protocol information also includes the connection between the first load balancing node and the client Data range information required to establish a connection.
  • the device further includes a protocol conversion module, configured to perform protocol conversion on the resource request based on the target protocol when the resource request is not generated based on the target protocol, to obtain the resource request after protocol conversion , the target protocol represents the protocol used between the first load balancing node and the service node;
  • connection protocol information transfer module 1202 is used for:
  • the first service node and the first load balancing node belong to the same data center.
  • connection protocol information transfer module 1202 is also used to:
  • the target resource In response to the resource request, if the target resource does not exist in the data center where the first load balancing node is located, send the resource request and the connection protocol information to the second load balancing node, and the second load balancing node and the second load balancing node A load balancing node belongs to different data centers.
  • the load balancing device provided in the above embodiment performs load balancing
  • the division of the above-mentioned functional modules is used as an example for illustration.
  • the above-mentioned function distribution can be completed by different functional modules according to needs. That is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the load balancing device and the load balancing method embodiments provided in the above embodiments belong to the same idea, and the specific implementation process thereof is detailed in the method embodiments, and will not be repeated here.
  • Fig. 13 is a schematic structural diagram of a data processing device provided by an embodiment of the present application.
  • the data processing apparatus 1300 shown in FIG. 13 implements, for example, the function of a service node in the load balancing method shown in FIGS. 3 to 11 above.
  • the data processing device 1300 includes an information receiving module 1301 and a response packet sending module 1302 .
  • the information receiving module 1301 is configured to receive the resource request of the client, the connection protocol information between the first load balancing node and the client, the connection protocol information includes the adopted network protocol, the address information of the client and the first load The address information of the balance node, the resource request is used to obtain the target resource;
  • Response message sending module 1302 configured to respond to the resource request, based on the connection protocol information, send a response message of the resource request to the client, so as to transmit the target resource to the client, the response message
  • the source address information is address information of the first load balancing node.
  • the response message sending module 1302 is configured to respond to the resource request, based on the connection protocol information, use the address information of the first load balancing node as the source address information, and use the client address information as the destination address information, and send the response message of the resource request to the client.
  • the service node and the first load balancing node belong to the same data center.
  • the resource request and the connection protocol information are sent by the first load balancing node.
  • the resource request and the connection agreement information are sent by another service node of the data center.
  • the service node and the first load balancing node belong to different data centers.
  • the resource request and the connection protocol information are sent by the first load balancing node to the second load balancing node, they are sent by the second load balancing node, and the second load balancing node and the service node belong to In the same data center, the second load balancing node and the first load balancing node belong to different data centers.
  • the data processing device provided in the above-mentioned embodiments performs data processing
  • the division of the above-mentioned functional modules is used as an example for illustration.
  • the above-mentioned function allocation can be completed by different functional modules according to needs. That is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the data processing device provided by the above embodiment and the embodiment of the load balancing method belong to the same idea, and the specific implementation process thereof is detailed in the method embodiment, and will not be repeated here.
  • first and second are used to distinguish the same or similar items with basically the same function and function. It should be understood that “first”, “second” and “nth” There are no logical or timing dependencies, nor are there restrictions on quantity or order of execution. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, a first service node could be termed a second service node, and, similarly, a second service node could be termed a first service node, without departing from the scope of the various described examples. Both the first service node and the second service node may be service nodes, and in some cases may be separate and distinct service nodes.
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may be implemented in whole or in part in the form of a program product.
  • the program product includes one or more program instructions. When the program instructions are loaded and executed on the computing device, all or part of the processes or functions according to the embodiments of the present application will be generated.

Abstract

La présente demande appartient au domaine technique des communications. Sont divulgués un procédé et un appareil d'équilibrage de charge, un nœud, et un support de stockage. Le procédé comprend les étapes suivantes : après réception d'une demande de ressource d'un client, la possibilité pour un nœud d'équilibrage de charge de localiser un nœud de service précis à une étape, ce qui permet d'empêcher la génération d'une grande quantité de trafic est-ouest de dispositif croisé, et de réduire la pression d'un commutateur et du nœud de service ; en outre, l'envoi par le nœud d'équilibrage de charge de la demande de ressource et des informations de protocole de connexion au nœud de service, les informations de protocole de connexion comprenant un protocole de réseau utilisé, des informations d'adresse du client et des informations d'adresse du nœud d'équilibrage de charge. De cette manière, un nœud de service peut dissimuler un message de réponse d'un nœud d'équilibrage de charge sur la base d'informations de protocole de connexion, et envoie le message de réponse à un client, et le message de réponse contourne le nœud d'équilibrage de charge, de sorte qu'une circulation séparée d'une demande de ressource et du message de réponse est réalisée, et un transfert efficace d'une couche d'application acheminant directement un mode DR est formé, ce qui permet d'améliorer l'efficacité de service d'un CDN.
PCT/CN2022/116443 2022-02-10 2022-09-01 Procédé et appareil d'équilibrage de charge, noeud et support de stockage WO2023151264A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210124714.8A CN116633934A (zh) 2022-02-10 2022-02-10 负载均衡方法、装置、节点及存储介质
CN202210124714.8 2022-02-10

Publications (1)

Publication Number Publication Date
WO2023151264A1 true WO2023151264A1 (fr) 2023-08-17

Family

ID=87563523

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/116443 WO2023151264A1 (fr) 2022-02-10 2022-09-01 Procédé et appareil d'équilibrage de charge, noeud et support de stockage

Country Status (2)

Country Link
CN (1) CN116633934A (fr)
WO (1) WO2023151264A1 (fr)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117376662A (zh) * 2023-12-08 2024-01-09 杭州领信数科信息技术有限公司 一种集群式视频安全边界交换方法及装置

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116975158B (zh) * 2023-09-25 2024-01-26 腾讯科技(深圳)有限公司 请求处理方法、装置、计算机设备和存储介质
CN117240787B (zh) * 2023-11-14 2024-03-01 鹏城实验室 交换机负载均衡方法、装置、电子设备及可读存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6249801B1 (en) * 1998-07-15 2001-06-19 Radware Ltd. Load balancing
US20030195919A1 (en) * 2002-03-26 2003-10-16 Tatsuya Watanuki Packet distributing system and method for distributing access packets to a plurality of server apparatuses
CN102752188A (zh) * 2011-04-21 2012-10-24 北京邮电大学 一种传输控制协议连接迁移方法及系统
CN103220354A (zh) * 2013-04-18 2013-07-24 广东宜通世纪科技股份有限公司 一种实现服务器集群负载均衡的方法
CN106302225A (zh) * 2016-10-18 2017-01-04 上海优刻得信息科技有限公司 一种服务器负载均衡的方法与装置
CN106686085A (zh) * 2016-12-29 2017-05-17 华为技术有限公司 一种负载均衡的方法、装置和系统
CN113067824A (zh) * 2021-03-22 2021-07-02 平安科技(深圳)有限公司 数据调度方法、系统、虚拟主机及计算机可读存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6249801B1 (en) * 1998-07-15 2001-06-19 Radware Ltd. Load balancing
US20030195919A1 (en) * 2002-03-26 2003-10-16 Tatsuya Watanuki Packet distributing system and method for distributing access packets to a plurality of server apparatuses
CN102752188A (zh) * 2011-04-21 2012-10-24 北京邮电大学 一种传输控制协议连接迁移方法及系统
CN103220354A (zh) * 2013-04-18 2013-07-24 广东宜通世纪科技股份有限公司 一种实现服务器集群负载均衡的方法
CN106302225A (zh) * 2016-10-18 2017-01-04 上海优刻得信息科技有限公司 一种服务器负载均衡的方法与装置
CN106686085A (zh) * 2016-12-29 2017-05-17 华为技术有限公司 一种负载均衡的方法、装置和系统
CN113067824A (zh) * 2021-03-22 2021-07-02 平安科技(深圳)有限公司 数据调度方法、系统、虚拟主机及计算机可读存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117376662A (zh) * 2023-12-08 2024-01-09 杭州领信数科信息技术有限公司 一种集群式视频安全边界交换方法及装置
CN117376662B (zh) * 2023-12-08 2024-02-09 杭州领信数科信息技术有限公司 一种集群式视频安全边界交换方法及装置

Also Published As

Publication number Publication date
CN116633934A (zh) 2023-08-22

Similar Documents

Publication Publication Date Title
WO2020228505A1 (fr) Procédé, dispositif et système de sélection d'un nœud informatique en périphérie de réseau mobile
KR102514250B1 (ko) 모바일 에지 컴퓨팅 노드를 선택하기 위한 방법, 장치 및 시스템
US11122027B2 (en) End-to-end M2M service layer sessions
US10694005B2 (en) Hardware-based packet forwarding for the transport layer
WO2023151264A1 (fr) Procédé et appareil d'équilibrage de charge, noeud et support de stockage
US7774492B2 (en) System, method and computer program product to maximize server throughput while avoiding server overload by controlling the rate of establishing server-side net work connections
US9058213B2 (en) Cloud-based mainframe integration system and method
EP3142306B1 (fr) Procédé de communication openflow, système, contrôleur et passerelle de service
EP3735768B1 (fr) Amélioration de qoe pour services vidéo et web grâce à des informations entre couches
EP3588906B1 (fr) Gestion à trajets multiples avec http/2
CN110875799A (zh) 一种传输控制方法和装置
WO2021083284A1 (fr) Procédé et appareil d'équilibrage de charge, support et dispositif
WO2016180188A1 (fr) Procédé, appareil et système d'établissement de liaison répartie
WO2021254001A1 (fr) Procédé, appareil et système d'établissement de session, et support de stockage informatique
CN112631788A (zh) 数据传输方法及数据传输服务器
JP7076558B2 (ja) アンカーレス・バックホールのサポートのためのgtpトンネル
WO2021068937A1 (fr) Procédé et appareil de liaison de service
CN112968965A (zh) Nfv网络节点的元数据服务方法、服务器及存储介质
US20080298366A1 (en) Agnostic Network Architecture
EP4224750A1 (fr) Procédé et appareil d'envoi d'informations de routage de calcul, dispositif, et support de stockage
US20230130964A1 (en) Communication protocol, and a method thereof for accelerating artificial intelligence processing tasks
WO2023056873A1 (fr) Procédé de demande de données, appareil de communication, et système de communication
US11979457B2 (en) Managing network services using multipath protocols
US20220150303A1 (en) Managing network services using multipath protocols
Duchêne Helping the Internet scale by leveraging path diversity

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: 22925623

Country of ref document: EP

Kind code of ref document: A1