Node load control method and apparatus for distributed system

By collecting node load data and establishing transmission connections in a distributed system, user requests can be directly forwarded, solving the problems of business latency and interruption when nodes are overloaded, and improving load control efficiency and response speed.

WO2026137989A1PCT designated stage Publication Date: 2026-07-02HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2025-09-10
Publication Date
2026-07-02

Smart Images

  • Figure CN2025120287_02072026_PF_FP_ABST
    Figure CN2025120287_02072026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the embodiments of the present application are a node load control method and apparatus for a distributed system, which method and apparatus are used for improving the node load scheduling efficiency of the distributed system. The method in the embodiments of the present application comprises: a distributed system collecting load data sent by a plurality of nodes, wherein the load data comprises one or more of the following: a bandwidth, a processor utilization rate and a memory utilization rate; the distributed system determining a request transfer policy on the basis of the load data of the plurality of nodes, wherein the request transfer policy is used for transferring a user request among the plurality of nodes by means of a transport protocol among the plurality of nodes, so as to adjust loads of the plurality of nodes; and the distributed system forwarding the user request with regard to the plurality of nodes on the basis of the request transfer policy.
Need to check novelty before this filing date? Find Prior Art

Description

A method and apparatus for node load control in a distributed system

[0001] This application claims priority to Chinese Patent Application No. 202411955687.4, filed on December 25, 2024, entitled "A Node Load Control Method and Apparatus for a Distributed System", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of communications, and more particularly to a node load balancing method and apparatus for a distributed system. Background Technology

[0003] Anycast technology is a network technology that allows a single IP address to be assigned to multiple servers or devices in different geographical locations. When a client sends a data packet to this IP address, the anycast network automatically selects the nearest or optimal node to respond to the request based on the routing protocol. Anycast technology can be applied to scenarios such as content delivery network (CDN) services and domain name system (DNS) resolution services.

[0004] In current anycast networks, due to their characteristics, when users in a region access nodes within the network, all user requests from that region are routed to the same node. If the access volume in that region is high, exceeding the node's service capacity, the node will become overloaded and unable to provide services to users normally. Therefore, distributed systems need to implement load control for nodes in anycast networks. In current load control schemes, when a node's service capacity is overloaded, the distributed system can temporarily redirect user requests, controlling users to re-initiate user requests to other nodes, which then respond to the user requests, thereby achieving the goal of controlling node load.

[0005] However, in the current node load control scheme, when the nodes in the anycast network are overloaded, the distributed system needs to establish connections with other nodes based on temporary redirection technology before scheduling user requests. The delay in establishing connections between user clients and other nodes will cause significant service latency. At the same time, some user clients cannot support temporary redirection, which will lead to service interruption. Summary of the Invention

[0006] This application provides a node load control method for a distributed system, which improves the load scheduling efficiency during the node load control process. This application also provides a node load control device, network equipment, computer-readable storage medium, and computer program product corresponding to the node load control method for a distributed system.

[0007] In a first aspect, embodiments of this application provide a node load control method for a distributed system. This method can be executed by a computing device, a component of a network device (such as a processor, chip, or chip system), or a logic module or software capable of implementing all or part of the functions of the computing device. The method provided in the first aspect includes: the distributed system collecting load data sent by multiple nodes, the load data including one or more of the following: bandwidth, processor utilization, and memory utilization. The distributed system determines a request transfer strategy based on the load data of the multiple nodes. The request transfer strategy is used to transfer user requests between the multiple nodes through a transmission protocol between the multiple nodes, thereby adjusting the load of the multiple nodes. The distributed system forwards user requests to the multiple nodes according to the request transfer strategy.

[0008] In this embodiment, the distributed system can establish transmission connections between nodes. Simultaneously, the distributed system can forward user requests from nodes based on these transmission connections. Compared to the prior art where a node becomes overloaded and the client needs to re-establish a transmission connection with other nodes, in this embodiment, the distributed system can directly forward user requests based on the transmission connections between nodes, and other nodes can directly respond to user requests. This avoids the latency of the client establishing connections with other nodes and further improves the node load control efficiency in the distributed system.

[0009] In one possible implementation, the request transfer strategy includes one or more of the following: a request transfer identifier, a request transfer source node, a request transfer target node, and a transfer ratio. The request transfer identifier includes one or more of the following: domain name, resource type, client information, and user level. The request transfer source node includes the source node that transfers the user request, the request transfer target node includes the target node that transfers the user request, and the transfer ratio includes the percentage of clients that transfer user requests.

[0010] In this application, the distributed system's request transfer strategy can indicate the source and target nodes of the user's request transfer, as well as the transfer ratio, thereby improving the feasibility of user request transfer.

[0011] In one possible implementation, the multiple nodes include a first node and a second node. During the process of the distributed system forwarding user requests from multiple nodes according to the request transfer strategy, the first node forwards the first user request corresponding to the request transfer identifier to the second node based on the request transfer strategy, so that the user requests of the first node meet the transfer ratio. The first user request includes user requests sent by the user equipment to the first node.

[0012] In this embodiment of the application, the first node in the distributed system can forward user requests from the first node to the second node through a transmission connection, avoiding the delay in establishing a connection between the client and the second node, thereby improving the transfer efficiency of user requests from the first node to the second node in the distributed system.

