CN110287021A - Load balancing application management method, device, computer equipment and storage medium - Google Patents
Load balancing application management method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN110287021A CN110287021A CN201910411129.4A CN201910411129A CN110287021A CN 110287021 A CN110287021 A CN 110287021A CN 201910411129 A CN201910411129 A CN 201910411129A CN 110287021 A CN110287021 A CN 110287021A
- Authority
- CN
- China
- Prior art keywords
- load balancing
- lvs
- application
- interface
- container
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5083—Techniques for rebalancing the load in a distributed system
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
Abstract
The embodiment of the present application provides a kind of load balancing application management method, device, computer equipment and storage medium, is related to field of cloud computer technology, can be applied in PaaS platform.The described method includes: creating the application of LVS load balancing according to preset creation interface;After LVS load balancing application creation is completed, if receiving the open instructions for opening default management interface, default management interface is opened according to the open instructions;If receiving the management instruction of the triggering of the administration interface corresponding to the default management interface, is instructed according to the management and the LVS load balancing application created is managed.The embodiment of the present application can be by by the LVS load balancing application of preset creation interface creation, and the administration interface corresponding to default management interface is managed.Administration interface by presetting management interface may be implemented to be managed the different information of the LVS load balancing application created, improves the efficiency of LVS load balancing application management, improves the experience of user.
Description
Technical field
This application involves field of cloud computer technology more particularly to a kind of load balancing application management methods, device, computer
Equipment and storage medium.
Background technique
Currently, PaaS platform (Platform-as-a-Service: platform services) in the market loads LVS
The management of weighing apparatus application is all the user progress manual amendment for relying on corresponding authority, needs the user modified to have so higher
Specialty background knowledge, and be manual modification, modification operation is very cumbersome, it is easy to malfunction.In addition, creating container application
LVS load balancing application after, if there are multiple subsidiaries in an enterprise, each subsidiary wants using an independent port;Or
There is the demand of multiple applications in one enterprise of person, and each application needs a port.Under above situation, it is related to loading LVS equal
The management of weighing apparatus application.
Summary of the invention
The embodiment of the present application provides a kind of load balancing application management method, device, computer equipment and storage medium, can
The LVS load balancing application created is managed by administration interface corresponding to default management interface, improves LVS load
The efficiency of balanced application management.
In a first aspect, the embodiment of the present application provides a kind of load balancing application management method, this method comprises:
The application of LVS load balancing is created according to preset creation interface;In LVS load balancing application creation completion
Afterwards, if receiving the open instructions for opening default management interface, default management interface is opened according to the open instructions;If receiving
To the management instruction of the triggering of the administration interface corresponding to the default management interface, according to the management instruction to being created
LVS load balancing application is managed.
Second aspect, the embodiment of the invention provides a kind of load balancing application management device, load balancing application pipes
Managing device includes for executing the corresponding unit of method described in above-mentioned first aspect.
The third aspect, the embodiment of the invention provides a kind of computer equipment, the computer equipment includes memory, with
And the processor being connected with the memory;
The memory is for storing computer program, and the processor is for running the calculating stored in the memory
Machine program, to execute method described in above-mentioned first aspect.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage medium, the computer-readable storage
Media storage has computer program, when the computer program is executed by processor, realizes method described in above-mentioned first aspect.
The embodiment of the present application can connect by the LVS load balancing application of preset creation interface creation in default management
Administration interface corresponding to mouthful is managed.Administration interface by presetting management interface may be implemented negative to the LVS created
The different information for carrying balanced application are managed, and there is no need to manual amendments to be managed accordingly, management it is easy to operate
Simply, and realization management is automated, it is not easy to malfunction, improve the efficiency of LVS load balancing application management;And by pre-
If the various related letters for the LVS load balancing application that the acquisition that the administration interface of management interface can be very visual and clear is created
Breath, information is very transparent intuitive, improves the experience of user.
Detailed description of the invention
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description
Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, general for this field
For logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the flow diagram of load balancing application management method provided by the embodiments of the present application;
Fig. 2 is the schematic diagram of set interface provided by the embodiments of the present application;
Fig. 3 is the sub-process schematic diagram of load balancing application management method provided by the embodiments of the present application;
Fig. 4 is the schematic diagram for the set interface that another embodiment of the application provides;
Fig. 5 is the sub-process schematic diagram of load balancing application management method provided by the embodiments of the present application;
Fig. 6 is the port adding method flow diagram of load balancing application management method provided by the embodiments of the present application;
Fig. 7 is the port delet method flow diagram of load balancing application management method provided by the embodiments of the present application;
Fig. 8 is the configuration parameter amending method process signal of load balancing application management method provided by the embodiments of the present application
Figure;
Fig. 9 is the schematic block diagram of load balancing application management device provided by the embodiments of the present application;
Figure 10 is the schematic block diagram of the first creating unit provided by the embodiments of the present application;
Figure 11 is the schematic block diagram of administrative unit provided by the embodiments of the present application;
Figure 12 is the schematic block diagram of administrative unit provided by the embodiments of the present application;
Figure 13 is the schematic block diagram of administrative unit provided by the embodiments of the present application;
Figure 14 is the schematic block diagram of administrative unit provided by the embodiments of the present application;
Figure 15 is the schematic block diagram of computer equipment provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that described embodiment is some embodiments of the present application, instead of all the embodiments.Based on this Shen
Please in embodiment, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall in the protection scope of this application.
Fig. 1 is the flow diagram of load balancing application management method provided by the embodiments of the present application.As shown in Figure 1, should
Method includes S101-S103.
S101 creates the application of LVS load balancing according to preset creation interface.
Wherein, preset creation interface includes the first default creation interface and the second default creation interface.Wherein, first is pre-
If creating interface for first creation container application, then create the LVS load balancing application of container application, and container application is set
With the incidence relation of LVS load balancing application.It is to be appreciated that by the first default creation interface, container application and the container
The disposable creation of LVS load balancing application of application is completed, that is, is creating the LVS that container application is created while container application
Load balancing, which is applied and the container is arranged, applies the incidence relation applied with LVS load balancing.Second default creation interface is used for
Create the application of LVS load balancing.Applicable scene includes following scene: container application has created completion, such as answers container
And have been running for a period of time, then be determined as the container application creation application of LVS load balancing.Under this kind of scene, need
It is individually for container application creation load balancing application, that is, needs to use the second default creation interface.Specifically, the first default creation
Interface and the second default creation interface can exist in the form of set interface and interface function.
It should be noted that only by the LVS load balancing application of preset creation interface creation, it just can be default
It is managed on administration interface corresponding to management interface.
In one embodiment, it if preset creation interface is the first default creation interface, is created according to preset creation interface
Build LVS load balancing application, i.e. step S101 the following steps are included:
The information by the container application of the first default creation interface setting and the information of load balancing application are obtained,
In, the type of load balancing application is LVS;The information for information and the load balancing application applied according to set container, with
And preset load balancing parameter information, using the first default creation interface, the application of creation container and LVS load balancing are answered
With, and created container is set and applies the incidence relation applied with LVS load balancing.
Wherein, the first default creation interface includes a setting interface, and the letter that container is applied is arranged by the setting interface
The information of breath and load balancing application, wherein the setting interface is the setting interface that developer writes, and can be arranged with one
The form at interface is presented.As shown in Fig. 2, for the schematic diagram of set interface corresponding to the setting interface.It is first default by this
The information for the container application that the setting interface setting of creation interface need to create and the information of load balancing application.Specifically, it connects
Receive user input/selection need creation container application information and load balancing application information.Since this is preset
The information of container application and the information of load balancing application can be set in creation interface, therefore obtain the letter of container application simultaneously
The information of breath and load balancing application.
Wherein, container application information include container application application environment, container application region, container application appearance
Device example quantity, container application Mirror Info etc..In some other embodiment, whether the information of container application further includes enabling
Monitoring, application management person or application founder (people of creation container application, the container application of creation can be managed),
The resource group etc. of container application.Wherein, the application environment of container application includes production environment, test environment, exploitation environment etc..Its
In, production environment means to dock external environment after container application creates successfully, or accesses for external user;Test
Environment means to use after container application creates successfully for test;Exploitation environment means to supply after container application creates successfully
Exploitation uses.The region of container application refers to the Host equipment room of creation container application, consists of two parts: " region "+" safety
Region ".Wherein, " safety zone " is the sub-regions under " region ".It is to be understood that by container application creation in the " area xx
In the computer room of " safety zone xxx " under domain ".However, determining that container application creation in which specifically computer room, needs basis
The application environment of container application and the region of container application codetermine, it can be understood as by container application creation in some application
In computer room corresponding to the region that container is applied under environment.It is to be understood that corresponding to the same region different application environment
Computer room is different.The container instance quantity of container application refers to the number of containers of container application, what a container was applied
Number of containers is the not no upper limit.Wherein, the amount of access that container instance quantity can be applied according to the container determines.Container instance mirror
As information includes image release, mirror image nature and mirror image title.Wherein, image release include official version, official version 1.1,
Official version 4.5 etc.;Mirror image nature refer to the container instance using which kind of mirror image, as nginx, tomcat, weblogic,
Springboot etc.;Mirror image title refers to specific mirror image title, such as tomcat1.1.Wherein, Mirror Info can be from right
It is obtained for selection by the user in the mirror image warehouse answered, wherein corresponding mirror image warehouse refers to the application environment of container application
Mirror image warehouse under the computer room determined jointly with the region of container application.Creation container application needs are charged, and container is answered
Include resource account under resource group, creates used expense for container application.Whether enabling monitoring, which refers to, is
It is no that the container instance applied to container is selected to be monitored, for example, container instance the resources such as CPU/ memory/IO service condition.
In some embodiments, the information of container application further includes beneficiary's resource pool, and beneficiary's resource pool refers to that creation container is answered
Subsidiary/department, the IP network section of the created container allocation of decision and the host resource of container, different resource pond,
Use different IP network section and host resource.If the information of container application further includes beneficiary's resource pool, then by
Beneficial people's resource pool determines the IP of created container instance distribution together with the region that the application environment that container is applied, container are applied
The host resource of network segment and container instance.
The information of load balancing application includes the port information of the type of load balancing application, load balancing application, wherein
The type of load balancing application is LVS.The port information of load balancing application can have one or have multiple, load balancing
The port of application refers to the access port that the application of LVS load balancing is supported, that is, the port of http mode access, such as 80,
443 equal ports.
In one embodiment, as shown in figure 3, what the information and load balancing of the container application according to set by were applied
Information and preset load balancing parameter information, using the first default creation interface, the application of creation container and LVS load
Equilibrium application, and created container is set and applies the incidence relation applied with LVS load balancing, include the following steps S1011-
S1017.Wherein, the first default creation interface further includes interface function.Using the first default creation interface it is to be understood that utilizing
Interface function corresponding to first default creation interface.
S1011, using the first default creation interface, with according to the application environment of the container application in container application message,
The region of container application, container instance quantity, container application Mirror Info create the container instance that the container is applied.
Specifically, step S1011, comprising: according in set container application message container application application environment,
The region of container application, the container instance quantity of container application determine the container instance IP of the container application;It is answered according to container
Application environment, the region of container application are determining for saving the mirror image warehouse of container application Mirror Info and being answered according to container
Creation container instance is extracted from identified mirror image warehouse with the mirror image nature of Mirror Info, image release, mirror image title
Required specific mirror image;The resource that creation container instance need to occupy is determined according to container mirror image nature, image release, and
Determine that creation container is real according to the resource that the application environment of container application, the region of container application, creation container instance need to occupy
The host of example;The container instance of container application is created on identified host according to identified specific mirror image, and will
The container instance created is bound with identified container instance IP identified container instance IP to be set as being created
The IP for the container instance built.
Wherein, it can determine the position of container application creation according to the region of the application environment of container application, container application
Which set, i.e., by container application creation in specific computer room.It should be noted that under each application environment in each region
It is corresponding with the mirror image warehouse for saving mirror image resources.Use required for the region under the application environment is preserved in the mirror image warehouse
All mirror image resources.The host for determining creation container application includes: to obtain corresponding position in database (under the computer room)
The IP address pond of the pre-assigned host for being used to create container instance;According to the resource that need to occupy of creation container instance from place
The host of creation container instance is determined in the IP address pond of host.Creation container instance is to need to occupy centainly on host
Resource, it is therefore desirable to determine the resource that creation container instance need to occupy, first to judge whether host has enough resources
To create the container instance.Wherein, the resource that creation container instance need to occupy includes CPU, memory, monitoring resource etc..Wherein, root
The container instance of container application is created on identified host according to identified specific mirror image, and the container created is real
Example is bound with identified container instance IP, comprising: is sent identified specific mirror image to by container programming facility
On the host for determining creation container instance, to carry out the creation of container instance;Creation is completed, such as by operation and maintenance tools
Ansible tool removes connection container instance, and the container instance created and identified container instance IP are bound.
S1012, according to the host for the determining creation LVS load balancing application of information that set container is applied, and
LVS container is created on the host.
It can determine the position of container application creation according to the region of the application environment of container application, container application, i.e., will hold
Device application creation is in the host of which specific computer room.After the host that creation load balancing application has been determined, then create
The LVS container of LVS load balancing application.
Specifically, step S1012, comprising: according to the application environment of the container application in the information of container application, hold
The region of device application determines LVS Mirror Info;According to the application environment of container application, the region of container application, the LVS
Mirror Info determines the host of creation LVS load balancing application;It is created on the host according to the LVS Mirror Info
The container instance that the LVS load balancing created is applied is known as LVS container by the container instance of LVS load balancing application.
Wherein, the configuration that can generate a default when application of LVS load balancing according to LVS Mirror Info is being created
File, the configuration file are stored in a predetermined directory.
S1013, for the LVS container allocation virtual IP address and management IP created.
Wherein, virtual IP address (Virtual IP, VIP) is to service IP, and service IP is to provide required for load balancing service
The IP used, it is understood that for the IP externally used, i.e. external user requests corresponding IP.Management IP is inner tube
IP used in the LVS container is managed, the required IP of the LVS container is such as logged in.It should be noted that since LVS is loaded
Equilibrium is four layers of load balancing.Four-layer load-equalizing receives request by virtual IP address+port, according to the destination address in request
Request is forwarded with source address, and can not modify or judge to request the concrete type of resource, then passes through load balancing
Algorithm is forwarded to the true server of request to be processed, and in the present embodiment, true server is container using institute
Corresponding container instance.Due to being four layers of load balancing, so do not have to consider concrete application to be processed, it can be to all applications
Do load balancing.Therefore, it is two IP of LVS container allocation, facilitates LVS externally to provide service, while also facilitating in PaaS platform
Portion is managed the LVS container.
In one embodiment, step S1013 is the following steps are included: according to the container application in the information of container application
Application environment, container application region, from pre-assigned IP address pond obtain two free time IP;By acquired two
Idle IP distributes to created LVS container as virtual IP address and management IP, and by the virtual IP address and management IP.Wherein, root
The region of the application environment, container application applied according to the container in the information of container application is with can determine pre-assigned IP
Location pond.It should be noted that virtual IP address (VIP) can be from the sky of two different pre-assigned address pools with management IP address
It is obtained in not busy IP, such as VIP address pool and management IP address pond;Be also possible to obtain in a pre-assigned address pool, i.e., from
Two free time IP are obtained in one IP address pond, the two free time IP mono- is VIP, and one is management IP.
S1014, the container instance applied according to the virtual IP address, the container created, port information reconstruct LVS are negative
Carry the configuration file of balanced application.
Due to that can generate the configuration file of a default according to LVS Mirror Info when creating LVS container, and this is matched
Setting file can not really be used to do load balancing use.Therefore, it is necessary to reconstruct the configuration file.
In one embodiment, step S1014, comprising: by the virtual IP address, the container created apply container instance,
The port information is passed to preset configuration file generated interface as variable;According to the preset configuration file generated interface
In integrate preset profile template generate new configuration file;New configuration file is uploaded to the LVS container
In predetermined directory where configuration file, configuration generated when replacing the LVS container for creating the LVS load balancing application
File.Wherein, step S1014, further includes: generate preset profile template.Wherein, preset profile template is generated
The step of, comprising: obtain the parameter information of pre-set LVS load balancing, the parameter information of pre-set container instance;
Virtual IP address parameter, the IP parameter of container instance and load balancing port parameter are set;According to pre-set LVS load balancing
Parameter information, the parameter information of pre-set container instance, set virtual IP address parameter, the IP parameter of container instance with
And load balancing port parameter generates preset profile template.In this embodiment, preset profile template can be with
It is interpreted as configuration file corresponding to a port number, including relevant configuration information corresponding to the port numbers.
As in one embodiment, the profile template of generation may include the following contents:
Wherein, xxx.yyy.zzz.mmm indicates that VIP, LVS_port indicate the port of load balancing application, LVS_
Algorithm indicates LVS load-balancing algorithm parameter, and LVS_kind indicates LVS load balancing forward mode parameter, protocol
Indicate LVS load balancing retransmission protocol parameter.Xxx.yyy.zzz.nnn indicates that IP, weight of container instance indicate that container is real
The weight parameter of server corresponding to example, TCP_CHECK indicate the TCP health examination ginseng of server corresponding to container instance
Count, include following parameter in the parameter: connect_timeout indicates that connection time-out time parameter, nb_get_retry indicate
Reconnection count parameter, delay_before_retry indicate that reconnection interval time parameter, connect_port expression are connected
Port parameter.
S1015 opens the LVS load balancing service of the LVS container.
S1016 configures the subnet card of the LVS container, and the subnet card of the virtual IP address and the LVS container is carried out
Binding.
S1017, to create container in application, creation LVS load with completion with the subnet card addition routing postponed
Equilibrium application.
Above method embodiment has been automatically performed the creation of container application and the creation of LVS load balancing application, automatically
Realize creation LVS load balancing application basic setup, accelerate the speed and efficiency of creation, saved time cost and
Cost of labor.
In one embodiment, step S1015 can be after step S1017.
In one embodiment, it if preset creation interface is the second default creation interface, is created according to preset creation interface
Build LVS load balancing application, i.e. step S101 the following steps are included:
Obtain by the information of the load balancing application of the second default creation interface setting and with the load balancing application
The information of associated associated application, wherein the type of load balancing is LVS;The information applied according to set load balancing
The LVS load balancing application of the associated application is created using the second default creation interface with the information of associated application.
Wherein, the second default creation interface includes a setting interface, and the load that need to be created is arranged by the setting interface
The information that equilibrium is applied and the associated application with the load balancing association, wherein the setting interface is developer
The setting interface write can be presented in the form of a set interface.As shown in figure 4, setting for the second default creation interface
Set the schematic diagram of set interface corresponding to interface.By the setting interface setting need to create load balancing application information with
And the associated application with the load balancing association.Wherein, the information of load balancing application includes load balancing application class
Type (being defaulted as LVS), associated application, load-balancing algorithm (such as poll), LVS load balancing forward mode (for example DR mode,
By being that the request message received Reseals MAC Address new under the mode, to be forwarded to corresponding server (i.e.
The container instance of associated application)), LVS load balancing retransmission protocol (be defaulted as Transmission Control Protocol, the agreement default use tetra- layers of LVS
Load balancing), health examination mode, the port connected etc..
Wherein, the second default creation interface further includes interface function, utilizes the second default creation interface, creation LVS load
Equilibrium is applied, it will be appreciated that be loaded using interface function corresponding to the second default creation interface to obtain set LVS
Weigh the information applied, and obtains the information of associated application, and the information applied further according to information, the LVS load balancing of associated application is created
Build the LVS load balancing application of the associated application.
It should be noted that load balancing parameter uses preset load balancing to join in the first default creation interface
Number, and load balancing is created by the second default creation interface in application, can be by the setting interface of the second default creation interface
The parameter of load balancing application is arranged.
S102, after LVS load balancing application creation is completed, if receiving the opening for opening default management interface
Instruction opens default management interface according to the open instructions.
Wherein, default management interface is the multiple and different administration interfaces write by developer.It can in administration interface
To check that all information by the created all LVS load balancing applications of preset creation interface, LVS load balancing institute are right
The relevant information (namely container is applied or the relevant information of associated application) for the server answered.And to created all
The relevant information of LVS load balancing application, the relevant information of server corresponding to LVS load balancing are modified.
Wherein, each LVS load balancing applies the information including the application of LVS load balancing, as LVS load balancing is applied
The parameter information that the virtual IP address and the port information of management IP, LVS load balancing application, LVS load balancing of LVS container are applied
The founder etc. of (such as LVS load-balancing algorithm, LVS load balancing retransmission protocol parameter), LVS load balancing application.Wherein,
It modifies all information of LVS load balancing application including increasing the port of LVS load balancing application newly, deleting LVS load
Port, configuration parameter of modification LVS load balancing application of equilibrium application etc..The phase of server corresponding to LVS load balancing
Close information include weight information corresponding to each server, health examination mode information corresponding to each server (including
Connect time-out time, reconnection number, reconnection interval time etc.).
S103, if the management instruction of the triggering of the administration interface corresponding to the default management interface is received, according to described
Management instruction is managed the LVS load balancing application created.
Management instruction is clicked the associated button on administration interface by user and is triggered, wherein management instruction includes that port is added
Instruction, configuration parameter modification instruction, inquiry instruction etc. are deleted in instruction, port.Wherein, port addition instructs, instruction is deleted in port,
Configuration parameter modification instruction is directed to the modification applied to LVS load balancing, also may be collectively referred to as modification instruction.
In one embodiment, as shown in figure 5, step S103 includes S1031-S1037 if management instruction is modification instruction.
S1031 is called and institute if receiving the modification instruction of the triggering of the administration interface corresponding to the default management interface
It states modification and instructs corresponding default modification interface, information to be modified is arranged by default modification interface.
Wherein, modification interface is preset to be developed to obtain by developer.If modification instruction is port addition instruction, then
Corresponding default modification interface is that interface is added in default port, and information to be modified is port information to be added;If modification instruction
It deletes and instructs for port, then corresponding default modification interface is that interface is deleted in default port, information to be modified is to be deleted
Port information;If modification instruction is configuration parameter modification instruction, then corresponding default modification interface is that preset configuration modification connects
Mouthful, information to be modified is configuration parameter information to be modified.
S1032 is provided with instruction if receiving, and obtains set information to be modified.
It is provided with instruction and the triggering such as " submission " associated buttons is clicked by user, if terminating to instruction is provided with, obtain
Set information to be modified.
S1033 determines that the LVS load balancing applies the virtual IP address of corresponding LVS container.
The virtual IP address that the LVS load balancing applies corresponding LVS container is obtained from database.Wherein, LVS container refers to
Be create LVS load balancing application container.Virtual IP address is that load balancing application is provided required for load balancing service
The IP used, it is understood that for the IP externally used, i.e. external user requests corresponding IP.
S1034 obtains the configuration file of the LVS load balancing application according to the virtual IP address, and the configuration is literary
Part is locally downloading.
Specifically, the host of the LVS container is determined according to VIP;The LVS on host is determined further according to VIP
Container, and obtain from the LVS container configuration file of the LVS load balancing application;It will be under acquired configuration file
It is downloaded to a local pre-set catalogue.It should be noted that acquired configuration file is locally downloading, with to matching
Set file to modify, rather than directly remotely modify on the LVS container, if allow for configuration file into
During row modification, network is interrupted, then the process rewritten also will appear interruption, that is, during excluding long-range rewrite
The fortuitous event of appearance is influenced caused by rewriting, on the other hand, rewrites configuration text long-range locally rewriting configuration file ratio
The speed of part is fast.
S1035 modifies the configuration file according to the information to be modified, to obtain target configuration file.
Target configuration file is pushed in the LVS container by S1036.
It is pushed away after local modifies to configuration file, then by modified target configuration file from pre-set catalogue
It is sent in LVS container.
S1037 restarts the load balancing service of the LVS container, so that target configuration file comes into force.
Specifically, the load balancing service of the LVS container can be restarted with restart order.
This embodiment achieves the modification to LVS load balancing application message, the process automation of modification is completed, and is so mentioned
The high speed of modification, it is convenient and efficient;The user for also not needing modification simultaneously has higher specialty background knowledge, saves artificial
Cost and maintenance cost;And when modifying configuration file, modifies configuration file is locally downloading, improve modification
Speed.
Be below respectively when receive port addition instruction, instruction is deleted in port, configuration parameter modification instruction when, it is how real
Now LVS load balancing application is managed and is further described in detail.
If modification instruction is port addition instruction, namely management instruction is port addition instruction, accordingly, to creation
The method that LVS load balancing application is managed, the method including port addition.As shown in fig. 6, the side of the port addition
Method, corresponding step S103, includes the following steps S1031a-S1039a:
S1031a is adjusted if receiving the port addition instruction of the triggering of the administration interface corresponding to the default management interface
Interface is added with default port, port information to be added is set to add interface by default port, wherein the port letter
Breath includes port numbers.
Default port addition interface is developed by developer, is preset the port addition settable LVS of interface by this and is born
It carries equilibrium and applies required newly-increased port information, that is, port information to be added is set.Port information to be added includes wait add
The port numbers added.Port numbers such as to be added are 443,7001.
S1032a is provided with instruction if receiving, and obtains set port numbers to be added.
S1033a, judges whether the port numbers to be added have existed.
The LVS load balancing is preserved in the management platform of LVS load balancing application applies corresponding port information,
So judge whether set port numbers have existed, comprising: obtain the LVS load balancing application saved in management platform
Corresponding port numbers;The port numbers that will acquire are compared with set port numbers to be added;If the port numbers obtained
In set port numbers to be added are not present, then it is determined that set port numbers to be added are not present, otherwise, it determines
Set port numbers to be added have existed.It should be noted that if set port numbers to be added have it is multiple, that
As long as there is a port number to have existed, then it is determined that set port numbers to be added have existed.
If the port numbers to be added have existed in configuration file, step S1034a is executed;If described to be added
Port numbers be not present in configuration file, execute step S1035a.
S1034a is prompted.
S1035a determines that the LVS load balancing applies the virtual IP address of corresponding LVS container.
S1036a obtains the configuration file of the LVS load balancing application according to the virtual IP address, and the configuration is literary
Part is locally downloading.
S1037a adds the port numbers to be added according to the port numbers to be added in the configuration file
Corresponding configuration code, to form target configuration file.
Wherein, configuration code corresponding to port numbers can obtain in the following way: obtain preset profile template,
The port numbers to be added, the virtual IP address and LVS load balancing apply the IP information of corresponding server, wherein
Preset profile template is configuration template corresponding to a port number;By port numbers to be added, described virtual
IP and LVS load balancing applies the IP information of corresponding server, is filled into the preset profile template
Corresponding position, to form configuration code corresponding to the port numbers to be added;The configuration code is appended to described match
The end of file is set to form target configuration file.
Wherein, preset profile template is configuration template corresponding to a port number, includes port in the template
Number, VIP, load balancing relevant information corresponding to the port numbers (algorithm, load balancing forward mode including load balancing,
Load balancing retransmission protocol etc.), (IP address of server is exactly for the IP address of Servers-all corresponding under the port numbers
The container instance of container application or associated application) and each IP address corresponding to health examination mode parameter, each
The weight etc. of server.
Target configuration file is pushed in the LVS container by S1038a.
S1039a restarts the load balancing service of the LVS container, so that target configuration file comes into force.
The process of above-mentioned port addition, whole-course automation are completed, and the speed of addition interface is so improved, convenient and efficient;
The user for also not needing modification simultaneously has higher specialty background knowledge, saves cost of labor and maintenance cost;And adding
It when adding port, modifies without logging in LVS container to configuration file, can be completed locally, improve addition port
Speed.
If modification instruction is that instruction is deleted in port, namely management instruction is that instruction is deleted in port, accordingly, to creation
The method that LVS load balancing application is managed, the method deleted including port.As shown in fig. 7, the side that the port is deleted
Method, corresponding step S103, includes the following steps S1031b-S1039b:
S1031b is adjusted if instruction is deleted in the port for receiving the triggering of the administration interface corresponding to the default management interface
Interface is deleted with default port, port information to be deleted is set to delete interface by default port, wherein the port letter
Breath includes port numbers.
Default port is deleted interface and is developed by developer, presets the port deletion settable LVS of interface by this and bears
The port information for carrying the required deletion of balanced application, that is, be arranged port information to be deleted.Port information to be deleted includes wait delete
The port numbers removed.If port numbers to be deleted are 443.
S1032b is provided with instruction if receiving, and obtains set port numbers to be deleted.
S1033b, judges whether the port numbers to be deleted have existed.
The LVS load balancing is preserved in the management platform of LVS load balancing application applies corresponding port information,
Judge whether port numbers to be deleted have existed according to the port information of the preservation.
If the port numbers to be deleted are not present, step S1034b is executed;If the port numbers to be deleted have been deposited
Executing step S1035b.
S1034b is prompted.
S1035b determines that the LVS load balancing applies the virtual IP address of corresponding LVS container.
S1036b obtains the configuration file of the LVS load balancing application according to the virtual IP address, and the configuration is literary
Part is locally downloading.
S1037b, according to the port numbers to be deleted, corresponding to port numbers to be deleted described in bond-allocating file
Configuration code region, by the code deletion in configuration code region corresponding to the port numbers to be deleted, to form mesh
Mark configuration file.
Specifically, initial row corresponding to port numbers to be deleted and end row are positioned in configuration file, by initial row
Code region between the row of end is as configuration code region corresponding to port numbers to be deleted.If should be noted that
Port numbers to be deleted have it is multiple, then successively positioning configuration code region corresponding to port numbers to be deleted.It positions wait delete
The method of initial row corresponding to the port numbers removed includes: the row where when detection port numbers to be deleted occur for the first time, will
Row where when port numbers to be deleted occur for the first time is as initial row.Position end row corresponding to port numbers to be deleted
If method include: the initial row for detecting another port numbers, by before the initial row of another port numbers a line determine
For end row;Or another bracket of first parenthesis matching of port numbers to be deleted in pairs is detected, by another bracket
The row at place is as end row.
Target configuration file is pushed in the LVS container by S1038b.
S1039b restarts the load balancing service of the LVS container, so that target configuration file comes into force.
The process that above-mentioned port is deleted, whole-course automation are completed, and the speed that addition is deleted so is improved, convenient and efficient;
The user for also not needing modification simultaneously has higher specialty background knowledge, saves cost of labor and maintenance cost;And it is deleting
It when except port, modifies without logging in LVS container to configuration file, can be completed locally, improve and delete port
Speed.
Due to used when creating the application of LVS load balancing by the first default creation interface profile template come
The configuration file of generation, therefore, the parameter of configuration file are not adaptable to each different scene, therefore can be related to loading
The modification of equilibrium allocation parameter.LVS load balancing application even by the second default creation interface creation can also be related to
The modification of load balancing configuration parameter.In the past, the mode of the modification of load balancing configuration parameter was logged on LVS container to matching
The configuration parameter set in file is modified, and is manually to modify, and needs stronger professional knowledge.
If modification instruction is configuration parameter modification instruction, namely management instruction is configuration parameter modification instruction, accordingly, right
The method that the LVS load balancing application of creation is managed, the method including configuration parameter modification.As shown in figure 8, the configuration
The method of parameter modification, corresponding step S103, includes the following steps S1031c-S1037c:
S1031c, if the configuration parameter modification for receiving the triggering of the administration interface corresponding to the default management interface refers to
It enables, preset configuration is called to modify interface, configuration parameter information to be modified is set to modify interface by preset configuration.
Preset configuration modification interface is developed by developer, and LVS can be modified by configuring interface by the preset modification
Load balancing applies the configuration parameter information of required modification.Configuration parameter information include LVS load balancing relevant information and
The relevant information (namely container is applied or the relevant information of associated application) of server corresponding to LVS load balancing.Wherein,
LVS load balancing relevant information includes that LVS load-balancing algorithm (including polling algorithm, minimum connection type etc.), LVS load are equal
Weigh forward mode (including DR mode, by Resealing MAC Address new for the request message that receives under the mode,
To be forwarded to corresponding server (i.e. the container instance of container application or associated application);NAT mode is modified under the mode and is visited
Ask the Target IP of request;Tun mode increases a header message under the mode except former access request IP packet), LVS it is negative
Carry balanced retransmission protocol (retransmission protocol is Transmission Control Protocol, and agreement default uses LVS four-layer load-equalizing) etc..LVS load balancing
The relevant information of corresponding server includes weight information corresponding to each server, health corresponding to each server
Test mode information (including connection time-out time, reconnection number, reconnection interval time etc.).It should be noted that the above parameter
Only example can also include more parameters or the less parameter of the parameter than enumerating etc..In addition, it is necessary to point out
It is that the parameter of above example is parameter corresponding to each port numbers.It is also understood that each port numbers can have above-mentioned show
The parameter of example.
S1032c is provided with instruction if receiving, and obtains set configuration parameter information to be modified.
Wherein, configuration parameter information includes the parameter value of configuration parameter and configuration parameter.
S1033c determines that LVS load balancing applies the virtual IP address of corresponding LVS container.
S1034c obtains the configuration file of the LVS load balancing application according to the virtual IP address, and the configuration is literary
Part is locally downloading.
S1035c modifies configuration ginseng corresponding in the configuration file according to the configuration parameter information to be modified
Number information, to obtain target configuration file.
Wherein, if in configuration parameter information including port numbers, it means that corresponding to be modified under the port numbers
Configuration parameter modify.If there is no port numbers in configuration parameter information, it means that corresponding under all of the port number
Configuration parameter to be modified modify.Specifically, the configuration code area according to corresponding to port numbers positioning a port number
The initial row in domain;Detect the configuration parameter to be modified in configuration code region corresponding to the port numbers, with it is set to
The parameter value of the configuration parameter of modification replaces the parameter value of original configuration parameter, until set to be repaired under the port numbers
All modification finishes the configuration parameter changed.If there is multiple port numbers to need to modify, then to next port number with same side
Formula is modified.
Target configuration file is pushed in the LVS container by S1036c.
S1037c restarts the load balancing service of the LVS container, so that target configuration file comes into force.
The process of above-mentioned configuration parameter modification, whole-course automation are completed, and the speed of modification configuration parameter, side are so improved
Just quick;The user for also not needing modification simultaneously has higher specialty background knowledge, saves cost of labor and maintenance cost;And
And when modifying configuration parameter, modify without logging in LVS container to configuration file, can be completed locally, improves
The speed of modification configuration parameter.
In one embodiment, the method for the load balancing application management further includes querying method, equal for query load
Weigh the various information applied.
It should be noted that the above management method in other than querying method, other methods all can adaptability general
Corresponding data are modified in the database.
Above method embodiment just can be in default management interface by the load balancing application of default creation interface creation
It is managed accordingly.Administration interface by presetting management interface may be implemented to the different information of the load balancing of creation
Management, there is no need to log in specific LVS container to be managed accordingly, management it is easy to operate simple, it is not easy to malfunction;
It modifies, such as newly-increased addition, deletion port, modification configuration parameter, is automated to the configuration file of LVS load balancing
It completes, so improves the speed of modification, it is convenient and efficient;The user for also not needing modification simultaneously has higher specialty background to know
Know, saves cost of labor and maintenance cost;The various different demands that can satisfy user, improve the experience of user.
Fig. 9 is the schematic block diagram of load balancing application management device provided by the embodiments of the present application.As shown in figure 9, should
Device includes for executing unit corresponding to above-mentioned load balancing application management method.Specifically, as shown in figure 9, the device
100 include creating unit 101, opening unit 102, administrative unit 103.
Creating unit 101, for creating the application of LVS load balancing according to preset creation interface;
Opening unit 102, for opening default pipe if receiving after LVS load balancing application creation is completed
The open instructions for managing interface opens default management interface according to the open instructions;
Administrative unit 103, if the management for receiving the triggering of the administration interface corresponding to the default management interface refers to
It enables, the LVS load balancing application created is managed according to management instruction.
In one embodiment, if preset creation interface is the first default creation interface, creating unit 101 is obtained including first
Take unit, the first creating unit.Wherein, first acquisition unit, for obtaining the container for passing through the first default creation interface setting
The information of information and the load balancing application of application, wherein the type of load balancing application is LVS.First creating unit, is used for
The information for information and the load balancing application applied according to set container and preset load balancing parameter information, benefit
With the first default creation interface, the application of creation container and LVS load balancing application, and be arranged created container apply with
The incidence relation of LVS load balancing application.
In one embodiment, as shown in Figure 10, the first creating unit 1010 includes creating using creating unit 1011, LVS
Unit 1012, IP allocation unit 1013, reconfiguration unit 1014, opening unit 1015, network card configuration unit 1016 and routing add
Add unit 1017.
Wherein, using creating unit 1011, for presetting creation interface using first, according in container application message
The application environment of container application, the region of container application, container instance quantity, container application Mirror Info create the container and answer
Container instance.LVS creating unit 1012, for for determining that creation LVS is negative according to the information of set container application
The host of balanced application is carried, and creates LVS container on the host.IP allocation unit 1013, for being created
LVS container allocation virtual IP address and management IP.Reconfiguration unit 1014, for being applied according to the virtual IP address, the container created
The configuration file that container instance, port information reconstruct LVS load balancing are applied.Opening unit 1015, it is described for opening
The LVS load balancing service of LVS container.Network card configuration unit 1016, for configuring the subnet card of the LVS container, by institute
The subnet card for stating virtual IP address and the LVS container is bound.Adding unit 1017 is routed, for for the subnet postponed
Card addition routing, to complete in creation container in application, creation LVS load balancing application.
In one embodiment, opening unit 1015 is not triggered after reconfiguration unit 1014, but in routing adding unit
Opening unit 1015 is triggered after 1017 again.
In one embodiment, if preset creation interface is the second default creation interface, creating unit 101 is obtained including second
Take unit, the second creating unit.Second acquisition unit is answered for obtaining by the load balancing of the second default creation interface setting
Information and information with the associated application of the load balancing association, wherein the type of load balancing is LVS.The
Two creating units, for utilizing the second default wound according to the information of set load balancing application and the information of associated application
Interface is built, the application of LVS load balancing is created.
In one embodiment, if management instruction is modification instruction, as shown in figure 11, the administrative unit 103 includes modification
Setting unit 1031, modification acquiring unit 1032, virtual IP address determination unit 1033, configuration download unit 1034, configuration modification list
Member 1035 and restarts unit 1037 at push unit 1036.Wherein, setting unit 1031 is modified, if coming from advance for receiving
If the modification instruction of the triggering of administration interface corresponding to management interface calls default modification corresponding with the modification instruction to connect
Mouthful, information to be modified is arranged by default modification interface.Acquiring unit 1032 is modified, if being provided with finger for receiving
It enables, obtains set information to be modified.Virtual IP address determination unit 1033, for determining that the LVS load balancing application institute is right
The virtual IP address for the LVS container answered.Download unit 1034 is configured, is answered for obtaining the LVS load balancing according to the virtual IP address
Configuration file, and the configuration file is locally downloading.Configuration modification unit 1035, for be repaired being converted to according to described
Breath, modifies the configuration file, to obtain target configuration file.Push unit 1036, for target configuration file to be pushed to
In the LVS container.Unit 1037 is restarted, for restarting the load balancing service of the LVS container, so that target configuration text
Part comes into force.
In one embodiment, if modification instruction is port addition instruction, as shown in figure 12, the administrative unit 103 includes
Add setting unit 1031a, addition acquiring unit 1032a, first port judging unit 1033a, the first prompt unit 1034a,
First IP determination unit 1035a, the first download unit 1036a, adding unit 1037a, the first push unit 1038a, the first weight
Open unit 1039a.Wherein, setting unit 1031a is added, if for receiving the management field corresponding to the default management interface
The port of face triggering, which is added, to be instructed, and default port is called to add interface, to be added to be arranged by default port addition interface
Port information, wherein the port information includes port numbers.Acquiring unit 1032a is added, if being provided with finger for receiving
It enables, obtains set port numbers to be added.First port judging unit 1033a, for judging the port to be added
Number whether have existed.First prompt unit 1034a has existed for the port numbers to be added, is prompted.First
IP determination unit 1035a is determined corresponding to the LVS load balancing application if being not present for the port numbers to be added
LVS container virtual IP address.First download unit 1036a, for obtaining the LVS load balancing application according to the virtual IP address
Configuration file, and it is the configuration file is locally downloading.Adding unit 1037a, for according to the port to be added
Number, configuration code corresponding to the port numbers to be added is added, in the configuration file to form target configuration file.
First push unit 1038a, for target configuration file to be pushed in the LVS container.First restarts unit 1039a, uses
In the load balancing service for restarting the LVS container, so that target configuration file comes into force.
In one embodiment, adding unit 1037a includes: template acquiring unit, fills unit, additional unit.Wherein, mould
Plate acquiring unit, it is negative for obtaining preset profile template, the port numbers to be added, the virtual IP address and LVS
Carry the IP information of the corresponding server of balanced application, wherein preset profile template is corresponding to a port number
Configuration template.Fills unit, for the port numbers to be added, the virtual IP address and LVS load balancing application institute is right
The IP information for the server answered is filled into the corresponding position in the preset profile template, described to be added to be formed
Port numbers corresponding to configuration code.Additional unit, for the configuration code to be appended to the end of the configuration file
To form target configuration file.
In one embodiment, if modification instruction is that instruction is deleted in port, as shown in figure 13, the administrative unit 103 includes
Delete setting unit 1031b, delete acquiring unit 1032b, second port judging unit 1033b, the second prompt unit 1034b,
2nd IP determination unit 1035b, the second download unit 1036b, unit 1037b, the second push unit 1038b, the second weight are deleted
Open unit 1039b.Wherein, setting unit 1031b is deleted, if for receiving the management field corresponding to the default management interface
The port of face triggering, which is deleted, to be instructed, and default port is called to delete interface, to be deleted to be arranged by default port deletion interface
Port information, wherein the port information includes port numbers.Acquiring unit 1032b is deleted, if being provided with finger for receiving
It enables, obtains set port numbers to be deleted.Second port judging unit 1033b, for judging the port to be deleted
Number whether have existed.Second prompt unit 1034b is not present for the port numbers to be deleted, is prompted.2nd IP
Determination unit 1035b is determined corresponding to the LVS load balancing application if having existed for the port numbers to be deleted
LVS container virtual IP address.Second download unit 1036b, for obtaining the LVS load balancing application according to the virtual IP address
Configuration file, and it is the configuration file is locally downloading.Unit 1037b is deleted, for according to the port to be deleted
Number, configuration code region corresponding to port numbers to be deleted described in bond-allocating file, by the port numbers to be deleted
Code deletion in corresponding configuration code region, to form target configuration file.Second push unit 1038b, being used for will
Target configuration file is pushed in the LVS container.Second restarts unit 1039b, and the load for restarting the LVS container is equal
Weighing apparatus service, so that target configuration file comes into force.
In one embodiment, if modification instruction is configuration parameter modification instruction, as shown in figure 14, the administrative unit 103
Including parameter set unit 1031c, parameter acquiring unit 1032c, the 3rd IP determination unit 1033c, third download unit
1034c, parameter modifying unit 1035c, third push unit 1036c, third restart unit 1037c.Wherein, parameter set unit
1031c, if the configuration parameter modification instruction for receiving the triggering of the administration interface corresponding to the default management interface, is called
Preset configuration modifies interface, and configuration parameter information to be modified is arranged to modify interface by preset configuration.Parameter acquiring unit
1032c obtains set configuration parameter information to be modified if being provided with instruction for receiving.3rd IP determines single
First 1033c, for determining that LVS load balancing applies the virtual IP address of corresponding LVS container.Third download unit 1034c, is used for
The configuration file of the LVS load balancing application is obtained according to the virtual IP address, and the configuration file is locally downloading.Ginseng
Number modification unit 1035c, for according to the configuration parameter information to be modified, modifying corresponding in the configuration file match
Parameter information is set, to obtain target configuration file.Third push unit 1036c, it is described for target configuration file to be pushed to
In LVS container.Third restarts unit 1037c, for restarting the load balancing service of the LVS container, so that target configures
File comes into force.
It should be noted that it is apparent to those skilled in the art that, the tool of above-mentioned apparatus and each unit
Body realizes process, can be no longer superfluous herein with reference to the corresponding description in preceding method embodiment, for convenience of description and succinctly
It states.
Above-mentioned apparatus can be implemented as a kind of form of computer program, and computer program can be in meter as shown in figure 15
It calculates and is run on machine equipment.
Figure 15 is a kind of schematic block diagram of computer equipment provided by the embodiments of the present application.The equipment is that terminal etc. is set
It is standby, such as the server in PaaS platform.The equipment 200 includes processor 202, the memory connected by system bus 201
With network interface 203, wherein memory may include non-volatile memory medium 204 and built-in storage 205.This is non-volatile
Storage medium 204 can storage program area 2046 and computer program 2042.The meter stored in the non-volatile memory medium
, it can be achieved that load balancing application management method described above when calculation machine program 2042 is executed by processor 202.The processor
202, for providing calculating and control ability, support the operation of whole equipment 200.The built-in storage 205 is non-volatile memories Jie
The operation of computer program in matter, which provides environment, may make processor 202 when the computer program is executed by processor 202
Execute load balancing application management method described above.The network interface 203 is for carrying out network communication.Those skilled in the art
Member is appreciated that structure shown in Figure 15, only the block diagram of part-structure relevant to the present invention program, composition pair
The restriction for the equipment that the present invention program is applied thereon, specific equipment may include than more or fewer portions as shown in the figure
Part perhaps combines certain components or with different component layouts.
Wherein, the processor 202 is described above negative to realize for running computer program stored in memory
Carry any embodiment of balanced application management method.
It should be appreciated that in the embodiment of the present application, alleged processor 202 can be central processing unit (Central
Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital
Signal Processor, DSP), specific integrated circuit (application program lication Specific Integrated
Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other can
Programmed logic device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor
Or the processor is also possible to any conventional processor etc..
Those of ordinary skill in the art will appreciate that be realize above-described embodiment method in all or part of the process,
It is that relevant hardware can be instructed to complete by computer program.The computer program can be stored in a storage medium,
The storage medium can be computer readable storage medium.The computer program is by the processing of at least one of the computer system
Device executes, to realize the process step of the embodiment of the above method.
Therefore, present invention also provides a kind of storage mediums.The storage medium can be computer readable storage medium, should
Computer readable storage medium includes non-volatile computer readable storage medium storing program for executing.The storage medium is stored with computer program,
The computer program when being executed by a processor, realizes any embodiment of load balancing application management method described above.
The storage medium can be USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), magnetic disk
Or the various computer readable storage mediums that can store program code such as CD.
In several embodiments provided herein, it should be understood that disclosed device, device and method, it can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, the division of the unit,
Only a kind of logical function partition, there may be another division manner in actual implementation.Those skilled in the art can be with
It is well understood, for convenience of description and succinctly, the specific work process of the device of foregoing description, equipment and unit can
With with reference to the corresponding process in preceding method embodiment, details are not described herein.The above, the only specific embodiment party of the application
Formula, but the protection scope of the application is not limited thereto, and anyone skilled in the art discloses in the application
In technical scope, various equivalent modifications or substitutions can be readily occurred in, these modifications or substitutions should all cover the guarantor in the application
Within the scope of shield.Therefore, the protection scope of the application should be subject to the protection scope in claims.
Claims (10)
1. a kind of load balancing application management method, which is characterized in that the described method includes:
The application of LVS load balancing is created according to preset creation interface;
After LVS load balancing application creation is completed, if receiving the open instructions for opening default management interface, according to
The open instructions opens default management interface;
If receiving the management instruction of the triggering of the administration interface corresponding to the default management interface, instructed pair according to the management
The LVS load balancing application created is managed.
2. the method according to claim 1, wherein management instruction includes modification instruction, if described receive
To the management instruction of the triggering of the administration interface corresponding to the default management interface, according to the management instruction to being created
LVS load balancing application is managed, comprising:
If receiving the modification instruction of the triggering of the administration interface corresponding to the default management interface, call and modification instruction
Corresponding default modification interface, information to be modified is arranged by default modification interface;
It is provided with instruction if receiving, obtains set information to be modified;
Determine that the LVS load balancing applies the virtual IP address of corresponding LVS container;
The configuration file of the LVS load balancing application is obtained according to the virtual IP address, and the configuration file is downloaded to this
Ground;
According to the information to be modified, the configuration file is modified, to obtain target configuration file;
Target configuration file is pushed in the LVS container;
The load balancing service for restarting the LVS container, so that target configuration file comes into force.
3. according to the method described in claim 2, it is characterized in that, modification instruction includes port addition instruction;The institute
If the management instruction for receiving the triggering of the administration interface corresponding to the default management interface is stated, according to management instruction to institute
The LVS load balancing application of creation is managed, comprising:
If receiving the port addition instruction of the triggering of the administration interface corresponding to the default management interface, default port is called to add
Port information to be added is arranged to add interface by default port, wherein the port information includes port in adjunction mouth
Number;
It is provided with instruction if receiving, obtains set port numbers to be added;
Judge whether the port numbers to be added have existed;
If the port numbers to be added are not present, determine the LVS load balancing using the virtual of corresponding LVS container
IP;
The configuration file of the LVS load balancing application is obtained according to the virtual IP address, and the configuration file is downloaded to this
Ground;
According to the port numbers to be added, configuration corresponding to the port numbers to be added is added in the configuration file
Code, to form target configuration file;
Target configuration file is pushed in the LVS container;
The load balancing service for restarting the LVS container, so that target configuration file comes into force.
4. according to the method described in claim 3, matching described it is characterized in that, described according to the port numbers to be added
It sets and adds configuration code corresponding to the port numbers to be added in file, to form target configuration file, comprising:
Preset profile template, the port numbers to be added, the virtual IP address and LVS load balancing are obtained using institute
The IP information of corresponding server, wherein preset profile template is configuration template corresponding to a port number;
The port numbers to be added, the virtual IP address and LVS load balancing are applied to the IP information of corresponding server,
It is filled into the corresponding position in the preset profile template, to form configuration corresponding to the port numbers to be added
Code;
The configuration code is appended to the end of the configuration file to form target configuration file.
5. according to the method described in claim 2, it is characterized in that, modification instruction includes that instruction, the institute are deleted in port
If the management instruction for receiving the triggering of the administration interface corresponding to the default management interface is stated, according to management instruction to institute
The LVS load balancing application of creation is managed, comprising:
If instruction is deleted in the port for receiving the triggering of the administration interface corresponding to the default management interface, default port is called to delete
Except interface, port information to be deleted is set to delete interface by default port, wherein the port information includes port
Number;
It is provided with instruction if receiving, obtains set port numbers to be deleted;
Judge whether the port numbers to be deleted have existed;
If the port numbers to be deleted have existed, determine the LVS load balancing using the virtual of corresponding LVS container
IP;
The configuration file of the LVS load balancing application is obtained according to the virtual IP address, and the configuration file is downloaded to this
Ground;
According to the port numbers to be deleted, configuration code area corresponding to port numbers to be deleted described in bond-allocating file
Domain, by the code deletion in configuration code region corresponding to the port numbers to be deleted, to form target configuration file;
Target configuration file is pushed in the LVS container;
The load balancing service for restarting the LVS container, so that target configuration file comes into force.
6. according to the method described in claim 2, it is characterized in that, modification instruction includes configuration parameter modification instruction, institute
If the management instruction for receiving the administration interface triggering corresponding to the default management interface is stated, according to management instruction
The LVS load balancing application created is managed, comprising:
If receiving the configuration parameter modification instruction of the triggering of the administration interface corresponding to the default management interface, pre- establishing is called
Modification interface is set, configuration parameter information to be modified is set to modify interface by preset configuration;
It is provided with instruction if receiving, obtains set configuration parameter information to be modified;
Determine that LVS load balancing applies the virtual IP address of corresponding LVS container;
The configuration file of the LVS load balancing application is obtained according to the virtual IP address, and the configuration file is downloaded to this
Ground;
According to the configuration parameter information to be modified, configuration parameter information corresponding in the configuration file is modified, with
To target configuration file;
Target configuration file is pushed in the LVS container;
The load balancing service for restarting the LVS container, so that target configuration file comes into force.
7. the method according to claim 1, wherein described create LVS load according to preset creation interface
Weighing apparatus application, comprising:
Obtain the information by the container application of the first default creation interface setting and the information of load balancing application, wherein negative
The type for carrying balanced application is LVS;
The information for information and the load balancing application applied according to set container and the template of LVS load balancing application
Configuration file, using the first default creation interface, the application of creation container and LVS load balancing application, and be arranged and created
Container applies the incidence relation applied with LVS load balancing;Or
Obtain by the information of the load balancing application of the second default creation interface setting and with the load balancing association
Associated application information, wherein the type of load balancing be LVS;
The information of the information and associated application applied according to set load balancing utilizes the second default creation interface, creation
LVS load balancing application.
8. a kind of load balancing application management device, which is characterized in that the load balancing application management device includes:
Creating unit, for creating the application of LVS load balancing according to preset creation interface;
Opening unit, for opening default management interface if receiving after LVS load balancing application creation is completed
Open instructions opens default management interface according to the open instructions;
Administrative unit, if the management instruction for receiving the triggering of the administration interface corresponding to the default management interface, according to
The management instruction is managed the LVS load balancing application created.
9. a kind of computer equipment, which is characterized in that the computer equipment includes memory, and is connected with the memory
Processor;
The memory is for storing computer program;The processor is for running the computer journey stored in the memory
Sequence, to execute the method according to claim 1 to 7.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey
Sequence when the computer program is executed by processor, realizes the method according to claim 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910411129.4A CN110287021B (en) | 2019-05-17 | 2019-05-17 | Load balancing application management method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910411129.4A CN110287021B (en) | 2019-05-17 | 2019-05-17 | Load balancing application management method and device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110287021A true CN110287021A (en) | 2019-09-27 |
CN110287021B CN110287021B (en) | 2023-09-26 |
Family
ID=68002043
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910411129.4A Active CN110287021B (en) | 2019-05-17 | 2019-05-17 | Load balancing application management method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110287021B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111131439A (en) * | 2019-12-20 | 2020-05-08 | 浪潮电子信息产业股份有限公司 | iSCSI-based message transmission method, device, equipment and storage medium |
CN114826919A (en) * | 2022-03-21 | 2022-07-29 | 浪潮思科网络科技有限公司 | SDN-based load balancing software hosting method, device, equipment and medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB0911004D0 (en) * | 2008-09-02 | 2009-08-12 | Fujitsu Ltd | Load balancer setting method and load balancer setting apparatus |
US20160191411A1 (en) * | 2014-12-30 | 2016-06-30 | Nhn Entertainment Corporation | Cloud service system and method |
WO2017096838A1 (en) * | 2015-12-11 | 2017-06-15 | 乐视控股(北京)有限公司 | Load balance configuration method, device and system |
-
2019
- 2019-05-17 CN CN201910411129.4A patent/CN110287021B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB0911004D0 (en) * | 2008-09-02 | 2009-08-12 | Fujitsu Ltd | Load balancer setting method and load balancer setting apparatus |
US20160191411A1 (en) * | 2014-12-30 | 2016-06-30 | Nhn Entertainment Corporation | Cloud service system and method |
WO2017096838A1 (en) * | 2015-12-11 | 2017-06-15 | 乐视控股(北京)有限公司 | Load balance configuration method, device and system |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111131439A (en) * | 2019-12-20 | 2020-05-08 | 浪潮电子信息产业股份有限公司 | iSCSI-based message transmission method, device, equipment and storage medium |
CN114826919A (en) * | 2022-03-21 | 2022-07-29 | 浪潮思科网络科技有限公司 | SDN-based load balancing software hosting method, device, equipment and medium |
CN114826919B (en) * | 2022-03-21 | 2023-09-22 | 浪潮思科网络科技有限公司 | SDN-based load balancing software nanotube method, device, equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN110287021B (en) | 2023-09-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10776171B2 (en) | Endpoint management system and virtual compute system | |
US11290534B2 (en) | System and method for scheduling computer tasks | |
US10841336B2 (en) | Selectively providing mutual transport layer security using alternative server names | |
US11216309B2 (en) | Using multidimensional metadata tag sets to determine resource allocation in a distributed computing environment | |
CN110224860A (en) | Load balancing application creation method, device, computer equipment and storage medium | |
WO2020029388A1 (en) | File transmission method, system, computer device and storage medium | |
US11422844B1 (en) | Client-specified network interface configuration for serverless container management service | |
US11392422B1 (en) | Service-managed containers for container orchestration service | |
CN107861760A (en) | BIOS collocation method, terminal and server | |
CN110275775A (en) | Resource allocation method, system and the storage medium of container application | |
US9420035B2 (en) | Transaction isolation during multi-tenant transaction requests | |
CN105144109B (en) | Distributive data center technology | |
KR102056960B1 (en) | Updating software components through online stores | |
CN110289983B (en) | Load balancing application creation method and device, computer equipment and storage medium | |
US10284660B1 (en) | Data flow tokens to trace execution of services in a service provider network | |
CN106533713A (en) | Application deployment method and device | |
CN110262872A (en) | Load balancing application management method, device, computer equipment and storage medium | |
CN108845808A (en) | Middleware installation method, device, computer equipment and storage medium | |
CN110287021A (en) | Load balancing application management method, device, computer equipment and storage medium | |
CN113645071A (en) | Cluster deployment method, system, medium and electronic terminal | |
CN113722055A (en) | Data processing method and device, electronic equipment and computer readable medium | |
CN110912990B (en) | Method and related equipment for updating consensus period | |
CN106445598A (en) | Plug-in loading method and Plug-in loading device | |
CN110262894A (en) | Load balancing application management method, device, computer equipment and storage medium | |
CN110417856A (en) | Expansion method, device, equipment and the storage medium of more live load equilibrium applications |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |