Systematic optimization method and terminal
By monitoring and selecting release nodes with sufficient bandwidth for release operations, and caching subsequent tasks, the system resolves the lag and latency issues caused by bandwidth consumption in microservice architectures, thereby improving the efficiency and accuracy of system releases.
Patent Information
- Application Number
- CN202410400533.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-03
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2044-04-03
AI Technical Summary
In a microservice architecture, bandwidth consumption-related issues during deployment, such as lag and latency, increase deployment costs.
By monitoring the bandwidth utilization of each publishing node in the system, nodes with bandwidth utilization below a preset threshold are selected for publishing operations, and subsequent tasks are cached in the task queue until the bandwidth utilization of all nodes is greater than or equal to the preset threshold, thus avoiding lag or delay caused by bandwidth exceeding the limit of a single node.
It improved the overall efficiency of system deployment, avoided delays and lags in the deployment process, optimized resource usage and task allocation, and ensured the timely execution of important tasks.
Smart Images

Figure CN118400435B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing, and in particular to an optimization method and terminal for system deployment. Background Technology
[0002] In modern internet systems, to achieve high concurrency and high throughput, a microservice architecture is typically used for server-side development, operation, and deployment. Because a microservice architecture involves a large number of instances for each microservice, each deployment process involves packaging and testing. Once testing is successful, the deployment and upgrade operations for each production microservice instance begin.
[0003] However, the deployment process requires the machines hosting the target devices to fetch the deployment package from the deployment system. When a large number of target devices are being upgraded, the requests can instantly saturate the deployment system's bandwidth. This can cause delays or prevent subsequent deployments from proceeding. Only after the existing deployment processes have finished fetching their packages can subsequent operations be performed. This kind of instantaneous scenario often leads to deployment pauses or delays, increasing deployment costs. Summary of the Invention
[0004] The technical problem to be solved by this invention is to provide an optimization method and terminal for system deployment, thereby solving the problem of lag during the deployment process.
[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0006] An optimization method for system deployment includes the following steps:
[0007] S1. Monitor the bandwidth utilization of each publishing node in the monitoring system and filter out publishing nodes with bandwidth utilization less than a preset threshold;
[0008] S2. Use the selected publishing nodes to perform publishing operations until the bandwidth utilization rate of all publishing nodes is greater than or equal to the preset threshold.
[0009] S3. Cache subsequent release tasks to the task queue and wait for release.
[0010] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows:
[0011] An optimized terminal for system deployment includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps:
[0012] S1. Monitor the bandwidth utilization of each publishing node in the monitoring system and filter out publishing nodes with bandwidth utilization less than a preset threshold;
[0013] S2. Use the selected publishing nodes to perform publishing operations until the bandwidth utilization rate of all publishing nodes is greater than or equal to the preset threshold.
[0014] S3. Cache subsequent release tasks to the task queue and wait for release.
[0015] The beneficial effects of this invention are as follows: It provides an optimization method and terminal for system publishing, which monitors the bandwidth utilization of each publishing node in the publishing system and filters out publishing nodes with sufficient bandwidth (i.e., publishing nodes with bandwidth utilization less than a preset threshold). The publishing operation is performed using the filtered publishing nodes without waiting until all publishing nodes are in a busy state (i.e., bandwidth utilization greater than or equal to the preset threshold). At this time, subsequent publishing tasks are added to the execution queue, avoiding the phenomenon of process lag or delay caused by the bandwidth utilization of a certain publishing node exceeding the limit, thereby improving the overall publishing efficiency. Attached Figure Description
[0016] Figure 1 This is a flowchart of an optimization method for system deployment in an embodiment of the present invention;
[0017] Figure 2 This is a schematic diagram of an optimized terminal released by a system according to an embodiment of the present invention;
[0018] Label Explanation:
[0019] 1. An optimized terminal released by a system; 2. Memory; 3. Processor. Detailed Implementation
[0020] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.
[0021] Please refer to Figure 1 An optimization method for system deployment includes the following steps:
[0022] S1. Monitor the bandwidth utilization of each publishing node in the monitoring system and filter out publishing nodes with bandwidth utilization less than a preset threshold;
[0023] S2. Use the selected publishing nodes to perform publishing operations until the bandwidth utilization rate of all publishing nodes is greater than or equal to the preset threshold.
[0024] S3. Cache subsequent release tasks to the task queue and wait for release.
[0025] As can be seen from the above description, the beneficial effects of the present invention are as follows: by monitoring the bandwidth utilization of each publishing node in the publishing system and filtering out publishing nodes with sufficient bandwidth (i.e., publishing nodes with bandwidth utilization less than a preset threshold), publishing operations are performed using the filtered publishing nodes without waiting until all publishing nodes are in a busy state (i.e., bandwidth utilization greater than or equal to the preset threshold). At this time, subsequent publishing tasks are added to the execution queue, avoiding the phenomenon of process lag or delay caused by the bandwidth utilization of a certain publishing node exceeding the limit, thus improving the overall publishing efficiency.
[0026] In some embodiments of the present invention, step S3 further includes the step:
[0027] The tasks in the task queue are sorted according to a preset priority rule;
[0028] Step S3 is followed by step S4:
[0029] Each publishing node is accessed in a round-robin fashion. When the bandwidth utilization of a publishing node is less than a preset threshold, the higher-priority publishing task is pushed to that publishing node.
[0030] As can be seen from the above description, by sorting the release tasks according to preset rules, the timely execution of important tasks is ensured, and the efficiency and priority management of the release operation are improved. At the same time, the dynamic allocation of tasks based on bandwidth usage further optimizes resource utilization, improves the overall release efficiency of the system, and avoids the random allocation of backlogged tasks, which could lead to delays in the release process.
[0031] In some embodiments of the present invention, step S2 further includes the step:
[0032] The system cache records the publishing tasks executed by each publishing node in a unified manner;
[0033] Step S4 further includes the following steps:
[0034] Before pushing a high-priority publishing task to this publishing node, the system checks whether the publishing task already exists in the cache. If it does, the push is canceled and the task is deleted from the task queue.
[0035] As can be seen from the above description, by uniformly recording the tasks executed by each publishing node and checking them before pushing, the duplicate publishing of the same task is avoided, resources are saved and the accuracy of publishing operations is improved; at the same time, the use of caching technology reduces duplicate queries and erroneous publishing operations, thereby improving the system's operating efficiency.
[0036] In some embodiments of the present invention, the cached content is in key-value format, where the key is the ID of the object to which the publishing task is applied, and the value is the encoding of the execution status of the publishing operation.
[0037] As described above, caching is performed using a key-value format. The key is the ID of the object to which the task is being published, and the value is an encoding of the execution status of the published operation. The principle behind this is that, since published tasks target different operation objects, the relationship between the published tasks and their corresponding operation objects is recorded to avoid confusion. For example, suppose there are three operation objects running on three different machines, each with a unique ID:
[0038] Target 1: Instance ID is instance-001
[0039] Target 2: Instance ID is instance-002
[0040] Target 3: Instance ID is instance-003
[0041] To record whether these service instances have received the pull notification message, we can use the following cache content format (key, value format):
[0042] Key: instance-001, Value: 1
[0043] Key: instance-002, Value: 1
[0044] Key: instance-003, Value: 0
[0045] In this example:
[0046] The values of instance-001 and instance-002 are 1, indicating that these two objects have already been published on a node.
[0047] The value of instance-003 is 0, indicating that this target object has not yet been published on the node.
[0048] In some embodiments of the present invention, the preset threshold ranges from 70% to 80%.
[0049] As can be seen from the above description, the inventors found through testing that setting a bandwidth utilization threshold of 70%-80% can ensure that the publishing node has sufficient bandwidth resources for task processing, while reserving a certain amount of bandwidth margin to cope with emergencies, thus achieving a balance and efficiency in bandwidth usage.
[0050] Please refer to Figure 2 An optimized terminal for system release includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it completes the steps in the aforementioned optimized method for system release.
[0051] This invention provides an optimization method and terminal for system deployment, mainly used to solve the problems of system lag or excessive latency in deployment systems. The following is a detailed description with reference to specific embodiments:
[0052] Please refer to Figure 1 Embodiment 1 of the present invention is as follows:
[0053] An optimization method for system deployment includes the following steps:
[0054] S1. Monitor the bandwidth utilization of each publishing node in the monitoring system and filter out publishing nodes with bandwidth utilization less than a preset threshold, that is, filter out publishing nodes with sufficient bandwidth.
[0055] S2. Use the selected publishing nodes to perform publishing operations until the bandwidth utilization of all publishing nodes is greater than or equal to the preset threshold. Then, send the publishing task to the selected publishing nodes and process it directly without delay until all publishing nodes are busy.
[0056] S3. Cache subsequent release tasks to the task queue and wait for release to avoid pushing release tasks to the release node at the same time, which would cause the release node's bandwidth utilization to exceed the limit. Prioritize the smooth completion of the release tasks that are currently being executed.
[0057] Specifically, the preset threshold ranges from 70% to 80%, preferably 80%.
[0058] Embodiment 2 of the present invention is as follows:
[0059] Based on Embodiment 1, step S3 further includes the following step:
[0060] The tasks in the task queue are sorted according to a preset priority rule. By sorting the tasks according to the preset rule, the timely execution of important tasks is ensured, which improves the efficiency of the release operation and priority management.
[0061] Step S3 is followed by step S4:
[0062] Each publishing node is polled, and when the bandwidth utilization of a publishing node is less than a preset threshold, high-priority publishing tasks are pushed to that publishing node. Tasks are dynamically allocated based on bandwidth utilization, which further optimizes resource utilization, improves the overall publishing efficiency of the system, and avoids the random allocation of backlogged tasks, which can lead to delays in the publishing process.
[0063] Step S2 also includes the following steps:
[0064] The system cache records the publishing tasks executed by each publishing node in a unified manner;
[0065] Step S4 also includes the following steps:
[0066] Before pushing high-priority publishing tasks to this publishing node, check if the publishing task already exists in the cache. If it does, cancel the push and delete the task from the task queue.
[0067] By uniformly recording the tasks executed by each publishing node and checking them before pushing, the system avoids repeatedly publishing the same task, saves resources, and improves the accuracy of publishing operations. At the same time, caching technology reduces duplicate queries and erroneous publishing operations, improving the system's operating efficiency.
[0068] Embodiment 3 of the present invention is as follows: A system deployment optimization method is specifically applied as follows:
[0069] An automated deployment system exists, consisting of three main deployment nodes, each responsible for deploying a specific service. To avoid network congestion and latency during peak deployment periods, the following steps are implemented:
[0070] Step S1: Monitor the bandwidth of the publishing node
[0071] The system monitors the network bandwidth usage of each publishing node in real time through a centralized monitoring module.
[0072] When a node's bandwidth utilization is detected to be below 80%, that node is marked as available for new publishing operations.
[0073] Step S2: Execution of the publish operation
[0074] When the development team submits a new release request, the system first checks the bandwidth usage of all release nodes.
[0075] Suppose that at this point, the bandwidth utilization of nodes A and B is 70% and 85% respectively, while that of node C is 60%. The system will select nodes A and C to perform the new deployment operation.
[0076] Specifically, the release system will send a notification message to the machines that need to be upgraded. This notification message tells the machines that need to be upgraded that they can pull the upgrade package from nodes A and C first.
[0077] Step S3: Caching of subsequent task releases
[0078] If the bandwidth utilization of all publishing nodes reaches or exceeds 80%, the system adds new publishing requests to a pending task queue. Tasks in the queue are sorted according to a preset priority rule. The system periodically checks the bandwidth utilization of each publishing node. Once a node is found with its bandwidth utilization dropping below 80%, the system retrieves the highest priority task from the queue and assigns it to that node for execution.
[0079] In addition, before each publish operation begins, the system records detailed information about the operation in a centralized cache, including the target object ID of the publish task and the status of the publish operation.
[0080] When a new publish request is submitted, the system first checks if the task already exists in the cache. If it does, the system cancels duplicate pushes of the task and removes it from the queue.
[0081] Embodiment four of the present invention is as follows:
[0082] Please refer to Figure 2 An optimized terminal 1 for system deployment includes a memory 2, a processor 3, and a computer program stored on the memory 2 and executable on the processor 3. When the processor executes the computer program, it completes the steps in the optimization method for system deployment described above.
[0083] In summary, the system deployment optimization method and terminal provided by this invention monitors the bandwidth utilization of each deployment node in the deployment system and filters out deployment nodes with sufficient bandwidth (i.e., deployment nodes with bandwidth utilization less than a preset threshold). Deployment operations are performed using the filtered deployment nodes without waiting until all deployment nodes are in a busy state (i.e., bandwidth utilization greater than or equal to the preset threshold). At this point, subsequent deployment tasks are added to the execution queue, avoiding the phenomenon of process lag or delay caused by the bandwidth utilization of a certain deployment node exceeding the limit, thus improving the overall deployment efficiency.
[0084] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for system-wide optimization, characterized by: The method comprises the steps of: S1, monitoring bandwidth occupancy of each publishing node in the system and screening out publishing nodes with bandwidth occupancy less than a preset threshold; S2, performing publishing operation by using the screened publishing nodes until the bandwidth occupancy of all publishing nodes is greater than or equal to the preset threshold; uniformly recording publishing tasks executed by each publishing node in a cache of the system; S3, caching subsequent publishing tasks to a task queue and waiting for publishing; sorting publishing tasks in the task queue according to a preset priority rule; the step S3 further comprises a step S4: polling each publishing node, and when there is a publishing node with bandwidth occupancy less than the preset threshold, pushing a publishing task with high priority to the publishing node; before the publishing task with high priority is pushed to the publishing node, it is inquired whether the publishing task exists in the cache, and if so, the pushing is cancelled and the task is deleted from the task queue.
2. The method of claim 1, wherein: The content format of the cache is key value format, the key is an id of an action object of a publishing task, and the value is an encoding of an execution condition of a publishing operation.
3. The method of claim 1, wherein: The preset threshold ranges from 70% to 80%.
4. A system-issued optimized terminal, characterized by: The computer program stored in the memory and executable on the processor comprises the following steps: S1, monitoring bandwidth occupancy of each publishing node in the system and screening out publishing nodes with bandwidth occupancy less than a preset threshold; S2, performing publishing operation by using the screened publishing nodes until the bandwidth occupancy of all publishing nodes is greater than or equal to the preset threshold; uniformly recording publishing tasks executed by each publishing node in a cache of the system; S3, caching subsequent publishing tasks to a task queue and waiting for publishing; sorting publishing tasks in the task queue according to a preset priority rule; the step S3 further comprises a step S4: polling each publishing node, and when there is a publishing node with bandwidth occupancy less than the preset threshold, pushing a publishing task with high priority to the publishing node; before the publishing task with high priority is pushed to the publishing node, it is inquired whether the publishing task exists in the cache, and if so, the pushing is cancelled and the task is deleted from the task queue.
5. A system issued optimized terminal according to claim 4, characterized by: The content format of the cache is key value format, the key is an id of an action object of a publishing task, and the value is an encoding of an execution condition of a publishing operation.
6. The system issued optimized terminal of claim 4, wherein: The preset threshold ranges from 70% to 80%.
Citation Information
Patent Citations
Preemptive scheduling based resource sharing use method, system and
WO2020000944A1
Application upgrade method and computer device
WO2021135301A1