[0013] In one possible implementation, the first node determines whether the user request needs to be transferred based on the request transfer strategy. Specifically, when the migration service submodule of the first node receives a request transfer identifier corresponding to the user request that matches the request transfer identifier in the request transfer strategy, the migration service submodule of the first node generates a random number between 0 and 1. If the random number matches the transfer ratio corresponding to the request transfer identifier in the request transfer strategy, the migration service submodule of the first node determines that the user request needs to be transferred, and the migration service submodule of the first node forwards the user request to the second node.

[0014] In this embodiment, the node migration service submodule can generate a random number between 0 and 1 for each user request with a request transfer identifier, and control the transfer ratio of the user request corresponding to the specified transfer identifier through the random number, so that the actual transfer ratio of the user request serves the transfer ratio in the request transfer strategy, thereby improving the feasibility of the node migration service submodule controlling the user request transfer ratio.

[0015] In one possible implementation, after the first node forwards its first user request to the second node based on a request forwarding strategy, the second node sends a first user response to the user equipment. The first user response is the user response corresponding to the user request received by the first node. Specifically, the migration service submodule of the first node forwards the first user request to the caching service submodule of the second node. The source IP address of this first user request is an anycast network IP address, and the destination IP address is the physical IP address of the second node. The caching service submodule of the second node generates a first user response based on the first user request and sends it to the user terminal through the Source Network Address Translation (SNAT) submodule.

[0016] In this embodiment, after the second node receives the user request forwarded by the first node, the second node can respond to the user request from the client. The client does not need to re-establish a connection with the second node, thereby improving the response efficiency of the distributed system to the user request from the client.

[0017] In one possible implementation, before the first node forwards the first user request from the first node to the second node, the distributed system establishes a transport connection between the first node and the second node. The transport connection is used to forward the first user request and includes a transport connection based on the Transmission Control Protocol (TCP).

[0018] In this embodiment of the application, the distributed system can establish a transmission connection between the first node and the second node in advance before the first node forwards the first user request of the first node to the second node, thereby improving the feasibility of the first node transferring the user request to the second node.

[0019] In one possible implementation, the distributed system includes a content delivery network system, and the nodes include content delivery network nodes (CDN nodes). The distributed system may also include a distributed computing system or a distributed database, and correspondingly, the nodes may include computing nodes and storage nodes.

[0020] The node load control method provided in this application embodiment can be applied to various types of distributed systems, thereby improving the applicability of the node load control method in this application embodiment.

[0021] In one possible implementation, the first user request includes a domain name resolution request. For example, the client sends a domain name resolution request to the local DNS server. The local DNS server checks its cache and finds no IP address record for the domain name. The client then initiates a recursive query to the configured DNS server. The DNS server queries each level to determine the authoritative DNS server of the CDN provider. Based on the client's geographical location and network conditions, the authoritative CDN DNS server selects a first CDN node and returns the IP address of that first CDN node to the local DNS server. The local DNS server caches the IP address and returns it to the client. The client then establishes a connection with the first CDN node based on the IP address and sends a user request.

[0022] The node load control method provided in this application embodiment can be applied to the domain name resolution process, thereby improving the response efficiency of the distributed system to the domain name resolution request of the client.

[0023] Secondly, this application provides a node load control device for a distributed system, comprising a transceiver unit and a processing unit. The transceiver unit collects load data sent by multiple nodes, including one or more of the following: bandwidth, processor utilization, and memory utilization. The processing unit determines a request transfer strategy based on the load data from the multiple nodes. This request transfer strategy is used to transfer user requests between the multiple nodes using a transmission protocol between them, thereby adjusting the load on the multiple nodes. The transceiver unit also forwards user requests to the multiple nodes according to the request transfer strategy.

[0024] In one possible implementation, the request transfer strategy includes one or more of the following: request transfer identifier, request transfer source node, request transfer target node, and transfer ratio. The request transfer identifier includes one or more of the following: domain name, resource type, client information, and user level.

[0025] In one possible implementation, the multiple nodes include a first node and a second node. The transceiver unit is specifically used to forward a first user request with a request transfer identifier to the second node based on a request transfer policy, so that the user requests of the first node meet the transfer ratio. The first user request includes a user request sent by the user equipment to the first node.

[0026] In one possible implementation, the transceiver unit is used to send a first user response to the user equipment, wherein the first user response is the user response corresponding to the user request received by the first node.

[0027] In one possible implementation, the processing unit is further configured to establish a transmission connection between the first node and the second node, the transmission connection being used to forward the first user request, and the transmission connection including a transmission control protocol TCP-based transmission connection.

[0028] In one possible implementation, the distributed system includes a content delivery network system, and the nodes include content delivery network nodes (CDN nodes).

[0029] In one possible implementation, the transceiver unit is also used to receive user requests sent by user equipment, wherein the destination IP address of the user request is an anycast network IP address.

[0030] Thirdly, embodiments of this application provide a computing device including a processor coupled to a memory. The processor stores instructions, which, when executed by the processor, cause the computing device to perform the method described in the first aspect or any possible implementation thereof.

