CN114745358A - IP address management method, system and controller in load balancing service - Google Patents

IP address management method, system and controller in load balancing service Download PDF

Info

Publication number
CN114745358A
CN114745358A CN202210295258.3A CN202210295258A CN114745358A CN 114745358 A CN114745358 A CN 114745358A CN 202210295258 A CN202210295258 A CN 202210295258A CN 114745358 A CN114745358 A CN 114745358A
Authority
CN
China
Prior art keywords
address
service information
service
load balancing
management center
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210295258.3A
Other languages
Chinese (zh)
Inventor
李寿景
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN202210295258.3A priority Critical patent/CN114745358A/en
Publication of CN114745358A publication Critical patent/CN114745358A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1031Controlling of the operation of servers by a load balancer, e.g. adding or removing servers that serve requests

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses an IP address management method, a system and a controller in load balancing service, wherein the method is applied to the controller of a distributed container management platform, and the method comprises the following steps: monitoring service information transmitted from a service interface, and initiating an IP address acquisition request to an IP management center component if the service information does not carry an IP address when judging that the service information represents and creates a load balancing service; receiving the IP address fed back by the IP address acquisition request, and distributing the IP address to the service information; when the change of the service information is monitored, whether the service information has the IP address to be mounted is detected, if yes, a target node is screened from nodes where a container providing load balancing service is located, and the IP address to be mounted is mounted on the target node. The technical scheme provided by the application can automatically manage the IP address in the load balancing service.

Description

