Multi-node speed limiting method and device and electronic equipment
By sending speed-limited memory configuration data to the target node and synchronizing the memory pointer in the NUMA architecture, the problem that independent speed limiting cannot achieve overall speed limiting across nodes is solved, unified speed limiting and resource management of multiple nodes are achieved, and improved The overall performance and resource allocation balance of the system.
Patent Information
- Application Number
- CN202410831577.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-09-10
AI Technical Summary
Under the NUMA architecture, the independent rate limiting method can only adjust a single node, and cannot achieve overall rate limiting across nodes. It cannot perform unified resource management and scheduling on multiple nodes when system resources are limited.
By sending the speed-limiting memory configuration data to the target node and synchronizing the memory pointer of the target node to other nodes, all nodes use the same speed-limiting memory configuration data to achieve overall speed limiting across nodes. Specific steps include sending rate-limiting memory configuration data to the target node, obtaining pending packets, matching them according to the rate-limiting memory configuration data, and sending them to the rate-limiting queue to ensure that all nodes use the same rate-limiting policy and bandwidth.
It realizes the overall cross-node speed limit for multiple nodes in the non-consistent memory access architecture system, improves the system's processing efficiency and the balance of resource allocation, and ensures the consistency of resource allocation and processing status between different nodes. .
Smart Images