[0031] Fourthly, embodiments of this application provide a computing device cluster, which includes one or more computing devices. Each computing device includes a processor coupled to a memory. The processor is used to store instructions, which, when executed by the processor, cause the computing device cluster to perform the method described in the first aspect or any possible implementation thereof.

[0032] Fifthly, embodiments of this application provide a computer-readable storage medium having instructions stored thereon, which, when executed, cause a computer to perform the method described in the first aspect or any possible implementation thereof.

[0033] Sixthly, embodiments of this application provide a computer program product including instructions that, when executed, cause a computer to implement the method described in the first aspect or any possible implementation thereof.

[0034] It is understood that the beneficial effects achieved by any of the node load control devices, computing devices, computing device clusters, computer-readable media or computer program products in the above-mentioned distributed system can be referred to the beneficial effects in the corresponding methods, and will not be repeated here. Attached Figure Description

[0035] Figure 1 is a schematic diagram of the system architecture of a distributed system provided in an embodiment of this application;

[0036] Figure 2 is a flowchart illustrating a node load control method for a distributed system provided in an embodiment of this application;

[0037] Figure 3 is a flowchart illustrating another node load control method for a distributed system provided in an embodiment of this application;

[0038] Figure 4 is a flowchart illustrating a domain name resolution process provided in an embodiment of this application;

[0039] Figure 5 is a schematic diagram of the structure of a node load control device for a distributed system provided in an embodiment of this application;

[0040] Figure 6 is a schematic diagram of the structure of a computing device provided in an embodiment of this application;

[0041] Figure 7 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of this application;

[0042] Figure 8 is a schematic diagram of another computing device cluster provided in an embodiment of this application. Detailed Implementation

[0043] This application provides a node load control method and apparatus for a distributed system, which can improve the node load scheduling efficiency of a distributed system.

[0044] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0045] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0046] First, some of the terms used in the embodiments of this application are introduced to facilitate understanding of the technical solutions by those skilled in the art.

[0047] Anycast, also known as select-cast, overcast, or random-cast, is a network routing technology that allows the same IP address to be assigned to server nodes distributed across multiple geographical locations globally. When a user sends a request to this IP address, the network automatically routes the request to the nearest or least loaded server node, thereby reducing latency and improving service availability and response speed.

[0048] A content delivery network (CDN) is a technology that uses distributed nodes to deploy servers across multiple nodes to instantly distribute static or dynamic resources such as websites, applications, videos, and audio to the nearest node where the user is located. This improves the speed and stability of users accessing these contents, reduces network congestion and latency, and also reduces the load on the origin server, thereby enhancing the availability and security of websites or applications.

[0049] The Domain Name System (DNS) is a distributed database that maps domain names to IP addresses. The primary function of DNS is to resolve domain names to IP addresses, or vice versa, enabling users to access resources on the internet through domain names.

[0050] Source network address translation (SNAT) is a network address translation technique primarily used to replace the source IP address with a public IP address when IP packets are sent from an internal network to an external network. Conversely, destination network address translation (DNAT) is a technique used to replace the destination IP address with an IP address from the internal network when IP packets are sent from an external network to an internal network.

[0051] A temporary redirect is when a server returns a status code (such as HTTP 302) and a new Uniform Resource Locator (URL) after receiving a request from a client. This indicates that the resource has been temporarily moved to a new location. A temporary redirect can also be called a 302 redirect.

[0052] To make the technical solution of this application clearer and easier to understand, the system architecture of this application will be described below with reference to the accompanying drawings.

[0053] Please refer to Figure 1, which is a schematic diagram of the system architecture of a distributed system provided in an embodiment of this application. In the example shown in Figure 1, the distributed system 10 includes a load monitoring module 101, a global scheduling module 102, nodes 103, and clients 104. Node 103 includes a load acquisition submodule 1031, a scheduling executor 1032, a caching service submodule 1033, a migration service submodule 1034, an access submodule 1035, and a source network address translation (SNAT) submodule 1036. The specific functions of each part of the distributed system 10 are described in detail below.

[0054] The load monitoring module 101 is used to monitor the load data of each node 103 in the distributed system 10. Specifically, the load monitoring module 101 receives load data sent by multiple nodes 103, wherein the load data includes one or more of the following: network bandwidth, CPU utilization, content utilization, and storage space.

[0055] The global scheduling module 102 is used to generate a scheduling policy based on the load data sent by each node 103 in the distributed system 10, and send the scheduling policy to multiple nodes 103. The scheduling policy is used to instruct that user requests be evenly distributed to each node 103, including transferring user requests of client 104 between multiple nodes 103.

[0056] Node 103 includes one or more nodes in the distributed system 10, and multiple nodes 103 in the distributed system 10 form an anycast network. Node 103 includes a load acquisition submodule 1031, a scheduler executor 1032, a caching service submodule 1033, a migration service submodule 1034, an access submodule 1035, a source network address translation (SNAT) submodule 1036, and a destination network address translation (DNAT) submodule 1037.

[0057] The load acquisition submodule 1031 is used to collect load data from node 103 and send the collected load data to the load monitoring module 101.

[0058] The scheduler executor 1032 is used to receive the scheduling policy sent by the global scheduling module 102 and execute the scheduling based on the scheduling policy. Specifically, the scheduler executor 1032 can migrate the client 104 connected to the node 103 based on the scheduling policy, that is, forward the user request of the client 104 to other nodes 103.

