VPC network IP resource dynamic allocation method and system

By introducing a preheating mechanism and IP resource pool in the container network, the problem of IP allocation delay when a large number of Pods are launched at the same time is solved, fast response and efficient resource utilization are achieved, and system performance and stability are improved.

CN119892793APending Publication Date: 2025-04-25UNICLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411742769.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In container networks, when a large number of Pods are online at the same time, a large number of concurrent requests will be generated to the network interface, resulting in slow response of the network interface, and the pods cannot be allocated to the IP in time, and even network services will crash, affecting use.

Method used

Scan the warm-up status and IP resource pool of the VPC network through timed tasks, apply for and reserve IP resources in advance, form an IP resource pool, and use the IP in the resource pool first when applying for IP for Pods and recycle them. When the resource pool is exhausted, call the network interface to apply for a new IP.

Benefits of technology

Through the design of the preheating mechanism and IP resource pool, the system's response capabilities are significantly improved, the IP allocation delay is reduced, and the system can quickly respond to sudden large-scale Pod deployment needs, optimize resource utilization efficiency and reduce operation and maintenance overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892793A_ABST
    Figure CN119892793A_ABST
Patent Text Reader

Abstract

The invention discloses a VPC network IP resource dynamic allocation method and system, and the method comprises the steps: carrying out the scanning of a timed task, checking whether a VPC network starts preheating or not, and detecting the number of IPs for preheating and the water level; when it is detected that a VPC network starts preheating, calling a network interface, applying for an ip with the highest water level number, and storing the ip in an ip resource pool for use; when Pods larger than a first threshold value apply for the ip at the same time, the applied ip in the ip resource pool is used for allocation, and when the ip in the resource pool is used up, a network interface is called to apply for the ip; and when the Pod greater than the first threshold value releases the ip at the same time, releasing the ip into the ip pool for recycling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of container networks, and in particular to a method and system for dynamically allocating VPC network IP resources. Background Art

[0002] Container networking refers to the mechanism that provides internal network functions on containerized platforms such as Docker and Kubernetes to enable containers to communicate with other containers and the host. Container networking enables multiple containers to access each other and interact with external systems through the network.

[0003] In a container network, each container is assigned an IP address and is in the same virtual network. Kubernetes is a portable, extensible, open source container orchestration platform for managing containerized workloads and services. It supports automated deployment, large-scale scalability, and application containerization management. The Docker container network is a network used for container communication in Docker applications, which is automatically created and managed by the Docker engine. Docker supports multiple network drivers, including the default bridge network and host network, custom networks, and third-party network plug-ins, to provide better communication and management between containers. Pod is a concept abstracted by Kubernetes, representing a group of application containers (such as Docker), and some shared resources of these containers (such as networks). It is the smallest deployable computing unit that can be created and managed in Kubernetes.

[0004] In the existing technical solution, each time a Pod is created, a network interface is called to allocate an IP address to the current Pod; when multiple Pods are created at the same time, network interfaces are requested concurrently.

[0005] In the existing technical solutions, when a large number of Pods are online at the same time, a large number of concurrent requests will be generated to the network interface, which will cause the network interface to respond slowly and the Pod will not be able to be allocated an IP in time; when the number of Pods created is large enough, the network service will crash, resulting in the Pod being unable to be allocated an IP, affecting usage. Summary of the invention

[0006] To achieve the above-mentioned purpose and other related purposes, the present invention discloses a method for dynamically allocating IP resources in a VPC network, which is characterized by comprising: Scheduled tasks are used to scan and check whether VPC networks are preheated, and the number and water level of preheated IPs are detected; When it is detected that a VPC network is preheated, the network interface is called to apply for the highest number of IPs, which are stored in the IP resource pool and wait for use; When there are Pods with a number greater than the first threshold applying for IPs at the same time, the IPs already applied for in the IP resource pool are used for allocation. When the IPs in the resource pool are exhausted, the network interface is called to apply for IPs. When there are Pods with a number greater than the first threshold releasing IPs at the same time, the IPs are released to the IP pool for recycling.