Figure CN118631745A
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of network security technology, and in particular to a multi-node speed limiting method, device and electronic device. Background Art
[0002] In the NUMA (Non-Uniform Memory Access) architecture, the system memory is divided into several nodes, each of which has an independent processor and local memory, which improves the parallelism of memory access. In addition, the NUMA architecture can achieve load balancing through distributed management of tasks and memory, thereby improving the overall performance of the system.
[0003] The NUMA architecture supports the QoS (Quality of Service) function. The QoS module on each node is used to optimize and manage the quality of memory access, ensuring that appropriate resource allocation is provided for different applications or tasks when system resources are limited. Resource allocation affects the processing speed of each node. Therefore, in the scenario of ensuring QoS and balanced resource allocation, each node of the NUMA architecture needs to adopt node speed limiting technology.
[0004] Since the processes between nodes in a NUMA architecture system are independent of each other, when supporting the QoS function, each node can only be speed-limited independently. Independent speed limiting limits the overall resource consumption of a node through resource management and scheduling mechanisms within each node. However, the independent speed limiting method is limited to adjusting a single node and cannot achieve overall speed limiting across nodes. Summary of the invention
[0005] The present application provides a multi-node speed limiting method, device and electronic device to solve the problem that the independent speed limiting method only adjusts a single node and cannot achieve overall speed limiting across nodes.
[0006] In a first aspect, the present application provides a multi-node speed limiting method, which is applied to a non-uniform memory access architecture system, wherein the non-uniform memory access architecture system includes a plurality of nodes, and the method includes:
[0007] Sending speed-limited memory configuration data to a target node; wherein the target node is one of multiple nodes of a non-consistent memory access architecture system; the speed-limited memory configuration data is used to set a processing channel of the target node, and the processing channel includes a speed-limited queue;
[0008] Synchronize the memory pointer of the target node to the non-target node in the non-consistent memory access architecture system; wherein the memory pointer is used to obtain the speed limit memory configuration data of the target node;
[0009] Obtaining a message to be processed, and sending the message to be processed to the first node;
[0010] If the first node is a non-target node, the speed limit memory configuration data of the target node is obtained according to the memory pointer;
[0011] Match the message to be processed according to the speed limit memory configuration data to obtain the processing channel corresponding to the message to be processed;
[0012] The message to be processed is sent to the rate-limited queue in the processing channel corresponding to the message to be processed.
[0013] The method sends speed limit memory configuration data to the target node, and synchronizes the speed limit memory configuration data of the target node to the non-target node through the memory pointer, so that the nodes in the non-consistent memory access architecture system use the same speed limit memory configuration data, thereby realizing the overall speed limit of the system across nodes.
[0014] In an implementation manner of the first aspect, the method further includes:
[0015] If the first node is the target node, the message to be processed is matched according to the speed limit memory configuration data to obtain a processing channel corresponding to the message to be processed;
[0016] The message to be processed is sent to the rate-limited queue in the processing channel corresponding to the message to be processed.
[0017] In the method, if the message to be processed is processed in the target node, it is directly matched according to the speed limit memory configuration data to obtain the processing channel corresponding to the message to be processed, and the message to be processed is sent to the corresponding speed limit queue to improve the processing efficiency of the system.
[0018] In an implementation manner of the first aspect, after obtaining the message to be processed and sending the message to be processed to the first node, the method further includes:
[0019] Get the node number of the first node;
[0020] The node label is set as the first label, and the node label is stored in the data packet of the message to be processed.
[0021] In the method, the node number receiving the message to be processed is recorded, so that the message to be processed can be processed at the same node, thereby improving the probability of successful message processing.
[0022] In an implementation manner of the first aspect, the processing channel further includes a rate-limiting bandwidth, and the method further includes:
[0023] Control the second node to obtain the message to be processed from the rate limit queue;
[0024] According to the speed limit bandwidth of the processing channel corresponding to the message to be processed, the processing status of the message to be processed is detected, and the processing status is a processable state or an unprocessable state;
[0025] If the processing state of the message to be processed is a processable state, obtaining the data packet of the message to be processed;
[0026] If the processing status of the pending message is an unprocessable status, the pending message is deleted.
[0027] In the method, after the second node obtains the to-be-processed message dequeued from the speed-limited queue, it detects the processing status of the to-be-processed message according to the speed-limited bandwidth, and selects to continue processing or delete the to-be-processed message according to the processing status, thereby improving the accuracy of message processing.
[0028] In an implementation manner of the first aspect, after obtaining the data packet of the message to be processed, the method further includes:
[0029] Get the node number in the data packet;
[0030] Obtaining a node number of a second node, and marking the node number as a second number;
[0031] Compare the first label with the second label;
[0032] If the first label is the same as the second label, the message to be processed is retained in the second node;
[0033] If the first label is different from the second label, the message to be processed is sent to the first node.
[0034] In the method, a first node that sends a message to be processed to a speed limit queue and a second node that takes the message to be processed out of the speed limit queue are compared. If the node numbers of the first node and the second node are the same, it means that the first node and the second node are the same node, and the message to be processed is retained in the second node; if the node numbers of the first node and the second node are different, it means that the first node and the second node are different nodes, and the message to be processed needs to be sent to the first node to improve the accuracy and success rate of message processing.
[0035] In an implementation manner of the first aspect, if the first label is different from the second label, the method further includes:
[0036] Obtain a first node corresponding to the first label according to the first label;
[0037] Sending the message to be processed to the transmission channel of the first node;
[0038] Control the first node to obtain the message to be processed from the transmission channel.
[0039] In the method, if the first node and the second node are different nodes, it is necessary to send the message to be processed to the transmission channel of the first node, and then control the first node to obtain the message to be processed from the transmission channel, so that the message to be processed can be processed in the source node, thereby improving the success rate of message processing.
[0040] In an implementation manner of the first aspect, obtaining the rate limit memory configuration data of the target node according to the memory pointer includes:
[0041] Query the speed limit memory configuration data of the target node based on the memory pointer;
[0042] The rate limit memory configuration data of the target node is sent to the non-target nodes.
[0043] In the method, the speed limit memory configuration data of the target node is queried through a memory pointer and sent to a non-target node, so that the target node and the non-target node use the same speed limit memory configuration data, thereby improving the consistency and integrity of message processing by multiple nodes in a non-consistent memory access architecture system.
[0044] In an implementation manner of the first aspect, sending rate limit memory configuration data to a target node includes:
[0045] Allocate processing channels to target nodes;
[0046] Set the matching strategy and speed limit bandwidth of the processing channel; the matching strategy is the correspondence between the type of message to be processed and the processing channel;
[0047] Set the properties of the speed limit queue corresponding to the processing channel. The properties of the speed limit queue include the length and management policy of the speed limit queue.
[0048] In the method, the accuracy of the system's message speed limit is improved by accurately setting the processing channel, matching strategy and speed limit bandwidth of the speed limit memory configuration data.
[0049] In a second aspect, the present application provides a multi-node speed limiting device, which is applied to a non-uniform memory access architecture system, the non-uniform memory access architecture system includes a plurality of nodes, and the device includes:
[0050] Target node configuration module: sending speed limit memory configuration data to a target node; wherein the target node is one of multiple nodes of a non-consistent memory access architecture system; the speed limit memory configuration data is used to set a processing channel of the target node, and the processing channel includes a speed limit queue;
[0051] Memory pointer synchronization module: synchronizes the memory pointer of the target node to the non-target node in the non-consistent memory access architecture system; wherein the memory pointer is used to obtain the speed limit memory configuration data of the target node;
[0052] Message acquisition module: acquires the message to be processed and sends the message to be processed to the first node;
[0053] The speed limit memory configuration data acquisition module: if the first node is a non-target node, the speed limit memory configuration data of the target node is acquired according to the memory pointer;
[0054] Processing channel matching module: matches the message to be processed according to the speed limit memory configuration data to obtain the processing channel corresponding to the message to be processed;
[0055] Message sending module: sends the message to be processed to the rate-limited queue in the processing channel corresponding to the message to be processed.
[0056] In a third aspect, the present application provides an electronic device, including:
[0057] one or more processors;
[0058] a memory configured to store one or more programs;
[0059] Among them, when one or more programs are executed by one or more processors, one or more processors implement the multi-node speed limiting method described in the first aspect above.
[0060] It can be seen from the above technical scheme that the present application provides a multi-node speed limiting method, device and electronic device, the method comprising: sending speed limiting memory configuration data to a target node; wherein the target node is one of multiple nodes of a non-consistent memory access architecture system; the speed limiting memory configuration data is used to set a processing channel of the target node, and the processing channel includes a speed limiting queue; synchronizing the memory pointer of the target node to a non-target node in the non-consistent memory access architecture system; wherein the memory pointer is used to obtain the speed limiting memory configuration data of the target node; obtaining a message to be processed, and sending the message to be processed to a first node; if the first node is a non-target node, obtaining the speed limiting memory configuration data of the target node according to the memory pointer; matching the message to be processed according to the speed limiting memory configuration data to obtain the processing channel corresponding to the message to be processed; sending the message to be processed to the speed limiting queue in the processing channel corresponding to the message to be processed.
[0061] The method sends speed limit memory configuration data to the target node, and synchronizes the speed limit memory configuration data of the target node to the non-target node through the memory pointer, so that the nodes in the non-consistent memory access architecture system use the same speed limit memory configuration data, thereby realizing the overall speed limit of the system across nodes. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0063] Figure 1 This is an architecture diagram of the firewall system with multi-node independent speed limiting according to an embodiment of the present application;
[0064] Figure 2 This is an architectural diagram of the multi-node overall speed limit of the firewall system described in the embodiment of the present application;
[0065] Figure 3 A schematic diagram of a multi-node speed limiting method according to an embodiment of the present application;
[0066] Figure 4 This is a schematic diagram of memory allocation for the QoS module described in an embodiment of the present application;
[0067] Figure 5 This is a schematic diagram of a message to be processed entering a rate-limited queue according to an embodiment of the present application;
[0068] Figure 6 A flowchart for detecting whether a message to be processed is processable as described in an embodiment of the present application;
[0069] Figure 7 A flowchart for determining whether a first node and a second node are the same as described in an embodiment of the present application;
[0070] Figure 8 A schematic diagram of a message to be processed from a rate-limited queue according to an embodiment of the present application;
[0071] Fig. 9 Another schematic diagram of a message to be processed from a rate-limited queue according to an embodiment of the present application;
[0072] Fig.10 This is a structural diagram of the multi-node speed limiting device described in an embodiment of the present application. DETAILED DESCRIPTION
[0073] The following embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following embodiments do not represent all implementations consistent with the present application. They are only examples of systems and methods consistent with some aspects of the present application as detailed in the claims.
[0074] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.
[0075] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.
[0076] NUMA architecture is a memory architecture for multi-processor computer systems that is used to improve the performance of large-scale parallel computing. The NUMA architecture includes multiple nodes, each of which has a corresponding processor and local memory. The processor accesses local memory faster than the memory of other nodes, so the processors in each node of the NUMA architecture are used to process local memory.
[0077] The NUMA architecture supports the QoS function. The QoS module on each node is used to optimize and manage the quality of memory access to ensure that appropriate resources are allocated to different applications or tasks when system resources are limited.
[0078] Resource allocation affects the processing speed of each node. To ensure balanced resource allocation, the system needs to allocate and schedule resources according to user requirements and provide different service qualities for different data streams. QoS will give priority to important data packets with strong real-time performance, while QoS will lower the processing priority for common data packets with weak real-time performance. Therefore, it is necessary to limit the speed of nodes processing packets and control the transmission rate according to the type of data packets.
[0079] However, since the processes between nodes in the NUMA architecture system are independent of each other, when supporting the QoS function, it is necessary to allocate memory to the QoS module of each node separately and perform independent speed limits, and it is impossible to achieve overall speed limits across nodes. Figure 1 As shown, the firewall system includes node 1, node 2, node 3 and node 4. The first QoS module memory 101, the second QoS module memory 102, the third QoS module memory 103 and the fourth QoS module memory 104 are initialized on node 1, node 2, node 3 and node 4 respectively to achieve independent speed limiting of the corresponding nodes.
[0080] The embodiment of the present application provides a multi-node speed limiting method, device and electronic device, which can solve the problem that the independent speed limiting method only adjusts a single node and cannot achieve overall speed limiting across nodes. The following takes the process of speed limiting a multi-node firewall system as an example to introduce the technical solution of the present application in detail.
[0081] Figure 2 Schematic diagram of the internal architecture of a firewall system using a multi-node speed limiting method, wherein the QoS module memory 201 is initialized in node 1, and the QoS module memory is not initialized in nodes 2, 3 and 4.
[0082] See also Figure 3 Some embodiments of the present application provide a multi-node speed limiting method, which can be applied to the overall speed limiting of each node in the firewall system, and specifically includes the following steps:
[0083] Step S100: Send speed-limited memory configuration data to a target node.
[0084] The target node is node 1, node 2, node 3 or node 4; the speed limit memory configuration data is used to set a processing channel of the target node, and the processing channel includes a speed limit queue.
[0085] In some embodiments, sending the speed limit memory configuration data to the target node includes: allocating a processing channel to the target node, setting a matching strategy and speed limit bandwidth for the processing channel, and setting properties of a speed limit queue corresponding to the processing channel.
[0086] For example, with node 1 as the target node, the speed limit memory configuration data is sent to node 1. Figure 4 As shown, the first channel 401, the second channel 402 and the third channel 403 are allocated on the node 1. The first channel 401 includes the matching strategy and speed limit bandwidth of the first channel 401, and the speed limit queue 404; the second channel 402 includes the matching strategy and speed limit bandwidth of the second channel 402, and the speed limit queue 405; the third channel 403 includes the matching strategy and speed limit bandwidth of the third channel 403, and the speed limit queue 406.
[0087] In some embodiments, the matching strategy is the correspondence between the type of message to be processed and the processing channel; the attribute of the speed limit queue is the length of the speed limit queue and the management strategy. For example, multiple processing channels can be allocated to each node, each processing channel matches different types of data and sets the corresponding speed limit bandwidth. For each processing channel, there is a corresponding speed limit queue, which is used to store data waiting to be sent. The size of the speed limit queue is configured as needed to balance latency and throughput.
[0088] For example, taking the first channel 401 on node 1 as an example, the first channel 401 needs to limit the data packets sent by the specific IP address 10.10.10.10. In the speed limit memory configuration data, the matching strategy is to check the source IP address of each data packet. If the source IP address matches 10.10.10.10, the data packet is sent to the first channel 401. Setting the first channel 401 to a speed limit bandwidth of 10 megabits (M) means that the data packets sent by 10.10.10.10 will be limited to a rate of 10M.
[0089] Exemplarily, taking the second channel 402 on node 1 as an example, the second channel 402 needs to limit the data flow of P2P (Peer-to-Peer, network point-to-point technology) software. In the speed limit memory configuration data, the matching strategy is to identify P2P data traffic through DPI (Deep Packet Inspection) or application layer identification technology. If P2P data traffic is identified, the data traffic is sent to the second channel 402. Setting the second channel 402 to a speed limit bandwidth of 50M means that the P2P data traffic is limited to a rate of 50M.
[0090] Step S200: Synchronize the memory pointer of the target node to the non-target node in the non-uniform memory access architecture system.
[0091] The memory pointer points to data stored at a specific memory address in the target node, and is used to obtain the speed limit memory configuration data of the target node.
[0092] In some embodiments, after receiving the rate-limiting memory configuration data, the target node generates a memory pointer for storing the rate-limiting memory configuration data.
[0093] Exemplarily, taking node 1 as the target node, node 1 receives speed limit memory configuration data, including the first channel 401, the second channel 402 and the third channel 403, as well as the matching strategies, speed limit bandwidths and speed limit queues corresponding to the first channel 401, the second channel 402 and the third channel 403, and generates a memory pointer pointing to the speed limit memory configuration data of node 1.
[0094] In the firewall device, after receiving the speed limit memory configuration data, the target node synchronizes the generated memory pointer to the non-target node, so that the non-target node can obtain the speed limit memory configuration data in the target node.
[0095] Exemplarily, with node 1 as the target node, a memory pointer may be generated according to the speed limit memory configuration data of node 1 , and the memory pointer may be sent to node 2 , node 3 and the fourth node 103 .
[0096] Step S300: Obtain a message to be processed, and send the message to be processed to the first node.
[0097] In some embodiments, the firewall system obtains the message to be processed and sends the message to be processed to the first node for processing based on the load balancing function.
[0098] Exemplarily, taking node 2 as the first node, the to-be-processed message acquired by the firewall system is sent to node 2 for processing.
[0099] Step S400: If the first node is a non-target node, the speed limit memory configuration data of the target node is obtained according to the memory pointer.
[0100] In some embodiments, obtaining the speed limit memory configuration data of the target node according to the memory pointer includes: querying the speed limit memory configuration data of the target node according to the memory pointer, and sending the speed limit memory configuration data of the target node to the non-target node.
[0101] Exemplarily, node 1 is the target node, node 2, node 3 and node 4 are non-target nodes, and node 2 is the first node. Since the first node (node 2) is a non-target node, the QoS module in node 2 is not initialized and does not include the speed limit memory configuration data. Therefore, when the message to be processed is sent to node 2 for processing, node 2 first queries the speed limit memory configuration data of the target node (node 1) according to the memory pointer, wherein the speed limit memory configuration data includes the first channel 401, the second channel 402 and the third channel 403, as well as the corresponding matching strategy, speed limit bandwidth and speed limit queue. Secondly, the speed limit memory configuration data of node 1 queried is sent to node 2.
[0102] Step S500: Match the message to be processed according to the speed limit memory configuration data to obtain the processing channel corresponding to the message to be processed.
[0103] In some embodiments, after the first node obtains the speed limit memory configuration data, the to-be-processed message sent to the first node is matched according to the speed limit memory configuration data to obtain a processing channel corresponding to the to-be-processed message.
[0104] Exemplarily, node 2 is the first node, node 1 is the target node, node 2 is the non-target node, and the message to be processed is a data message with a source IP address of 10.10.10.10, which is sent to node 2. Node 2 obtains the speed limit memory configuration data from node 1 according to the memory pointer. According to the speed limit memory configuration data, the processing channel matched by the data message with a source IP address of 10.10.10.10 is the first channel 401, and the speed limit bandwidth of the first channel 401 is 10M. That is, the processing channel matched by the message to be processed is the first channel 401, and the speed limit is 10M.
[0105] Step S600: Send the message to be processed to the rate-limited queue in the processing channel corresponding to the message to be processed.
[0106] In some embodiments, each processing channel in the speed limit memory configuration data includes a speed limit queue. When the processing channel corresponding to the message to be processed is obtained, the message to be processed is sent to the speed limit queue in the processing channel for speed limiting.
[0107] Exemplarily, take node 2 as the first node, such as Figure 5 As shown, the pending message 502 with a source IP address of 10.10.10.10 is sent to node 2 through the first interface 501. The processing channel matched by the pending message 502 in node 2 is the first channel 401, and the speed limit bandwidth of the first channel 401 is 10M. Then, the pending message 502 is sent along the direction of arrow 503 to the speed limit queue 404 in the first channel 401 for speed limit, and the speed limit is 10M.
[0108] In some embodiments, after executing step S300, if the first node is the target node and speed limit memory configuration data already exists in the target node, the message to be processed is matched directly according to the speed limit memory configuration data in the target node to obtain the processing channel corresponding to the message to be processed, and the message to be processed is sent to the speed limit queue in the processing channel corresponding to the message to be processed.
[0109] For example, node 1 is the first node and node 1 is the target node. The data traffic of the P2P software is sent to node 1. The processing channel matched by the data traffic of the P2P software according to the speed limit memory configuration data in node 1 is the second channel 402. The speed limit bandwidth of the second channel 402 is 50M. Then, the data traffic of the P2P software is sent to the speed limit queue 405 in the second channel 402 for speed limit, and the speed limit is 50M.
[0110] It is understandable that the speed limit memory configuration data used by the pending messages sent to node 1 and the pending messages sent to node 2 are both the speed limit memory configuration data of the target node. That is, multiple nodes in the firewall system share the speed limit memory configuration data to achieve the overall speed limit across nodes of the firewall system.
[0111] Exemplarily, the flow data with a source IP address of 10.10.10.10 is sent to nodes 1, 2, 3 and 4 of the firewall system, that is, nodes 1, 2, 3 and 4 all need to process the flow data with a source IP address of 10.10.10.10. The firewall system requires a speed limit of 10M for the flow data with a source IP address of 10.10.10.10, wherein the flow data with a source IP address of 10.10.10.10 is distributed at 2M on node 1, 3M on node 2, 2M on node 3 and 3M on node 4. By adopting the multi-node speed limit method, different nodes can match the flow data with a source IP address of 10.10.10.10 according to the same speed limit memory configuration data, so that the overall speed limit can be achieved according to the distribution of the flow data with a source IP address of 10.10.10.10 on each node, so that the speed limit reaches 10M.
[0112] In some embodiments, the speed limit process for the message to be processed includes sending the message to be processed to the speed limit queue and taking the message to be processed out of the speed limit queue for subsequent processing. It should be noted that in a multi-node firewall system, multiple nodes share a set of speed limit memory configuration data, and the messages to be processed received by different nodes are all sent to the speed limit queue of the speed limit memory configuration data of the target node. Therefore, when taking out the message to be processed, each node performs a take-out operation from the speed limit queue of the speed limit memory configuration data of the target node. For the same message to be processed, the first node that sends the message to be processed to the speed limit queue and the second node that takes the message to be processed out of the speed limit queue may be different. If the first node and the second node are different, the second node cannot perform subsequent processing on the message to be processed. Therefore, after sending the message to be processed to the first node, it is also necessary to obtain the node number of the first node, set the node number to the first number, and store the node number in the data packet of the message to be processed.
[0113] For example, Figure 5 As shown, node 2 is taken as the first node, and the message to be processed 502 is sent to the speed limit queue 404 of the first channel 401 via node 2. Then the node number of node 2 is obtained as 2, the node number 2 is set as the first number, and the node number 2 is stored in the data packet of the message to be processed 502, so that the source node of the message to be processed 502 is stored as node 2.
[0114] In some embodiments, Figure 6 As shown, in the process of taking out the to-be-processed message from the rate-limiting queue, steps S601 to S604 need to be executed.
[0115] Step S601: Control the second node to obtain a message to be processed from a rate-limited queue.
[0116] Exemplarily, taking node 2 as the second node, node 2 is controlled to obtain the to-be-processed message from the rate-limiting queue 404 of the first channel 401 .
[0117] Step S602: Detect whether the message to be processed is processable according to the speed limit bandwidth of the processing channel corresponding to the message to be processed.
[0118] Exemplarily, for a to-be-processed message with a speed limit of 10M, when the speed limit bandwidth is 10M, the speed does not exceed the set speed limit, and the processing status of the to-be-processed message is a processable status.
[0119] For example, for a to-be-processed message with a speed limit of 10M, when the speed limit bandwidth is 12M, the speed exceeds the set speed limit, and the processing status of the to-be-processed message is an unprocessable status.
[0120] Step S603: If the processing status of the message to be processed is a processable status, obtain the data packet of the message to be processed.
[0121] Exemplarily, for a message to be processed with a speed limit of 10M and a speed limit bandwidth of 10M, a data packet of the message to be processed is obtained.
[0122] Step S604: If the processing status of the message to be processed is an unprocessable status, the message to be processed is deleted.
[0123] Exemplarily, for a to-be-processed message with a speed limit of 10M and a speed limit bandwidth of 12M, the to-be-processed message is deleted and is no longer processed.
[0124] In some embodiments, Figure 7 As shown, when the second node takes the to-be-processed message out of the rate-limiting queue and determines that the processing status of the to-be-processed message is a processable status, step S701 to step S705 are further executed.
[0125] Step S701: Obtain the node number in the data packet.
[0126] Exemplarily, take node 2 as the first node, and obtain the node number 2 in the data packet.
[0127] Step S702: Obtain the node label of the second node, and mark the node label as the second label.
[0128] Exemplarily, if node 2 is the second node, the node number of the second node is 2, and the node number 2 is marked as the second number.
[0129] Exemplarily, if node 3 is the second node, the node number of the second node is 3, and the node number 3 is marked as the second number.
[0130] Step S703: Compare the first label with the second label.
[0131] Exemplarily, if node 2 is used as the first node and the second node at the same time, the first number and the second number are both 2, and the first number is the same as the second number.
[0132] Exemplarily, taking node 2 as the first node and node 3 as the second node, the first label is 2 and the second label is 3, and the first label is different from the second label.
[0133] Step S704: If the first label is the same as the second label, the message to be processed is retained at the second node.
[0134] For example, node 2 is used as the first node and the second node, and the first number and the second number are the same. Then the subsequent processing of the message 502 to be processed is as follows: Figure 8 As shown: Node 2 takes the message 502 to be processed from the rate limit queue 404 of the first channel 401 , and sends it out from the firewall system via the second interface 801 along the direction of arrow 802 .
[0135] Step S705: If the first label is different from the second label, the message to be processed is sent to the first node: first, the first node corresponding to the first label is obtained according to the first label; second, the message to be processed is sent to the transmission channel of the first node; finally, the first node is controlled to obtain the message to be processed from the transmission channel.
[0136] For example, node 2 is used as the first node, node 3 is used as the second node, and the first number and the second number are different. Then the subsequent processing of the message 502 to be processed is as follows: Fig. 9 As shown: Node 3 takes the to-be-processed message 502 out of the speed limit queue 404 of the first channel 401, sends it to node 2 along the direction of arrow 901 through the transmission channel 902 between nodes 2 and 3; and then sends it out from the firewall system along the direction of arrow 903 through the second interface 801.
[0137] Corresponding to the above-mentioned multi-node speed limiting method embodiment, some embodiments of the present application also provide a multi-node speed limiting device, which is applied to a non-uniform memory access architecture system. Fig.10 As shown, the device comprises:
[0138] The target node configuration module 1001 is configured to: send speed limit memory configuration data to the target node; wherein the target node is one of multiple nodes in the non-consistent memory access architecture system; the speed limit memory configuration data is used to set the processing channel of the target node, and the processing channel includes a speed limit queue.
[0139] The memory pointer synchronization module 1002 is configured to: synchronize the memory pointer of the target node to the non-target node in the non-uniform memory access architecture system; wherein the memory pointer is used to obtain the speed limit memory configuration data of the target node.
[0140] The message acquisition module 1003 is configured to: acquire the message to be processed, and send the message to be processed to the first node.
[0141] The speed limit memory configuration data acquisition module 1004 is configured to: if the first node is a non-target node, acquire the speed limit memory configuration data of the target node according to the memory pointer.
[0142] The processing channel matching module 1005 is configured to match the message to be processed according to the rate limit memory configuration data to obtain the processing channel corresponding to the message to be processed.
[0143] The message sending module 1006 is configured to send the message to be processed to the rate-limited queue in the processing channel corresponding to the message to be processed.
[0144] It can be seen from the above technical scheme that the present application provides a multi-node speed limiting method, device and electronic device, the method comprising: sending speed limiting memory configuration data to a target node; wherein the target node is one of multiple nodes of a non-consistent memory access architecture system; the speed limiting memory configuration data is used to set a processing channel of the target node, and the processing channel includes a speed limiting queue; synchronizing the memory pointer of the target node to a non-target node in the non-consistent memory access architecture system; wherein the memory pointer is used to obtain the speed limiting memory configuration data of the target node; obtaining a message to be processed, and sending the message to be processed to a first node; if the first node is a non-target node, obtaining the speed limiting memory configuration data of the target node according to the memory pointer; matching the message to be processed according to the speed limiting memory configuration data to obtain the processing channel corresponding to the message to be processed; sending the message to be processed to the speed limiting queue in the processing channel corresponding to the message to be processed.
[0145] The method sends speed limit memory configuration data to the target node, and synchronizes the speed limit memory configuration data of the target node to the non-target node through the memory pointer, so that the nodes in the non-consistent memory access architecture system use the same speed limit memory configuration data, thereby realizing the overall speed limit of the system across nodes.
[0146] Similar parts between the embodiments provided in this application can be referenced to each other. The specific implementation methods provided above are only a few examples under the general concept of this application and do not constitute a limitation on the protection scope of this application. For those skilled in the art, any other implementation methods expanded based on the scheme of this application without creative work belong to the protection scope of this application.
Claims
1. A multi-node speed limiting method, characterized in that: Applied to a non-uniform memory access architecture system, the non-uniform memory access architecture system includes a plurality of nodes, and the method includes: Sending speed-limited memory configuration data to a target node; wherein the target node is one of a plurality of nodes of the non-uniform memory access architecture system; the speed-limited memory configuration data is used to set a processing channel of the target node, and the processing channel includes a speed-limited queue; Synchronize the memory pointer of the target node to the non-target node in the non-consistent memory access architecture system; wherein the memory pointer is used to obtain the speed limit memory configuration data of the target node; Obtaining a message to be processed, and sending the message to be processed to the first node; If the first node is the non-target node, obtaining the speed limit memory configuration data of the target node according to the memory pointer; Matching the message to be processed according to the speed limit memory configuration data to obtain a processing channel corresponding to the message to be processed; The message to be processed is sent to a rate-limited queue in a processing channel corresponding to the message to be processed.
2. The multi-node speed limiting method according to claim 1, characterized in that: The method further comprises: If the first node is the target node, matching the message to be processed according to the rate limit memory configuration data to obtain a processing channel corresponding to the message to be processed; The message to be processed is sent to a rate-limited queue in a processing channel corresponding to the message to be processed.
3. The multi-node speed limiting method according to claim 1, characterized in that: After obtaining the message to be processed and sending the message to be processed to the first node, the method further includes: Obtaining the node number of the first node; The node label is set as a first label, and the node label is stored in a data packet of the message to be processed.
4. The multi-node speed limiting method according to claim 3, characterized in that: The processing channel also includes a speed-limiting bandwidth, and the method further includes: Controlling the second node to obtain the to-be-processed message from the rate-limiting queue; According to the speed limit bandwidth of the processing channel corresponding to the message to be processed, detecting the processing state of the message to be processed, the processing state being a processable state or an unprocessable state; If the processing status of the message to be processed is a processable status, obtaining a data packet of the message to be processed; If the processing status of the message to be processed is an unprocessable status, the message to be processed is deleted.
5. The multi-node speed limiting method according to claim 4, characterized in that: After obtaining the data packet of the message to be processed, the method further includes: Obtaining the node number in the data packet; Obtaining a node number of the second node, and marking the node number as a second number; comparing the first label with the second label; If the first label is the same as the second label, retaining the to-be-processed message at the second node; If the first number is different from the second number, the message to be processed is sent to the first node.
6. The multi-node speed limiting method according to claim 5, characterized in that: If the first label is different from the second label, the method further includes: Acquire a first node corresponding to the first number according to the first number; Sending the message to be processed to the transmission channel of the first node; Control the first node to obtain the message to be processed from the transmission channel.
7. The multi-node speed limiting method according to claim 1, characterized in that: The acquiring the speed limit memory configuration data of the target node according to the memory pointer includes: Querying the speed limit memory configuration data of the target node according to the memory pointer; The speed limit memory configuration data of the target node is sent to the non-target node.
8. The multi-node speed limiting method according to claim 1, characterized in that: The sending of the speed limit memory configuration data to the target node includes: Allocating a processing channel to the target node; Setting a matching strategy and a speed limit bandwidth of the processing channel; wherein the matching strategy is a correspondence between the type of the message to be processed and the processing channel; The properties of the speed limit queue corresponding to the processing channel are set; wherein the properties of the speed limit queue are the length and management policy of the speed limit queue.
9. A multi-node speed limiting device, characterized in that: Applied to a non-uniform memory access architecture system, the non-uniform memory access architecture system includes a plurality of nodes, and the device includes: The target node configuration module is configured to: send speed limit memory configuration data to the target node; wherein the target node is one of the multiple nodes of the non-uniform memory access architecture system; the speed limit memory configuration data is used to set a processing channel of the target node, and the processing channel includes a speed limit queue; A memory pointer synchronization module is configured to: synchronize the memory pointer of the target node to the non-target node in the non-consistent memory access architecture system; wherein the memory pointer is used to obtain the speed limit memory configuration data of the target node; The message acquisition module is configured to: acquire the message to be processed, and send the message to be processed to the first node; The speed limit memory configuration data acquisition module is configured to: if the first node is the non-target node, acquire the speed limit memory configuration data of the target node according to the memory pointer; A processing channel matching module is configured to: match the message to be processed according to the speed limit memory configuration data to obtain a processing channel corresponding to the message to be processed; The message sending module is configured to: send the message to be processed to the rate-limited queue in the processing channel corresponding to the message to be processed.
10. An electronic device, characterized in that: include: one or more processors; a memory configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the multi-node rate limiting method according to any one of claims 1-8.