[0059] The caching service submodule 1033 is used to cache resources from the client's origin server and provide resource query services to the client 104. The caching service submodule 1033 can improve the response efficiency of user requests from the client 104. When a user from the client 104 requests access to content from the origin server, the caching service submodule 1033 first checks if a copy of the requested content exists in the cache. If it exists and has not expired, the caching service submodule 1033 can directly return the cached content to the user without sending a request to the origin server.

[0060] The migration service submodule 1034 is the functional module in node 103 responsible for node migration. The migration service submodule 1034 can query the scheduling policy from the scheduler executor 1032 and migrate the user requests of client 104 to other nodes 103 according to the scheduling policy.

[0061] The access submodule 1035 is used to receive user requests sent by the client 104.

[0062] The Source Network Address Translation (SNAT) submodule 1036 is used to process user responses, including modifying the source address of the user response message when the data packet is sent from the internal network to the external network.

[0063] The Destination Network Address Translation (DNAT) submodule 1037 is used to process user requests, including modifying the destination address of the user-requested message when the data packet is sent from the external network to the internal network.

[0064] It is understandable that the source network address translation (SNAT) submodule 1036 and the destination network address translation (DNAT) submodule 1037 are optional submodules of node 103. When the network composed of nodes 103 in the distributed system 10 is an anycast network, node 103 may not contain the source network address translation (SNAT) submodule 1036 and the destination network address translation (DNAT) submodule 1037.

[0065] Client 104 is used to initiate user requests to node 103 and receive user responses sent by node 103. Client 104 may be referred to as user equipment. Client 104 can be a hardware device or a software client, and there is no specific limitation.

[0066] It should be noted that in the embodiments of this application, the distributed system 10 can be a content delivery network (CDN) system, the node 103 can be a CDN node, and the distributed system 10 can also be a distributed computing system or a distributed database or other distributed systems, without any specific limitation.

[0067] Based on the distributed system 10 shown in Figure 1, this application also provides a method for a distributed system. The memory management method provided by the embodiments of this application will be described below with reference to specific examples.

[0068] Please refer to Figure 2, which is a flowchart illustrating a node load control method for a distributed system according to an embodiment of this application. In the example shown in Figure 2, the method includes the following steps:

[0069] 201. Collect load data sent by multiple nodes. The load data includes one or more of the following: bandwidth, processor utilization, and memory utilization.

[0070] The distributed system 10 collects load data sent by multiple nodes 103, wherein the load data includes one or more of the following: network bandwidth, processor utilization, memory utilization, and disk storage space. Specifically, multiple nodes 103 in the distributed system 10 collect load data from each node through the load collection submodule 1031 and send the load data to the load monitoring module 101.

[0071] Please refer to Figure 3, which illustrates another node load control method for a distributed system provided in this embodiment of the application. In the example shown in Figure 3, the distributed system 10 is a Content Delivery Network (CDN), and node 103 includes multiple CDN nodes. In the example shown in Figure 3, multiple CDN nodes share the same anycast network IP address. When client 104 initiates a user request, the distributed system 10 will send the user request to the nearest CDN node according to the routing protocol.

[0072] In steps 1 to 2 of the example shown in Figure 3, the load acquisition submodules 1031 of CDN node 1 and CDN node 2 collect load data and send the load data to the load monitoring module 101. After receiving the load data collected by CDN node 1 and CDN node 2, the load monitoring module 101 of the distributed system 10 sends the load data collected by each node to the global scheduling module 102.

[0073] 202. Determine a request transfer strategy based on the load data of multiple nodes. The request transfer strategy is used to transfer user requests between multiple nodes through the transmission protocol between multiple nodes, so as to adjust the load of multiple nodes.

[0074] The distributed system 10 determines a request transfer strategy based on the load data of multiple nodes. The request transfer strategy is used to adjust the load of multiple nodes through the transmission protocol between the multiple nodes. That is, the request transfer strategy can instruct user requests on overloaded nodes to be transferred to other nodes. The request transfer strategy includes one or more of the following: request transfer identifier, request transfer source node, request transfer target node, and transfer ratio.

[0075] The request transfer identifier includes one or more of the following: domain name, resource type, client information, and user level. The request transfer source node includes the source node or source node identifier that transfers the user request, the request transfer target node includes the target node or target node identifier that transfers the user request, and the transfer ratio includes the percentage of clients that transfer the user request.

[0076] The following details the contents of the request transfer identifier. Among them, the domain name includes the domain name corresponding to the user request, the resource type indicates the resource type corresponding to the user request, such as text, image and video, the client information indicates the device model or software version corresponding to the user request, and the user level indicates the user level corresponding to the user request.

[0077] In this embodiment, the distributed system 10 calculates request transfer strategies based on the load data of multiple nodes. These request transfer strategies can instruct node 103 to perform node load control so that user requests in node 103 reach a specified transfer ratio. For example, the request transfer strategy can instruct node 103 to transfer user requests corresponding to a specified domain name so that the transfer ratio of user requests corresponding to the specified domain name reaches a target transfer ratio.