[0007] Furthermore, it also includes: The scheduled task scans the number of IPs in the resource pool; when the number of IPs in the IP resource pool is higher than the maximum water level, the network interface is called to release the excess IPs; when the number of IPs in the IP resource pool is lower than the minimum water level, the network interface is called to apply for the insufficient IPs.

[0008] Furthermore, the maximum water level number includes: Max_Waterline=Peak×exp(Load_Gradient)×(1+Volatility_Index); Where Peak: historical peak usage, Load_Gradient: load change rate, which indicates the speed of load change per unit time, Volatility_Index: volatility index, ranging from 0-1, reflecting the instability of the system.

[0009] Furthermore, the minimum water level quantity includes: Min_Waterline=Base_Load×(1+sin(t / T))×√(Usage_Variance); Among them, Base_Load: basic load value, indicating the average IP usage of the system in a stable state, t: current time point, used to calculate periodic changes, T: observation period, Usage_Variance: usage variability, reflecting the degree of fluctuation of IP usage.

[0010] Furthermore, the method further comprises: The IP pool is divided into three levels, including: Hot pool: available in real time, no additional operation required; Warm pool: pre-application but requires simple initialization; Cold pool: IP that has been released but can be quickly recycled; When an IP pool needs to be used, the priority is: hot pool > warm pool > cold pool.

[0011] On the other hand, the present invention provides a VPC network IP resource dynamic allocation system, including: The monitoring module is used to perform scheduled tasks to scan, check whether the VPC network has been preheated, and detect the number and water level of preheated IPs; The network interface calling module is used to call the network interface when it detects that the VPC network is preheated, apply for the highest watermark number of IPs, and store them in the IP resource pool for use; The allocation module is used to allocate the IPs that have been applied for in the IP resource pool when there are Pods with a number greater than the first threshold applying for IPs at the same time. When the IPs in the resource pool are exhausted, the network interface is called to apply for IPs. When there are Pods with a number greater than the first threshold releasing IPs at the same time, the IPs are released to the IP pool for recycling.

[0012] By adopting the above technical solutions, the system responsiveness is significantly improved through the preheating mechanism. Through timed scanning and pre-judgment, the system can perceive the IP requirements of the VPC network in advance and complete the application and reserve of IP resources in advance. This forward-looking resource scheduling strategy effectively reduces the delay of IP allocation, allowing the system to quickly respond to sudden large-scale Pod deployment needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, among which:

[0014] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0015] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0016] Reference Figure 1 The embodiment of the present invention provides a method for dynamically allocating IP resources in a VPC network, comprising the following steps: Scheduled tasks are used to scan and check whether VPC networks are preheated, and the number and water level of preheated IPs are detected; When it is detected that a VPC network is preheated, the network interface is called to apply for the highest number of IPs, which are stored in the IP resource pool and wait for use; When there are Pods with a number greater than the first threshold applying for IPs at the same time, the IPs already applied for in the IP resource pool are used for allocation. When the IPs in the resource pool are exhausted, the network interface is called to apply for IPs. When there are Pods with a number greater than the first threshold releasing IPs at the same time, the IPs are released to the IP pool for recycling.

[0017] The scheduled task scans the number of IPs in the resource pool; when the number of IPs in the IP resource pool is higher than the maximum water level, the network interface is called to release the excess IPs; when the number of IPs in the IP resource pool is lower than the minimum water level, the network interface is called to apply for the insufficient IPs.

[0018] The maximum water level numbers include: Max_Waterline=Peak×exp(Load_Gradient)×(1+Volatility_Index); Where Peak: historical peak usage, Load_Gradient: load change rate, which indicates the speed of load change per unit time, Volatility_Index: volatility index, ranging from 0-1, reflecting the instability of the system.

[0019] The minimum water level numbers include: Min_Waterline=Base_Load×(1+sin(t / T))×√(Usage_Variance); Among them, Base_Load: basic load value, indicating the average IP usage of the system in a stable state, t: current time point, used to calculate periodic changes, T: observation period, Usage_Variance: usage variability, reflecting the degree of fluctuation of IP usage.