IP address management method, system and controller in load balancing service
Technical Field
The invention relates to the technical field of internet, in particular to an IP address management method, system and controller in load balancing service.
Background
In the cloud service, a LoadBalancer (LB) may provide a load balancing service to the outside. When a third party needs to create a load balancing service, the corresponding IP address needs to be provided.
However, in the conventional kubernets platform, the IP addresses of the load balancing service cannot be effectively managed, and are usually managed only by increasing the labor cost. Thus, not only the IP address cannot be allocated to the newly created load balancing service in a timely manner, but also the existing IP address cannot be effectively managed.
Therefore, there is a need for a more efficient IP address management method for load balancing services.
Disclosure of Invention
The present application aims to provide a method, a system and a controller for managing IP addresses in a load balancing service, which can automatically manage the IP addresses in the load balancing service.
In order to achieve the above object, an aspect of the present application provides a method for managing an IP address in a load balancing service, where the method is applied to a controller of a distributed container management platform, and the method includes: monitoring service information transmitted from a service interface, and initiating an IP address acquisition request to an IP management center component if the service information does not carry an IP address when judging that the service information represents and creates a load balancing service; receiving the IP address fed back by the IP address acquisition request, and distributing the IP address to the service information; when the service information is monitored to be changed, whether the service information has the IP address to be mounted is detected, if yes, a target node is screened from nodes where a container providing load balancing service is located, and the IP address to be mounted is mounted on the target node.
In one embodiment, after determining that the service information characterizes a load balancing service, the method further comprises: and adding the service information into an information queue, and taking out each service information from the information queue in sequence for processing.
In an embodiment, the IP address obtaining request includes a cluster identifier and a node identifier corresponding to the service information, so that the IP management center component queries a virtual local area network where the service information is located according to the cluster identifier and the node identifier, and feeds back an unoccupied IP address in the virtual local area network.
In one embodiment, the method further comprises: if the IP management center component cannot be connected with the network, or the IP address fed back by the IP management center component cannot be verified, switching to an autonomous state, applying for an idle IP address according to the IP address use condition in the cluster recorded in the memory in the autonomous state, and allocating the applied idle IP address to the service information.
In one embodiment, after assigning the IP address to the service information, the method further comprises: and increasing the use record of the IP address in a memory, and updating the use record into a configuration file so as to read the use record of the corresponding IP address from the configuration file after restarting.
In one embodiment, screening out a target node among nodes where a container providing a load balancing service is located includes: and aiming at the nodes where the containers providing the load balancing service are located, identifying the creation time of each node, sequencing the nodes according to the sequence of the creation time from first to last, and taking the node with the first sequencing as the screened target node.
In one embodiment, the method further comprises: and initiating an IP address detection message at regular time aiming at the service information, wherein the IP address detection message is used for judging whether the service information is successfully applied to an IP address.
In one embodiment, after mounting the IP address to be mounted on the target node, the method further comprises: monitoring service information transmitted by the service interface, and if the service information represents that the load balancing service is deleted, initiating an IP address deletion request to the IP management center component; receiving an IP address deleting notification fed back by the IP management center component, and deleting the IP address carried in the service information; and when the change of the service information is monitored, judging whether the IP address needs to be deleted or not, and if so, deleting the corresponding IP address from the target node.
In one embodiment, the method further comprises: if the IP address can not be connected to the IP management center assembly or the IP address deletion notification fed back by the IP management center assembly can not be verified, switching to an autonomous state, and setting the corresponding IP address in the memory to be in an idle state in the autonomous state.
In one embodiment, after the corresponding IP address is deleted from the target node, the method further comprises: and deleting the corresponding IP address use record in the memory, and synchronously deleting the corresponding IP address in the configuration file.
In one embodiment, the method further comprises: and initiating an IP address deleting message at regular time aiming at the service information, wherein the IP address deleting message is used for judging whether the service information is successfully deleted the IP address.
In order to achieve the above object, another aspect of the present application further provides an IP address management system in a load balancing service, where the system includes: the address acquisition unit is used for monitoring service information transmitted by a service interface, and when judging that the service information represents and creates a load balancing service, if the service information does not carry an IP address, an IP address acquisition request is sent to an IP management center component; an address allocation unit, configured to receive an IP address fed back by the IP address acquisition request, and allocate the IP address to the service information; and the address mounting unit is used for detecting whether the service information has the IP address to be mounted or not when monitoring that the service information is changed, screening a target node from nodes where a container providing load balancing service is located if the service information has the IP address to be mounted, and mounting the IP address to be mounted on the target node.
In order to achieve the above object, another aspect of the present application further provides a controller of a container platform, where the controller includes a memory and a processor, the memory is used for storing a computer program, and the computer program, when executed by the processor, implements the IP address management method described above.
According to the technical scheme, the service interface can be monitored through the controller in the kubernets platform. When service information characterizing the creation of the load balancing service is monitored, an IP address acquisition request can be initiated to the IP management center component. After receiving the IP address fed back by the IP management center component, the controller may write the IP address into the service information. Another component in the controller may monitor the status of the service information, and when a change in the service information is monitored, it may first determine whether the change is caused by writing an IP address. If yes, the service information is indicated to have the IP address to be mounted. At this time, the controller may traverse each node where the container providing the load balancing service is located, then select a suitable target node from the nodes, and mount the IP address written in the service information onto the target node, thereby implementing automatic application and automatic mounting of the IP address.
Therefore, according to the technical scheme provided by the application, the IP address can be automatically managed, the efficiency of IP address management is improved, and meanwhile, the IP address can be mounted for the load balancing service in time.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a kubernets cluster configuration in an embodiment of the present invention;
FIG. 2 is a diagram illustrating steps of a method for managing IP addresses according to an embodiment of the present invention;
FIG. 3 is an interaction diagram of a method for managing IP addresses according to an embodiment of the present invention;
FIG. 4 is a functional block diagram of an IP address management system according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a controller in accordance with an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a computer terminal in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, the technical solutions of the present application will be clearly and completely described below with reference to the detailed description of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The technical scheme provided by the application can be applied to the system architecture shown in fig. 1. A distributed container management platform and IP management center components may be included in fig. 1. The distributed container management platform may be, for example, a kubernets platform, and a controller and a service interface (service) may be included in the kubernets platform, where the controller may listen to various service information transmitted by the service interface. The IP management center component may include an address management interface and an address storage server, wherein the address management interface may receive requests related to IP addresses sent by the controller, and the address storage server may store the respective IP addresses in the kubernets platform and usage statuses of the respective IP addresses.
Referring to fig. 2 and fig. 3, a method for managing an IP address in a load balancing service according to an embodiment of the present application is applied to a controller of a distributed container management platform, and the method may include the following steps.
S1: monitoring service information transmitted from a service interface, and initiating an IP address acquisition request to an IP management center component if the service information does not carry an IP address when judging that the service information represents and creates a load balancing service.
In this embodiment, the controller may monitor a service interface in the kubernets platform, and when the service interface transmits service information, the controller may determine the type of the service information. If the service information represents the creation of the load balancing service, the service information is indicated to require the application of an IP address. The controller may add the service information to the information queue, and then sequentially process the service information in the information queue according to the arrangement order of the service information in the information queue.
Specifically, after the service information is read from the information queue, it can be determined whether the service information carries an IP address. Generally, if a certain service information has already been assigned an IP address, the IP address is carried in an address field of the service information. And if the service information does not carry the IP address, indicating that the IP address needs to be allocated to the service information currently.
In this embodiment, the controller may initiate an IP address acquisition request to the IP management center component. Specifically, the IP management center component may provide an https address management interface to the outside, so that the IP address obtaining request may be an https request. The IP address acquisition request may carry a plurality of pieces of information analyzed from the service information. Specifically, the service information may include a node identifier of a node to be provided with the load balancing service, and a cluster identifier of a cluster in which the node is located. Then the node identifier and the cluster identifier may be carried in the IP address acquisition request. The combination of the node identification and the cluster identification uniquely identifies a node in the network.
In the kubernets platform, nodes, clusters and virtual local area networks (vlans) may have an association relationship therebetween. Therefore, after receiving the IP address acquisition request, the IP management center component can inquire the virtual local area network where the service information is located according to the cluster identifier and the node identifier. When allocating an IP address for the service information, the IP management center component may query the address storage database for the IP address under the virtual lan, and may feed back an unoccupied IP address in the virtual lan to the controller.
After feeding back the IP address to the controller, the IP management center component may write a usage record of the IP address in the address storage database, where the usage record may include an allocation time node of the IP address, information of the user, and the like.
S3: and receiving the IP address fed back by the IP address acquisition request, and distributing the IP address to the service information.
In this embodiment, after receiving the IP address fed back by the IP management center component, the controller may verify the validity of the parameter of the IP address, and if the verification is passed, may assign the IP address to the service information. Specifically, the IP address may be written in an address field of the service information.
In this embodiment, the controller may include two components, a first component may be responsible for application and release of an IP address, and a second component may be responsible for a mount process of the IP address. Wherein steps S1 and S3 may be performed by the first component.
In one embodiment, after assigning the IP address to the service information, the first component may further add a usage record of the IP address to the memory. The purpose of this is that the controller may enter an autonomous state of the IP address in some scenarios. In the autonomous state, the controller allocates and releases the IP address based on the usage record of the IP address in the memory. Therefore, the use record of the IP address is added in the memory, and preparation can be made for the autonomous state.
In addition, the first component may write a usage record of the IP address into a configuration file of the controller, thereby performing persistent storage of the usage record. Thus, after the controller is restarted, the information in the configuration file is still present, although the information in the memory has been lost. Therefore, the use record of the corresponding IP address can be read from the configuration file, and the loss of the use record of the IP address is avoided.
S5: when the service information is monitored to be changed, whether the service information has the IP address to be mounted is detected, if yes, a target node is screened from nodes where a container providing load balancing service is located, and the IP address to be mounted is mounted on the target node.
In this embodiment, a second component in the controller may listen for the status of the service information. When the first component writes an IP address into the service information, the status of the service information is changed. When the second component monitors that the service information is changed, the second component can detect whether the service information has the IP address to be mounted or not by identifying the address field in the service information. If the IP address is written in the address field, the service information is indicated to have the IP address to be mounted.
In this embodiment, the containers providing the load balancing server may be distributed among a plurality of nodes. When mounting an IP address for a container, the IP address may be mounted in a node where the container is located. In practical application, the node with the best performance can be identified, the node with the best performance is taken as a screened target node, and the IP address is mounted on the target node.
In one embodiment, the nodes are increased or decreased automatically by considering that containers can be automatically expanded or contracted according to actual conditions in the kubernets platform. During capacity reduction, nodes with later creation time are usually deleted first. In view of this, when an IP address is mounted for a container providing load balancing service, in order to avoid IP address failure in the case of capacity reduction, for a node where the container providing load balancing service is located, creation time of each node may be identified first, and the nodes may be sorted in order from the first creation time to the last creation time, where the node that is the first node in the order is created first. During the capacity reduction process, the first node in the sequence is deleted finally. Therefore, the node with the first rank can be used as the screened target node, and the IP address can be mounted under the target node, so that more stable load balancing service is provided.
It should be noted that, in practical applications, if the controller cannot be connected to the IP management center component, or the IP address fed back by the IP management center component cannot be verified, the controller may switch to an autonomous state, and in the autonomous state, the controller may apply for an idle IP address according to the IP address usage in the cluster recorded in the memory, and allocate the applied idle IP address to the service information. In the memory, usage records of all IP addresses in the cluster may be stored, including information about which service, which port is in use, whether it is multiplexed, and the like.
In addition, for the service information, the controller may periodically initiate an IP address detection message, where the IP address detection message is used to determine whether the service information has successfully applied for an IP address. The reason for this is that the IP address may fail to apply for the application and there is no usable IP address in the memory, whereas there is no re-application process for the IP address failure in the kubernets platform. Therefore, a regular IP address detection message is needed to check whether there is service information without mounting an IP address, and the IP address can be reapplied for the case of no mounting of an IP address.
In one embodiment, the IP address assigned to the load balancing service may also be deleted by the service information. Specifically, in a similar manner, the controller may monitor service information transmitted from the service interface, and if the service information represents that the load balancing service is deleted, may initiate an IP address deletion request to the IP management center component, where the IP address deletion request may also carry the cluster identifier and the node identifier. The IP management center component can know which node IP address should be deleted according to the cluster identifier and the node identifier. After releasing the IP address, the IP management center component may modify the corresponding usage record in the address storage database. The IP management center component may then feed back an IP address deletion notification to the controller.
The controller may delete the IP address carried in the service information after receiving the IP address deletion notification fed back by the IP management center component. Meanwhile, when the second component in the controller monitors that the service information is changed, whether the IP address needs to be deleted can be judged. If necessary, the corresponding IP address may be deleted from the destination node.
In an embodiment, if the controller cannot be connected to the IP management center component, or the IP address deletion notification fed back by the IP management center component cannot be verified, the controller may switch to an autonomous state, and in the autonomous state, the controller may set the corresponding IP address in the memory to an idle state.
In one embodiment, after the corresponding IP address is deleted from the target node, the controller may further delete the corresponding IP address usage record in the memory, and synchronously delete the corresponding IP address in the configuration file.
Likewise, the controller may initiate an IP address deletion message for the service information timing, which may be used to determine whether the service information has successfully deleted the IP address.
In one specific application example, the process of deleting an IP address may be as follows:
1. the controller monitors a service interface of kubernets, judges the service type, and only needs to be added into the information queue if the service type is a loadbalancer type.
2. And acquiring the service information from the information queue, and judging whether the service information is the service information for deleting the IP address. If so, the IP address needs to be released to the IP management center component.
3. And the controller applies for deleting the IP address from the IP management center component through the https interface. And when applying, carrying the corresponding cluster identification and node identification. If the connection to the IP management center component is not possible, the controller enters an autonomous state.
And 4, the IP management center component verifies the validity of the parameters, releases the IP address after passing the verification, returns a notice to the controller, and meanwhile clears the use record of the IP address in the address storage database.
5. The controller verifies the returned content. If the verification fails, the autonomous state is also entered.
6. In the autonomous state, the controller can set the corresponding IP address in the memory to be in an idle state for use when the IP address is applied next time.
7. Under the non-autonomous state, the controller can delete the use record of the corresponding IP address in the memory.
8. Another component in the controller listens for service information changes and detects whether an IP address needs to be deleted. If necessary, the IP address is deleted from the physical machine (target node), and the deleted usage record is updated into the configuration file.
9. As with the application for IP addresses, the deletion of IP addresses is also triggered periodically during the deletion of IP addresses, since there is also a possibility of failure in the deletion of IP addresses.
Referring to fig. 4, the present application further provides an IP address management system in a load balancing service, where the system includes:
the address acquisition unit is used for monitoring service information transmitted by a service interface, and when judging that the service information represents and creates a load balancing service, if the service information does not carry an IP address, an IP address acquisition request is sent to an IP management center component;
an address allocation unit, configured to receive an IP address fed back by the IP address acquisition request, and allocate the IP address to the service information;
and the address mounting unit is used for detecting whether the service information has the IP address to be mounted or not when monitoring that the service information is changed, screening a target node from nodes where a container providing load balancing service is located if the service information has the IP address to be mounted, and mounting the IP address to be mounted on the target node.
Referring to fig. 5, the present application further provides a controller of a container platform, where the controller includes a memory and a processor, the memory is used for storing a computer program, and when the computer program is executed by the processor, the IP address management method is implemented.
According to the technical scheme, the service interface can be monitored through the controller in the kubernets platform. When service information characterizing the creation of the load balancing service is monitored, an IP address acquisition request can be initiated to the IP management center component. After receiving the IP address fed back by the IP management center component, the controller may write the IP address into the service information. Another component in the controller may monitor the status of the service information, and when a change in the service information is monitored, it may first determine whether the change is caused by writing an IP address. If yes, the service information is indicated to have the IP address to be mounted. At this time, the controller may traverse each node where the container providing the load balancing service is located, then screen out a suitable target node therefrom, and mount the IP address written in the service information onto the target node, thereby implementing automatic application and automatic mounting of the IP address.
Therefore, according to the technical scheme provided by the application, the IP address can be automatically managed, the efficiency of IP address management is improved, and meanwhile, the IP address can be mounted for the load balancing service in time.
Referring to fig. 6, in the present application, the technical solution in the above embodiment can be applied to the computer terminal 10 shown in fig. 6. The computer terminal 10 may include one or more (only one shown) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. It will be understood by those skilled in the art that the structure shown in fig. 6 is only an illustration and is not intended to limit the structure of the electronic device. For example, the computer terminal 10 may also include more or fewer components than shown in FIG. 6, or have a different configuration than shown in FIG. 6.
The memory 104 may be used to store software programs and modules of application software, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 104. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for embodiments of the system and the apparatus, reference may be made to the introduction of embodiments of the method described above in contrast to the explanation.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only an embodiment of the present application, and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (13)