[0078] In one possible implementation, the request transfer strategy can instruct node 103 to transfer user requests corresponding to a specified resource type, so that the transfer ratio of user requests corresponding to the specified resource type reaches a target transfer ratio. For example, if the user request received by the first node requests a video resource, then the first node forwards all user requests of that video type to the second node according to the request transfer strategy.

[0079] In one possible implementation, the request transfer strategy can also instruct node 103 to transfer user requests corresponding to specified client information, so that the transfer ratio of user requests corresponding to specified client information reaches the target transfer ratio. For example, if the user request received by the first node is a user request sent by a browser running a specific software version, then the first node forwards all user requests sent by that browser to the second node according to the request transfer strategy.

[0080] The transfer ratio in the request transfer strategy can be determined based on various types of load data. For example, when the load data is network bandwidth, the global scheduling module 102 of the distributed system 10 can determine the transfer ratio based on the bandwidth data of each node 103. Similarly, when the load data is processor utilization, the global scheduling module 102 of the distributed system 10 can determine the transfer ratio based on the processor utilization of each node 103. And again, when the load data is memory utilization, the global scheduling module 102 of the distributed system 10 can determine the transfer ratio based on the memory utilization of each node 103.

[0081] Please refer to Figure 3. In step 3 of the example shown in Figure 3, the global scheduling module 102 of the distributed system 10 determines the request transfer strategy based on the load data sent by the load monitoring module 101, and sends the request transfer strategy to the scheduler 1032 of CDN node 1. The request transfer strategy instructs CDN node 1 to forward the user request of CDN node 1 to CDN node 2 through the transmission connection established between CDN node 1 and CDN node 2.

[0082] Please refer to Table 1, which is a schematic table of a request transfer strategy provided in an embodiment of this application. In the example shown in Table 1, the global scheduling module 102 of the distributed system 10 can generate a request transfer strategy based on the load data of multiple nodes 103. The request transfer strategy can indicate the transfer identifier and transfer ratio corresponding to the user request that needs to be transferred, and can also indicate the source node and destination node for transferring the user request.

[0083] Table 1

[0084] 203. Forward user requests to multiple nodes according to the request transfer policy.

[0085] Distributed system 10 forwards user requests to multiple nodes according to a request forwarding strategy. Specifically, distributed system 10 forwards user requests from the source node to the target node through the transmission connection established between nodes 103, in accordance with the request forwarding strategy, so that the user requests from the source node meet the forwarding ratio specified by the request forwarding strategy.

[0086] For example, the distributed system 10 has multiple nodes, including a first node and a second node. After the access submodule 1035 of the first node in the distributed system 10 receives the user request sent by the client 104, the access submodule 1035 of the first node sends the user request to the migration service submodule 1034. The migration service submodule 1034 of the first node determines whether the user request needs to be transferred based on the request transfer strategy. If the transfer is required, the migration service submodule 1034 of the first node forwards the user request to the second node.

[0087] Please refer to Figure 3. In step 4 of the example shown in Figure 3, client 104 initiates a user request through the operator network. The operator network routes the user request to CDN node 1. CDN node 1 receives the user request. The source IP address of the user request is the client's IP address, and the destination IP address is the anycast IP address of the anycast network where CDN node 1 is located. After receiving the user request, CDN node 1's access submodule 1035 sends the user request to CDN node 1's migration service submodule 1034.

[0088] In one possible implementation, during the process of determining whether a user request needs to be transferred based on the request transfer strategy, the migration service submodule 1034 of the first node receives a request transfer identifier corresponding to the user request that matches the request transfer identifier in the request transfer strategy. Then, the migration service submodule 1034 of the first node generates a random number between 0 and 1. If the random number matches the transfer ratio corresponding to the request transfer identifier in the request transfer strategy, then the migration service submodule 1034 of the first node determines that the user request needs to be transferred and forwards the user request to the second node.

[0089] Please refer to Figure 3. In step 4 of the example shown in Figure 3, after the migration service submodule 1034 of CDN node 1 receives the user request, for example, the request transfer identifier corresponding to the user request is transfer identifier 1, and the transfer ratio corresponding to transfer identifier 1 in the request transfer strategy described in Table 1 above is 30%, then the migration service submodule 1034 of CDN node 1 generates a random number between 0 and 1. Assuming that the generated random data is 0.23, then the random number meets the transfer ratio of 30% corresponding to transfer identifier 1 in the request transfer strategy. Therefore, the migration service submodule 1034 of CDN node 1 determines that the user request needs to be transferred, and the migration service submodule 1034 of CDN node 1 forwards the user request to CDN node 2.

[0090] In one possible implementation, the first node forwards the first user request corresponding to the request transfer identifier to the second node based on the request transfer policy, so that the user requests of the first node meet the transfer ratio. The first user request includes the user request sent by the client 104 to the first node. Specifically, the migration service submodule 1034 of the first node obtains the request transfer policy from the scheduler executor 1032, and sends the first user request to the cache service submodule 1033 of the second node according to the request transfer identifier of the first user request and the corresponding transfer ratio.

[0091] Please refer to Figure 3. In steps 5 and 6 of the example shown in Figure 3, after the access submodule 1035 of CDN node 1 receives the user request sent by client 104, it sends the user request to the migration service submodule 1034. The migration service submodule 1034 determines whether the user request needs to be transferred. Specifically, the migration service submodule 1034 obtains the request transfer policy from the scheduler executor 1032, and determines whether to transfer the user request of CDN node 1 based on the request transfer representation and transfer ratio indicated by the request transfer policy.