[0020] Use an intelligent timed scanning mechanism to continuously monitor the preheating status and resource water level of the VPC network. The monitoring program will regularly check the activation status of the network preheating, accurately count the number of currently preheated IPs, and compare it with the preset water level in real time.

[0021] When the system detects the VPC network start warm-up instruction, it will immediately trigger the intelligent pre-allocation mechanism. This mechanism will automatically calculate the required number of IP addresses based on the highest watermark algorithm and apply for them in batches through the network interface. These pre-allocated IP addresses will be stored in a specially designed resource pool to respond to business needs at any time.

[0022] In actual operation, the system uses a threshold trigger mechanism to handle concurrent requests. When more than the first threshold number of Pod requests for IPs appear at the same time, the system will prioritize quickly allocating IP addresses from the pre-allocated resource pool to ensure a quick response to the request. If the IPs in the resource pool are exhausted, the system will automatically trigger the replenishment mechanism and apply for new IP resources in real time through the network interface. Similarly, when there are large-scale IP release requests, the system will re-incorporate these IPs into the resource pool to achieve resource recycling.

[0023] The resource pool status is scanned regularly, and the number of IPs in the pool is adjusted through intelligent algorithms. When the number of IPs exceeds the highest watermark, the system will automatically release excess resources; when the number is lower than the lowest watermark, the required IP resources will be actively supplemented.

[0024] The calculation of the highest water level adopts an innovative dynamic prediction model: Max_Waterline=Peak×exp(Load_Gradient)×(1+Volatility_Index). Peak reflects the historical peak usage, Load_Gradient represents the load change rate, and Volatility_Index quantifies the degree of system fluctuation, with a value range of 0 to 1.

[0025] The minimum water level is determined by an algorithm that takes periodic fluctuations into account: Min_Waterline=Base_Load×(1+sin(t / T))×√(Usage_Variance). Base_Load represents the basic load level of the system, and the time periodic variation is introduced through trigonometric functions. Usage_Variance reflects the discrete degree of usage.

[0026] The method further comprises: The IP pool is divided into three levels, including: Hot pool: available in real time, no additional operation required; Warm pool: pre-application but requires simple initialization; Cold pool: IP that has been released but can be quickly recycled; When you need to use an IP pool, the priority is: hot pool > warm pool > cold pool.

[0027] As mentioned above, the present invention introduces a three-level pooling management mechanism. IPs in the hot pool can be used immediately; IPs in the warm pool need to be simply initialized before they can be used; and the cold pool stores IP resources that can be quickly recycled. When allocating IPs, the system will schedule them according to the priority order of the hot pool, warm pool, and cold pool, thereby maximizing resource utilization efficiency.

[0028] By adopting the above technical solution, first of all, the solution significantly improves the system response capability through the preheating mechanism. Through timed scanning and pre-judgment, the system can perceive the IP demand of the VPC network in advance and complete the application and reserve of IP resources in advance. This forward-looking resource scheduling strategy effectively reduces the delay of IP allocation, allowing the system to quickly respond to sudden large-scale Pod deployment needs.

[0029] Secondly, the IP resource pool mechanism designed in this solution greatly optimizes resource utilization efficiency. By establishing an IP resource pool, the system realizes the caching and reuse of IP addresses, avoiding frequent requests and releases of IP resources from the network interface. This approach not only reduces the call pressure of the network interface, but also significantly reduces the system's operation and maintenance costs and improves overall performance.

[0030] Thirdly, the threshold trigger mechanism adopted by this solution effectively solves the resource competition problem in concurrent scenarios. When a large number of Pods apply for or release IPs at the same time, the system can intelligently schedule resources, which not only ensures the fairness of resource allocation, but also avoids resource waste and unnecessary resource competition, thus improving the stability of the system.

[0031] In addition, the IP resource recycling mechanism implemented in this solution significantly improves resource utilization efficiency. By re-incorporating released IPs into the resource pool for reuse, the system significantly reduces the waste of IP resources, while also reducing the system overhead caused by frequent application for new IPs, thus achieving sustainable resource utilization.