1. An IP address management method in a load balancing service, wherein the method is applied to a controller of a distributed container management platform, and the method comprises:
monitoring service information transmitted from a service interface, and initiating an IP address acquisition request to an IP management center component if the service information does not carry an IP address when judging that the service information represents and creates a load balancing service;
receiving the IP address fed back by the IP address acquisition request, and distributing the IP address to the service information;
when the change of the service information is monitored, whether the service information has the IP address to be mounted is detected, if yes, a target node is screened from nodes where a container providing load balancing service is located, and the IP address to be mounted is mounted on the target node.
2. The method of claim 1, wherein after determining that the service information characterizes a load balancing service, the method further comprises:
and adding the service information into an information queue, and taking out each service information from the information queue in sequence for processing.
3. The method according to claim 1, wherein the IP address obtaining request includes a cluster identifier and a node identifier corresponding to the service information, so that the IP management center component queries a virtual local area network where the service information is located according to the cluster identifier and the node identifier, and feeds back an unoccupied IP address in the virtual local area network.
4. The method of claim 1, further comprising:
if the IP management center component cannot be connected with the network, or the IP address fed back by the IP management center component cannot be verified, switching to an autonomous state, applying for an idle IP address according to the IP address use condition in the cluster recorded in the memory in the autonomous state, and allocating the applied idle IP address to the service information.
5. The method of claim 1, wherein after assigning the IP address to the service information, the method further comprises:
and increasing the use record of the IP address in a memory, and updating the use record into a configuration file so as to read the use record of the corresponding IP address from the configuration file after restarting.
6. The method of claim 1, wherein screening out target nodes among nodes where containers providing load balancing services are located comprises:
and aiming at the nodes where the containers providing the load balancing service are located, identifying the creation time of each node, sequencing the nodes according to the sequence of the creation time from first to last, and taking the node with the first sequencing as the screened target node.
7. The method of claim 1, further comprising:
and initiating an IP address detection message at regular time aiming at the service information, wherein the IP address detection message is used for judging whether the service information is successfully applied to an IP address.
8. The method of claim 1, wherein after mounting the IP address to be mounted on the target node, the method further comprises:
monitoring service information transmitted by the service interface, and if the service information represents that the load balancing service is deleted, initiating an IP address deletion request to the IP management center component;
receiving an IP address deleting notification fed back by the IP management center component, and deleting the IP address carried in the service information;
and when the change of the service information is monitored, judging whether the IP address needs to be deleted or not, and if so, deleting the corresponding IP address from the target node.
9. The method of claim 8, further comprising:
if the IP address can not be connected to the IP management center component or the IP address deletion notification fed back by the IP management center component can not be verified, switching to an autonomous state, and setting the corresponding IP address in the memory to be in an idle state in the autonomous state.
10. The method of claim 8, wherein after removing the corresponding IP address from the target node, the method further comprises:
and deleting the corresponding IP address use record in the memory, and synchronously deleting the corresponding IP address in the configuration file.
11. The method of claim 8, further comprising:
and initiating an IP address deleting message at regular time aiming at the service information, wherein the IP address deleting message is used for judging whether the service information is successfully deleted the IP address.
12. An IP address management system in a load balancing service, the system comprising:
the address acquisition unit is used for monitoring service information transmitted by a service interface, and when judging that the service information represents and creates a load balancing service, if the service information does not carry an IP address, an IP address acquisition request is sent to an IP management center component;
an address allocation unit, configured to receive an IP address fed back by the IP address acquisition request, and allocate the IP address to the service information;
and the address mounting unit is used for detecting whether the service information has the IP address to be mounted or not when monitoring that the service information is changed, screening a target node from nodes where a container providing load balancing service is located if the service information has the IP address to be mounted, and mounting the IP address to be mounted on the target node.
13. A controller of a container platform, characterized in that the controller comprises a memory for storing a computer program which, when executed by the processor, implements the method according to any of claims 1 to 11.
CN202210295258.3A 2022-03-23 2022-03-23 IP address management method, system and controller in load balancing service Pending CN114745358A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210295258.3A CN114745358A (en) 2022-03-23 2022-03-23 IP address management method, system and controller in load balancing service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210295258.3A CN114745358A (en) 2022-03-23 2022-03-23 IP address management method, system and controller in load balancing service