[0092] In step 7 of the example shown in Figure 3, when the migration service submodule 1034 of CDN node 1 determines that the user request of CDN node 1 needs to be transferred according to the request transfer policy, the migration service submodule 1034 of CDN node 1 forwards the user request to the caching service submodule 1033 of CDN node 2. At this time, the source IP address of the user request is the IP address of anycast network, and the destination IP address is the physical IP address of CDN node 2.

[0093] In one possible implementation, after the first node forwards the first user request to the second node based on the request transfer policy, the second node processes the user request and sends a first user response to the user equipment. The first user response is the user response corresponding to the user request received by the first node, that is, the source IP address of the first user response is the anycast IP address of the anycast network, and the destination IP address of the first user response is the IP address of the client 104.

[0094] It should be noted that, in this embodiment of the application, the client 104 is not aware that the user request has been transferred from the first node to the second node. When the user request is forwarded from the first node to the second node, the client 104 does not need to re-establish a transmission connection with the second node, thereby improving the response efficiency of the user request.

[0095] In step 8 of the example shown in Figure 3, after the caching service submodule 1033 of CDN node 2 receives the user request forwarded by CDN node 1, the caching service submodule 1033 of CDN node 2 processes the user request, generates a user response, and sends the user response to client 104. The source IP address of the user response is the anycast network IP address, and the destination IP address of the user response is the client IP address.

[0096] In one possible implementation, the distributed system 10 establishes a transport connection between a first node and a second node. The transport connection is used to forward a first user request and includes a transport connection based on the Transmission Control Protocol (TCP).

[0097] Please refer to Figure 3. In the example shown in Figure 3, a transport connection needs to be established between CDN node 1 and CDN node 2 beforehand. When CDN node 1 determines that a user request needs to be transferred, it can use this transport connection to transfer the user request. Specifically, in the distributed system 10, CDN node 1 and CDN node 2 each have their own IP address and port number. CDN node 1 and CDN node 2 can establish a TCP connection based on a three-way handshake. When CDN node 1 needs to transfer the user request from client 104, it can forward the user request to CDN node 2 through this TCP connection.

[0098] In one possible implementation, the distributed system includes a content delivery network system, and the nodes include content delivery network nodes (CDN nodes). A first node receives user requests sent by user devices, where the destination IP address of the user request is an anycast network IP address, and the source IP address is the user device's IP address.

[0099] The node load control method provided in this application embodiment can also be applied to domain name resolution scenarios. The user equipment sends a domain name resolution request to the domain name resolution server, and the domain name resolution server returns the IP address corresponding to the domain name resolution request. This IP address is the IP address of the anycast network, and the user equipment sends a user request to the node corresponding to the anycast IP address.

[0100] Please refer to Figure 4, which is a flowchart illustrating a node load control method provided in an embodiment of this application. In the example shown in Figure 4, CDN node 1 and CDN node 2 announce the same anycast IP address to their respective access operators 3 and 1. For example, CDN node 1 and CDN node 2 announce the anycast IP address as 21.21.21.21 to operators 3 and 1, respectively, and operators 3 and 1 then announce the anycast IP address as 21.21.21.21 to the entire network.

[0101] In the example shown in Figure 4, the CDN provider sends the domain name resolution to the DNS server, and the resolved value is an Anycast IP. For example, when client 104 accesses xx.cdn.com, client 104 obtains the CDN node's IP address 21.21.21.21 from the DNS server and accesses this IP through ISP 2. Since ISP 2, which is connected to client 104, is not connected to the CDN node, ISP 2 forwards the user to CDN node 2 according to its routing policy.

[0102] In the example shown in Figure 4, after CDN node 2 receives the user request from client 104, it can forward the user request to CDN node 1 based on the request transfer policy. For example, if the request transfer policy obtained by CDN node 2 includes transferring user requests for the domain name "xx.cdn.com" from CDN node 2 to CDN node 1 with a transfer ratio of 30%, then CDN node 2 will forward user requests to CDN node 1 according to a random number of 30%.

[0103] As can be seen from the above embodiments, the distributed system in this application embodiment can establish transmission connections between nodes. The distributed system can directly forward user requests based on the transmission connections between nodes, and other nodes can directly respond to user requests, thereby avoiding the latency of the client establishing connections with other nodes and further improving the node load control efficiency in the distributed system.

[0104] Based on the above method embodiments, this application also provides a node load control device. The node load control device for a distributed system provided in this application is described in detail below.

[0105] Please refer to Figure 5, which is a schematic diagram of the structure of a node load control device provided in an embodiment of this application. In the example shown in Figure 5, the node load control device 500 of the distributed system is used to implement the various steps executed by the memory management system in the above embodiments. The node load control device 500 includes a transceiver unit 501 and a processing unit 502.