[0032] Finally, the solution has strong adaptability and scalability. The system can dynamically adjust the application and release strategies of IP resources according to the actual business load, effectively responding to changes in business needs of various sizes. This flexible design enables the system to easily cope with the rapid growth of business scale and sudden resource demands.

[0033] In general, the present invention realizes efficient management of IP resources in the VPC network environment through innovative technical design, significantly improves system performance, reduces operation and maintenance costs, and provides reliable network resource guarantee for large-scale containerized application deployment.

[0034] An embodiment of the present invention further provides a system, comprising: The monitoring module is used to perform scheduled tasks to scan, check whether the VPC network has been preheated, and detect the number and water level of preheated IPs; The network interface calling module is used to call the network interface when it detects that the VPC network is preheated, apply for the highest watermark number of IPs, and store them in the IP resource pool for use; The allocation module is used to allocate the IPs that have been applied for in the IP resource pool when there are Pods with a number greater than the first threshold applying for IPs at the same time. When the IPs in the resource pool are exhausted, the network interface is called to apply for IPs. When there are Pods with a number greater than the first threshold releasing IPs at the same time, the IPs are released to the IP pool for recycling.

[0035] Those skilled in the art will appreciate that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined.

[0036] For the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Secondly, 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 the embodiments of the present invention.

[0037] It can be known from the description of the above implementation modes that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute the methods described in the various implementation modes of the present application or certain parts of the implementation modes.

[0038] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for dynamically allocating VPC network IP resources, characterized in that: include: Scheduled tasks are used to scan and check whether VPC networks are preheated, and the number and water level of preheated IPs are detected; When it is detected that a VPC network is preheated, the network interface is called to apply for the highest number of IPs, which are stored in the IP resource pool and wait for use; When there are Pods with a number greater than the first threshold applying for IPs at the same time, the IPs already applied for in the IP resource pool are used for allocation. When the IPs in the resource pool are exhausted, the network interface is called to apply for IPs. When there are Pods with a number greater than the first threshold releasing IPs at the same time, the IPs are released to the IP pool for recycling.

2. The method according to claim 1, characterized in that Also includes: The scheduled task scans the number of IPs in the resource pool; when the number of IPs in the IP resource pool is higher than the maximum water level, the network interface is called to release the excess IPs; when the number of IPs in the IP resource pool is lower than the minimum water level, the network interface is called to apply for the insufficient IPs.

3. The method according to claim 2, characterized in that The maximum water level numbers include: Max_Waterline=Peak×exp(Load_Gradient)×(1+Volatility_Index); Where Peak: historical peak usage, Load_Gradient: load change rate, which indicates the speed of load change per unit time, Volatility_Index: volatility index, ranging from 0-1, reflecting the instability of the system.

4. The method according to claim 2, characterized in that: The minimum water level numbers include: Min_Waterline=Base_Load×(1+sin(t / T))×√(Usage_Variance); Among them, Base_Load: basic load value, indicating the average IP usage of the system in a stable state, t: current time point, used to calculate periodic changes, T: observation period, Usage_Variance: usage variability, reflecting the degree of fluctuation of IP usage.

5. The method according to claim 1, characterized in that The method further comprises: The IP pool is divided into three levels, including: Hot pool: available in real time, no additional operation required; Warm pool: pre-application but requires simple initialization; Cold pool: IP that has been released but can be quickly recycled; When an IP pool needs to be used, the priority is: hot pool > warm pool > cold pool.

6. A VPC network IP resource dynamic allocation system, characterized in that: include: The monitoring module is used to perform scheduled tasks to scan, check whether the VPC network has been preheated, and detect the number and water level of preheated IPs; The network interface calling module is used to call the network interface when it detects that the VPC network is preheated, apply for the highest watermark number of IPs, and store them in the IP resource pool for use; The allocation module is used to allocate the IPs that have been applied for in the IP resource pool when there are Pods with a number greater than the first threshold applying for IPs at the same time. When the IPs in the resource pool are exhausted, the network interface is called to apply for IPs. When there are Pods with a number greater than the first threshold releasing IPs at the same time, the IPs are released to the IP pool for recycling.