Publications (1)

Publication Number Publication Date
CN114745358A true CN114745358A (en) 2022-07-12

Family

ID=82276149

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210295258.3A Pending CN114745358A (en) 2022-03-23 2022-03-23 IP address management method, system and controller in load balancing service

Country Status (1)

Country Link
CN (1) CN114745358A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116107913A (en) * 2023-04-06 2023-05-12 阿里云计算有限公司 Test control method, device and system of single-node server
WO2024021471A1 (en) * 2022-07-29 2024-02-01 天翼云科技有限公司 Service updating method, apparatus and system, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101511110A (en) * 2008-02-12 2009-08-19 Sk电信有限公司 Mobile ip rapidly switching method and system between different networks
CN112000434A (en) * 2020-08-14 2020-11-27 苏州浪潮智能科技有限公司 Kubernetes dynamic management service based governance rule configuration method and system
CN112015544A (en) * 2020-06-30 2020-12-01 苏州浪潮智能科技有限公司 Load balancing method, device and equipment of k8s cluster and storage medium
CN113656168A (en) * 2021-07-16 2021-11-16 新浪网技术(中国)有限公司 Method, system, medium and equipment for automatic disaster recovery and scheduling of traffic
CN113672346A (en) * 2021-08-09 2021-11-19 浪潮云信息技术股份公司 Method for realizing multi-MGR service deployment based on look
WO2022033121A1 (en) * 2020-08-14 2022-02-17 苏州浪潮智能科技有限公司 Method and system for resource exposure in kubernetes, and device and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101511110A (en) * 2008-02-12 2009-08-19 Sk电信有限公司 Mobile ip rapidly switching method and system between different networks
CN112015544A (en) * 2020-06-30 2020-12-01 苏州浪潮智能科技有限公司 Load balancing method, device and equipment of k8s cluster and storage medium
CN112000434A (en) * 2020-08-14 2020-11-27 苏州浪潮智能科技有限公司 Kubernetes dynamic management service based governance rule configuration method and system
WO2022033121A1 (en) * 2020-08-14 2022-02-17 苏州浪潮智能科技有限公司 Method and system for resource exposure in kubernetes, and device and medium
CN113656168A (en) * 2021-07-16 2021-11-16 新浪网技术(中国)有限公司 Method, system, medium and equipment for automatic disaster recovery and scheduling of traffic
CN113672346A (en) * 2021-08-09 2021-11-19 浪潮云信息技术股份公司 Method for realizing multi-MGR service deployment based on look

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
罗永安: "" 基于Kubernetes的资源调度策略研究与优化"", 《中国优秀硕士学位论文全文数据库(信息科技辑)》, 15 March 2022 (2022-03-15) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024021471A1 (en) * 2022-07-29 2024-02-01 天翼云科技有限公司 Service updating method, apparatus and system, and storage medium
CN116107913A (en) * 2023-04-06 2023-05-12 阿里云计算有限公司 Test control method, device and system of single-node server
CN116107913B (en) * 2023-04-06 2023-11-14 阿里云计算有限公司 Test control method, device and system of single-node server