[0106] The transceiver unit 501 is used to collect load data sent by multiple nodes. The load data includes one or more of the following: bandwidth, processor utilization, and memory utilization. The processing unit 502 is used to determine a request transfer strategy based on the load data from the multiple nodes. The request transfer strategy is used to transfer user requests between the multiple nodes using a transmission protocol between the multiple nodes, thereby adjusting the load on the multiple nodes. The transceiver unit 501 is also used to forward user requests to the multiple nodes according to the request transfer strategy.

[0107] In one possible implementation, the request transfer strategy includes one or more of the following: request transfer identifier, request transfer source node, request transfer target node, and transfer ratio. The request transfer identifier includes one or more of the following: domain name, resource type, client information, and user level.

[0108] In one possible implementation, the multiple nodes include a first node and a second node. The transceiver unit 501 is specifically used to forward the first user request corresponding to the request transfer identifier to the second node based on the request transfer strategy, so that the user request of the first node meets the transfer ratio.

[0109] In one possible implementation, the transceiver unit 501 is used to send a first user response to the user equipment, wherein the first user response is the user response corresponding to the user request received by the first node.

[0110] In one possible implementation, the processing unit 502 is further configured to establish a transmission connection between the first node and the second node, the transmission connection being used to forward the first user request, and the transmission connection including a transmission control protocol TCP-based transmission connection.

[0111] In one possible implementation, the distributed system includes a content delivery network system, and the nodes include content delivery network nodes (CDN nodes).

[0112] In one possible implementation, the transceiver unit 501 is further configured to receive a user request sent by a user equipment, wherein the destination IP address of the user request is an anycast network IP address.

[0113] It is understandable that the transceiver unit 501 and the processing unit 502 in the node load control device 500 of the distributed system can be mapped as functional modules to each module in the distributed system 10 in Figure 1, thereby realizing the functions of each module in the distributed system 10.

[0114] It should be understood that the division of units in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, all units in the device can be implemented entirely through software calls from processing elements; all units can be implemented entirely in hardware; or some units can be implemented through software calls from processing elements, and others in hardware. For example, each unit can be a separate processing element, or it can be integrated into a chip within the device. Alternatively, it can be stored as a program in memory, called and executed by a processing element of the device. Moreover, these units can be fully or partially integrated together, or implemented independently. The processing element mentioned here can also be called a processor, which can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above units can be implemented through integrated logic circuits in the processor element or through software calls from processing elements.

[0115] It is worth noting that, for the sake of simplicity, the above method embodiments are described as a series of actions. However, those skilled in the art should know that this application is not limited to the order of the described actions. Furthermore, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by this application.

[0116] Other reasonable combinations of steps that can be conceived by those skilled in the art based on the above description also fall within the scope of protection of this application. Furthermore, those skilled in the art should also be aware that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to this application.

[0117] Please refer to Figure 6, which is a schematic diagram of the structure of a computing device provided in an embodiment of this application. As shown in Figure 6, the computing device 600 includes: a processor 601, a memory 602, a communication interface 603, and a bus 604. The processor 601, the memory 602, and the communication interface 603 are coupled through the bus (not labeled in the figure). The memory 602 stores instructions. When the execution instructions in the memory 602 are executed, the computing device 600 executes the method executed by the distributed system in the above method embodiment.

[0118] The computing device 600 may be one or more integrated circuits configured to implement the methods described above, such as: one or more application-specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs), or a combination of at least two of these forms of integrated circuits. Furthermore, when the units in the device can be implemented in the form of a processing element scheduler, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor capable of calling programs. Alternatively, these units may be integrated together to implement a system-on-a-chip (SOC).

[0119] Processor 601 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor may be a microprocessor or any conventional processor.

[0120] Memory 602 can be volatile memory or non-volatile memory, or may include both. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0121] The memory 602 stores executable program code, and the processor 601 executes the executable program code to implement the functions of the aforementioned units or modules, thereby implementing the node load control method described above. That is, the memory 602 stores instructions for executing the node load control method described above.

[0122] The communication interface 603 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 600 and other devices or communication networks.

[0123] In addition to the data bus, the 604 bus can also include a power bus, a control bus, and a status signal bus. The bus can be a Peripheral Component Interconnect Express (PCIe) bus, an Extended Industry Standard Architecture (EISA) bus, a Unified Bus (Ubus or UB), a Compute Express Link (CXL) bus, a Cache Coherent Interconnect for Accelerators (CCIX) bus, etc. The bus can be divided into address bus, data bus, and control bus.

[0124] Please refer to Figure 7, which is a schematic diagram of a computing device cluster provided in an embodiment of this application. As shown in Figure 7, the computing device cluster 700 includes at least one computing device 600.

[0125] As shown in Figure 7, the computing device cluster 700 includes at least one computing device 600. The memory 602 of one or more computing devices 600 in the computing device cluster 700 may store the same instructions for executing the node load control method described above.

[0126] In some possible implementations, the memory 602 of one or more computing devices 600 in the computing device cluster 700 may also store partial instructions for executing the above-described node load control method. In other words, a combination of one or more computing devices 600 can jointly execute the instructions for executing the above-described node load control method.

[0127] It should be noted that the memories 602 in the different computing devices 600 within the computing device cluster 700 can store different instructions, each used to execute a portion of the functions of the aforementioned node load control device. That is, the instructions stored in the memories 602 of the different computing devices 600 can implement the functions of one or more modules in the processing unit and transceiver unit.

[0128] In some possible implementations, one or more computing devices 600 in the computing device cluster 700 can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc.

[0129] Please refer to Figure 8, which is a schematic diagram of computer devices in a computer cluster connected via a network according to an embodiment of this application. As shown in Figure 8, two computing devices 600A and 600B are connected via a network. Specifically, they are connected to the network through the communication interfaces in each computing device.

[0130] In one possible implementation, the memory in computing device 600A stores instructions for performing transceiver unit functions. Meanwhile, the memory in computing device 600B stores instructions for performing processing unit functions.

[0131] It should be understood that the functions of computing device 600A shown in Figure 8 can also be performed by multiple computing devices. Similarly, the functions of computing device 600B can also be performed by multiple computing devices.

[0132] In another embodiment of this application, a computer-readable storage medium is also provided, which stores computer-executable instructions. When the processor of the device executes the computer-executable instructions, the device executes the method performed by the distributed system in the above method embodiment.

[0133] In another embodiment of this application, a computer program product is also provided, which includes computer-executable instructions stored in a computer-readable storage medium. When the processor of the device executes the computer-executable instructions, the device performs the method executed by the distributed system in the above method embodiments.

[0134] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0135] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0136] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0137] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0138] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A node load control method for a distributed system, characterized in that, Applied to a distributed system, the distributed system comprising multiple nodes forming an anycast network, the multiple nodes having the same IP address, the method includes: Collect load data sent by the multiple nodes, wherein the load data includes one or more of the following: bandwidth, processor utilization, and memory utilization; A request transfer strategy is determined based on the load data of the multiple nodes. The request transfer strategy is used to transfer user requests between the multiple nodes through the transmission protocol between the multiple nodes, so as to adjust the load of the multiple nodes. User requests for the multiple nodes are forwarded according to the request transfer strategy.

2. The method according to claim 1, characterized in that, The request transfer strategy includes one or more of the following: request transfer identifier, request transfer source node, request transfer target node, and transfer ratio. The request transfer identifier includes one or more of the following: domain name, resource type, client information, and user level.

3. The method according to claim 2, characterized in that, The plurality of nodes includes a first node and a second node, and forwarding user requests to the plurality of nodes according to the request transfer strategy includes: The first node forwards the first user request corresponding to the request transfer identifier to the second node based on the request transfer strategy, so that the user requests of the first node meet the transfer ratio.

4. The method according to claim 3, characterized in that, After the first node forwards the first user request corresponding to the request transfer identifier to the second node based on the request transfer policy, the method further includes: The second node sends a first user response to the user equipment, wherein the first user response is the user response corresponding to the user request received by the first node.

5. The method according to claim 3 or 4, characterized in that, The method includes: A transmission connection is established between the first node and the second node. The transmission connection is used to forward the first user request. The transmission connection includes a transmission connection based on the Transmission Control Protocol (TCP).

6. The method according to any one of claims 1 to 5, characterized in that, The method further includes; The first node receives a user request sent by the user equipment, wherein the destination IP address of the user request is an anycast network IP address.

7. A node load control device for a distributed system, characterized in that, The device includes: The transceiver unit is used to collect load data sent by the multiple nodes, and the load data includes one or more of the following: bandwidth, processor utilization, and memory utilization. The processing unit is configured to determine a request transfer strategy based on the load data of the plurality of nodes. The request transfer strategy is used to transfer user requests between the plurality of nodes through the transmission protocol between the plurality of nodes, so as to adjust the load of the plurality of nodes. The transceiver unit is also used to forward user requests for the multiple nodes according to the request transfer strategy.

8. The apparatus according to claim 7, characterized in that, The request transfer strategy includes one or more of the following: request transfer identifier, request transfer source node, request transfer target node, and transfer ratio. The request transfer identifier includes one or more of the following: domain name, resource type, client information, and user level.

9. The apparatus according to claim 8, characterized in that, The plurality of nodes includes a first node and a second node, and the transceiver unit is specifically used for: Based on the request transfer strategy, the first user request corresponding to the request transfer identifier is forwarded to the second node so that the user requests of the first node meet the transfer ratio.

10. The apparatus according to claim 9, characterized in that, The transceiver unit is used to send a first user response to the user equipment, wherein the first user response is the user response corresponding to the user request received by the first node.

11. The apparatus according to claim 9 or 10, characterized in that, The processing unit is further configured to establish a transmission connection between the first node and the second node, the transmission connection being used to forward the first user request, and the transmission connection including a transmission control protocol TCP-based transmission connection.

12. The apparatus according to any one of claims 7 to 11, characterized in that, The transceiver unit is also used to receive user requests sent by the user equipment, wherein the destination IP address of the user request is an anycast network IP address.

13. A computing device cluster, characterized in that, The device includes at least one computing device, the computing device including a processor coupled to a memory, the processor being used to store instructions that, when executed by the processor, cause the cluster of computing devices to perform the method of any one of claims 1 to 6.

14. A computer-readable storage medium having instructions stored thereon, characterized in that, When the instructions are executed, they cause the computer to perform the method of any one of claims 1 to 6.

15. A computer program product, the computer program product comprising instructions, characterized in that, When the instructions are executed, they cause the computer to implement the method of any one of claims 1 to 6.