Similar Documents

Publication Publication Date Title
WO2019137320A1 (en) Resource scheduling method, apparatus, device and system
CN108924244B (en) Distributed system and flow distribution method and device for same
CN112532675B (en) Method, device and medium for establishing network edge computing system
CN114745358A (en) IP address management method, system and controller in load balancing service
US10846185B2 (en) Method for processing acquire lock request and server
CN106933548B (en) Global information obtaining, processing and updating method, device and system
CN107590033B (en) Method, device and system for creating DOCKER container
CN106933550B (en) Global information obtaining, processing and updating method, device and system
CN112243044B (en) Container address allocation method and device
CN110764963A (en) Service exception handling method, device and equipment
CN111258851A (en) Cluster alarm method, device, setting and storage medium
CN114884838A (en) Monitoring method of Kubernetes component and server
CN111600807A (en) Flow control method and system based on API gateway equipment
CN113301079B (en) Data acquisition method, system, computing device and storage medium
CN108241469B (en) Data storage method, device and system
CN114710549B (en) Dynamic management method, system and service node for network card in container platform
WO2017008658A1 (en) Storage checking method and system for text data
CN108509296B (en) Method and system for processing equipment fault
CN112532758B (en) Method, device and medium for establishing network edge computing system
CN106571935B (en) Resource scheduling method and equipment
CN109005071B (en) Decision deployment method and scheduling equipment
CN111756800A (en) Method and system for processing burst flow
CN108023920B (en) Data packet transmission method, equipment and application interface
CN111404978A (en) Data storage method and cloud storage system
WO2021248972A1 (en) Default gateway management method, gateway manager, server, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination