CN112099915A - Soft load balancing dynamic issuing configuration method and system - Google Patents
Soft load balancing dynamic issuing configuration method and system Download PDFInfo
- Publication number
- CN112099915A CN112099915A CN202010926828.5A CN202010926828A CN112099915A CN 112099915 A CN112099915 A CN 112099915A CN 202010926828 A CN202010926828 A CN 202010926828A CN 112099915 A CN112099915 A CN 112099915A
- Authority
- CN
- China
- Prior art keywords
- configuration file
- content
- path
- configuration
- layer protocol
- 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
Images
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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- 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/461—Saving or restoring of program or task context
- G06F9/462—Saving or restoring of program or task context with multiple register sets
-
- 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/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- 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
- H04L67/303—Terminal profiles
-
- 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
-
- 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45595—Network integration; Enabling network access in virtual machine instances
Abstract
The invention discloses a soft load balancing dynamic issuing configuration method and a system, wherein the soft load balancing dynamic issuing configuration method comprises the following steps: the method comprises the steps that a protocol type of a monitor is judged through the monitor, a virtual server cluster system or a front-end load balancing server is generated through a four-layer protocol or a seven-layer protocol, and the content of a configuration file, the path of the configuration file, the content of the configuration file for self-starting of service and the path are packaged into a request body; calling a predefined function of a virtual machine mirror image carrying service agent on the virtual machine according to a response protocol request by inquiring a management network IP corresponding to the virtual machine with balanced load; and writing the content of the configuration file and the path of the configuration file which are transmitted from the pastoral A into a specified file by the virtual machine mirror image carrying service agent. Has the advantages that: the invention can interact with thousands of load balancing virtual machines at the same time, and the mutual influence of the performance can not be generated.
Description
Technical Field
The invention relates to the field of soft load balancing dynamic issuing configuration, in particular to a soft load balancing dynamic issuing configuration method and system.
Background
The soft load balancing is realized by taking a virtual machine of a tenant as a carrier and creating different software according to different protocols of a listener created by a user. There are haproxy and lvs packets in the image, but to actually start a listener needs to generate a configuration file required by the software according to the own configuration of the user, the four-layer protocol (TCP/UDP) is implemented by lvs, and the seven-layer protocol (HTTP/HTTPs) is implemented by haproxy. Meanwhile, because the virtual machine as the carrier is built in the VPC (virtual private cloud) of each user, each user can create more than 20 listeners, and in the subsequent development, carrier virtual machines created by load balancing created by users can reach thousands of virtual machines. Therefore, not only the change of the contents of the profile but also the change of the format of the profile causes a series of problems. Therefore, the configuration cannot be simply defined only in the form of the template, and the dynamic modification of the template is supported, and the template hierarchy is extracted from the virtual machine and is placed on the pasture A layer for maintenance. Therefore, the content and format of the subsequent configuration file are changed, the template and the content are reorganized by the pastoral layer A and are transmitted to the service Agent (Agent) of the carrier virtual machine, and the Agent only needs to write the content transmitted by the pastoral layer A into the designated path without paying attention to the content, so that the configuration file of thousands of carrier virtual machines is dynamically updated without influencing the existing service.
An effective solution to the problems in the related art has not been proposed yet.
Disclosure of Invention
Aiming at the problems in the related art, the invention provides a soft load balancing dynamic issuing configuration method and a soft load balancing dynamic issuing configuration system, so as to overcome the technical problems in the prior related art.
Therefore, the invention adopts the following specific technical scheme:
according to an aspect of the present invention, a soft load balancing dynamic delivery configuration method is provided, which includes the following steps:
s1, judging the protocol type of the listener by creating the listener, and generating a virtual server cluster system or a front-end load balancing server by a four-layer protocol or a seven-layer protocol to package the content of the configuration file, the path of the configuration file, the content of the configuration file for self-starting of the service and the path into a request body;
s2, calling a predefined function of a virtual machine mirror image carrying service agent on the virtual machine according to a response protocol request by inquiring a management network IP corresponding to the virtual machine with balanced load;
s3, loading a service agent through a virtual machine mirror image to write the content of the configuration file and the path of the configuration file which are transmitted by the pastoral A into a specified file;
and S4, according to different protocols, selecting to restart the virtual server cluster system or the front-end load balancing server.
Further, the step of determining the protocol type of the listener by creating the listener, and generating a virtual server cluster system or a front-end load balancing server by using a four-layer protocol or a seven-layer protocol to encapsulate the content of the configuration file, the path of the configuration file, the content of the configuration file for service self-starting, and the path into a request body further includes the following steps:
s101, judging that the type of the monitoring protocol is a four-layer protocol by creating the monitoring protocol;
s102, reading relevant configuration and parameters, filling the relevant configuration and parameters into a virtual service cluster system template, and generating configuration file contents of a four-layer protocol;
s103, calculating the path of the configuration file content of the four-layer protocol;
s104, calculating the path of the configuration file of the four-layer protocol, and then generating the content of the self-starting service configuration file of the virtual service cluster system and the path of the configuration file;
and S105, encapsulating the content of the configuration file, the path of the configuration file, the content of the self-starting service configuration file and the path of the configuration file into a request body.
Further, the reading the relevant configuration and parameters, filling the relevant configuration and parameters into the virtual service cluster system template, and generating the configuration content of the four-layer protocol further includes the following steps:
reading port number and connection number configuration of the listener;
generating corresponding parameters according to the read port number of the listener and the server bound by the connection configuration;
and filling corresponding parameters generated by the server bound according to the read port number of the listener and the connection configuration into a template of the virtual service cluster system, and generating configuration contents of a four-layer protocol.
Further, the step of determining the protocol type of the listener by creating the listener, and generating a virtual server cluster system or a front-end load balancing server by using a four-layer protocol or a seven-layer protocol to encapsulate the content of the configuration file, the path of the configuration file, the content of the configuration file for service self-starting, and the path into a request body further includes the following steps:
s101', judging the type of the monitoring protocol to be a seven-layer protocol by creating the monitoring protocol;
s102', reading corresponding rules and parameters of the listener, filling the rules and parameters into a template of a front-end load balancing server, and generating configuration file contents of a seven-layer protocol;
s103', calculating a configuration file path of the configuration file content of the seven-layer protocol;
s104', calculating the configuration file path of the configuration file content of the seven-layer protocol, and generating the configuration file content and the configuration file path of the self-starting service of the front-end load balancing server;
s105', packaging the content of the configuration file, the path of the configuration file, the content of the self-starting service configuration file and the path of the configuration file into a request body.
Further, the reading of the corresponding rule and parameter of the listener and the filling of the rule and parameter into the template of the front-end load balancing server to generate the configuration file content of the seven-layer protocol further includes the following steps:
reading a port number rule, a protocol rule and a forwarding rule of the listener;
generating corresponding parameters according to the server bound by the read port number rule, protocol rule and forwarding rule of the listener;
and filling corresponding parameters generated by the server bound by the read port number rule, protocol rule and forwarding rule of the listener into a template of the front-end load balancing server, and generating the content of a configuration file of a seven-layer protocol.
Further, the step of writing the content of the configuration file and the path of the configuration file, which are transmitted from the herdsield a, into the specified file by the virtual machine mirror image-loading service agent further includes the following steps:
realizing the content of the configuration file and the path of the configuration file through the pastoral A;
encapsulating the realized content and path of the configuration file, the content and path of the self-starting service configuration file into a request body through a pastoral A, and sending the request body to a virtual machine mirror image loading service agent;
analyzing the request body sent by the pastoral A through a virtual machine mirror image carrying service agent;
and writing the configuration file content analyzed by the completion request body into a specified configuration file.
According to another aspect of the present invention, a soft load balancing dynamic delivery configuration system is provided, which includes:
the request body generation module judges the protocol type of the monitor by creating the monitor, and generates a virtual server cluster system or a front-end load balancing server by a four-layer protocol or a seven-layer protocol to package the content of the configuration file, the path of the configuration file, the content of the configuration file for self-starting service and the path into a request body;
the method comprises the steps of calling a function module, calling a predefined function of a virtual machine mirror image carrying service agent on a virtual machine according to a response protocol request by inquiring a management network IP corresponding to the virtual machine with balanced load;
the content and path writing module writes the content of the configuration file and the path of the configuration file which are transmitted in the pastoral A into a specified file by carrying a service agent through a virtual machine mirror image;
and the restarting module is used for selecting to restart the virtual server cluster system or the front-end load balancing server according to different protocols.
Further, the step of determining the protocol type of the listener by creating the listener, and generating a virtual server cluster system or a front-end load balancing server by using a four-layer protocol or a seven-layer protocol to encapsulate the content of the configuration file, the path of the configuration file, the content of the configuration file for service self-starting, and the path into a request body further includes the following steps:
s101, judging that the type of the monitoring protocol is a four-layer protocol by creating the monitoring protocol;
s102, reading related configuration and parameters, filling the related configuration and parameters into a virtual service cluster system (lvs) template, and generating configuration file contents of a four-layer protocol;
s103, calculating the path of the configuration file content of the four-layer protocol;
s104, calculating the path of the configuration file of the four-layer protocol, and then generating the content of the self-starting service configuration file of the virtual service cluster system and the path of the configuration file;
and S105, encapsulating the content of the configuration file, the path of the configuration file, the content of the self-starting service configuration file and the path of the configuration file into a request body.
Further, the step of determining the protocol type of the listener by creating the listener, and generating a virtual server cluster system or a front-end load balancing server by using a four-layer protocol or a seven-layer protocol to encapsulate the content of the configuration file, the path of the configuration file, the content of the configuration file for service self-starting, and the path into a request body further includes the following steps:
s101', judging the type of the monitoring protocol to be a seven-layer protocol by creating the monitoring protocol;
s102', reading corresponding rules and parameters of the listener, filling the rules and parameters into a template of a front-end load balancing server, and generating configuration file contents of a seven-layer protocol;
s103', calculating a configuration file path of the configuration file content of the seven-layer protocol;
s104', calculating the configuration file path of the configuration file content of the seven-layer protocol, and generating the configuration file content and the configuration file path of the self-starting service of the front-end load balancing server;
s105', packaging the content of the configuration file, the path of the configuration file, the content of the self-starting service configuration file and the path of the configuration file into a request body.
Further, the step of writing the content of the configuration file and the path of the configuration file, which are transmitted from the herdsield a, into the specified file by the virtual machine mirror image-loading service agent further includes the following steps: realizing the content of the configuration file and the path of the configuration file through the pastoral A;
encapsulating the realized content and path of the configuration file, the content and path of the self-starting service configuration file into a request body through a pastoral A, and sending the request body to a virtual machine mirror image loading service agent;
analyzing the request body sent by the pastoral A through a virtual machine mirror image carrying service agent;
and writing the configuration file content analyzed by the completion request body into a specified configuration file.
The invention has the beneficial effects that:
1. the virtual machine mirror image carrying service agent is only responsible for writing data transmitted from the pastoral layer A into the file of the designated path, and the content of the data file and the path of the data file are realized and controlled through the pastoral layer A, therefore, the upgrading content and format are transparent to the virtual machine layer, on one hand, no matter how the configuration content changes in the later period, the upgrading is needed, the stability of the mirror image can be ensured, on the other hand, the configuration file content and the configuration file path are realized and controlled by the pastoral layer A, the content of the configuration file can be dynamically generated according to different protocols and different bottom layers, the flexible configuration can be realized, and the existing configuration is not influenced; meanwhile, the virtual machine mirror image carrying service agent is simpler and more convenient.
2. The invention can generate configuration files corresponding to different drivers according to different monitoring protocols, namely a four-layer protocol and a seven-layer protocol, so that the four-layer protocol and the seven-layer protocol cannot influence each other, therefore, if the implementation of a bottom layer changes, for example, the seven-layer protocol is changed from a front-end load balancing server to a high-performance response protocol and a reverse proxy world wide web server, only the drivers of the seven-layer protocol need to be modified, and the four-layer startup cannot be influenced.
3. When the configuration format needs to be upgraded, the method only needs to adapt a new format on the pastoral layer A and upgrade the pastoral layer A, and cannot cause any influence on thousands of carrier virtual machines.
4. The invention can rapidly realize the upgrading of the content and the format of the configuration file, and the virtual machine has no perception; and the method can also interact with thousands of load balancing virtual machines simultaneously, and the performance cannot be influenced mutually.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed in the embodiments will be briefly described 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 to obtain other drawings without creative efforts.
Fig. 1 is a flowchart of a dynamic soft load balancing distribution configuration method according to an embodiment of the present invention;
fig. 2 is a system diagram of a soft load balancing dynamic delivery configuration system according to an embodiment of the present invention.
In the figure:
1. a request body generation module; 2. calling a function module; 3. a content and path write module; 4. and restarting the module.
Detailed Description
For further explanation of the various embodiments, the drawings which form a part of the disclosure and which are incorporated in and constitute a part of this specification, illustrate embodiments and, together with the description, serve to explain the principles of operation of the embodiments, and to enable others of ordinary skill in the art to understand the various embodiments and advantages of the invention, and, by reference to these figures, reference is made to the accompanying drawings, which are not to scale and wherein like reference numerals generally refer to like elements.
According to the embodiment of the invention, a soft load balancing dynamic issuing configuration method and a soft load balancing dynamic issuing configuration system are provided.
As shown in fig. 1-2, according to an aspect of the present invention, a soft load balancing dynamic delivery configuration method is provided, which includes the following steps:
s1, judging the protocol type of the listener by creating the listener, and generating a virtual server cluster system or a front-end load balancing server by a four-layer protocol or a seven-layer protocol to package the content of the configuration file, the path of the configuration file, the content of the configuration file for self-starting of the service and the path into a request body;
s2, calling a predefined function (api) of a virtual machine mirror image carrying service agent on the virtual machine according to a response protocol (http) request by inquiring a management network IP corresponding to the virtual machine bearing the balance;
s3, loading a service agent through a virtual machine mirror image to write the content of the configuration file and the path of the configuration file which are transmitted by the pastoral A into a specified file;
and S4, according to different protocols, selecting to restart the virtual server cluster system or the front-end load balancing server.
In one example, the creating a listener to determine a protocol type of the listener, and generating a virtual server cluster system or a front-end load balancing server through a four-layer protocol or a seven-layer protocol to encapsulate content of a configuration file, a path of the configuration file, content of the configuration file for service self-starting, and the path into a request body further includes the following steps:
step S101, judging that the type of the monitoring protocol is a four-layer protocol by creating the monitoring protocol;
s102, reading relevant configuration and parameters, filling the relevant configuration and parameters into a virtual service cluster system template, and generating configuration file contents of a four-layer protocol;
step S103, calculating the path of the configuration file content of the four-layer protocol;
step S104, calculating the path of the configuration file of the four-layer protocol, and then generating the content of the self-starting service configuration file of the virtual service cluster system and the path of the configuration file;
step S105, packaging the content of the configuration file, the path of the configuration file, the content of the self-starting service configuration file and the path of the configuration file into a request body.
In one example, the reading the relevant configuration and parameters, filling the relevant configuration and parameters into the virtual service cluster system template, and generating the configuration content of the four-layer protocol further includes the following steps:
reading port number and connection number configuration of the listener;
generating corresponding parameters according to the read port number of the listener and the server bound by the connection configuration;
and filling corresponding parameters generated by the server bound according to the read port number of the listener and the connection configuration into a template of the virtual service cluster system, and generating configuration contents of a four-layer protocol.
In one example, the creating a listener to determine a protocol type of the listener, and generating a virtual server cluster system or a front-end load balancing server through a four-layer protocol or a seven-layer protocol to encapsulate content of a configuration file, a path of the configuration file, content of the configuration file for service self-starting, and the path into a request body further includes the following steps:
s101', judging the type of the monitoring protocol to be a seven-layer protocol by creating the monitoring protocol;
s102', reading corresponding rules and parameters of the listener, filling the rules and parameters into a template of a front-end load balancing server, and generating configuration file contents of a seven-layer protocol;
s103', calculating a configuration file path of the configuration file content of the seven-layer protocol;
s104', calculating the configuration file path of the configuration file content of the seven-layer protocol, and generating the configuration file content and the configuration file path of the self-starting service of the front-end load balancing server;
s105', packaging the content of the configuration file, the path of the configuration file, the content of the self-starting service configuration file and the path of the configuration file into a request body.
In one example, the reading of the corresponding rule and parameter of the listener, and the filling of the rule and parameter into the template of the front-end load balancing server, and the generating of the configuration file content of the seven-layer protocol further include the following steps:
reading a port number rule, a protocol rule and a forwarding rule of the listener;
generating corresponding parameters according to the server bound by the read port number rule, protocol rule and forwarding rule of the listener;
and filling corresponding parameters generated by the server bound by the read port number rule, protocol rule and forwarding rule of the listener into a template of the front-end load balancing server, and generating the content of a configuration file of a seven-layer protocol.
In one example, the step of writing the content of the configuration file and the path of the configuration file, which are imported from the herdsield a, into the specified file by the virtual machine image-loading service agent further includes the following steps:
realizing the content of the configuration file and the path of the configuration file through the pastoral A;
encapsulating the realized content and path of the configuration file, the content and path of the self-starting service configuration file into a request body through a pastoral A, and sending the request body to a virtual machine mirror image loading service agent;
analyzing the request body sent by the pastoral A through a virtual machine mirror image carrying service agent;
and writing the configuration file content analyzed by the completion request body into a specified configuration file.
According to another aspect of the present invention, a soft load balancing dynamic delivery configuration system is provided, which includes:
the request body generation module 1 judges the protocol type of the monitor by creating the monitor, and generates a virtual server cluster system or a front-end load balancing server by a four-layer protocol or a seven-layer protocol to package the content of the configuration file, the path of the configuration file, the content of the configuration file for self-starting service and the path into a request body;
calling a function module 2, calling a predefined function of a virtual machine mirror image carrying service agent on the virtual machine according to a response protocol request by inquiring a management network IP corresponding to the virtual machine with balanced load;
the content and path writing module 3 writes the content of the configuration file and the path of the configuration file which are transmitted from the pastoral A into a specified file by carrying a service agent through a virtual machine mirror image;
and the restarting module 4 selects to restart the virtual server cluster system or the front-end load balancing server according to different protocols.
In one example, the creating a listener to determine a protocol type of the listener, and generating a virtual server cluster system or a front-end load balancing server through a four-layer protocol or a seven-layer protocol to encapsulate content of a configuration file, a path of the configuration file, content of the configuration file for service self-starting, and the path into a request body further includes the following steps:
s101, judging that the type of the monitoring protocol is a four-layer protocol by creating the monitoring protocol;
s102, reading relevant configuration and parameters, filling the relevant configuration and parameters into a virtual service cluster system template, and generating configuration file contents of a four-layer protocol;
s103, calculating the path of the configuration file content of the four-layer protocol;
s104, calculating the path of the configuration file of the four-layer protocol, and then generating the content of the self-starting service configuration file of the virtual service cluster system and the path of the configuration file;
and S105, encapsulating the content of the configuration file, the path of the configuration file, the content of the self-starting service configuration file and the path of the configuration file into a request body.
In one example, the creating a listener to determine a protocol type of the listener, and generating a virtual server cluster system or a front-end load balancing server through a four-layer protocol or a seven-layer protocol to encapsulate content of a configuration file, a path of the configuration file, content of the configuration file for service self-starting, and the path into a request body further includes the following steps:
s101', judging the type of the monitoring protocol to be a seven-layer protocol by creating the monitoring protocol;
s102', reading corresponding rules and parameters of the listener, filling the rules and parameters into a template of a front-end load balancing server, and generating configuration file contents of a seven-layer protocol;
s103', calculating a configuration file path of the configuration file content of the seven-layer protocol;
s104', calculating the configuration file path of the configuration file content of the seven-layer protocol, and generating the configuration file content and the configuration file path of the self-starting service of the front-end load balancing server;
s105', packaging the content of the configuration file, the path of the configuration file, the content of the self-starting service configuration file and the path of the configuration file into a request body.
In one example, the step of writing the content of the configuration file and the path of the configuration file, which are imported from the herdsield a, into the specified file by the virtual machine image-loading service agent further includes the following steps: realizing the content of the configuration file and the path of the configuration file through the pastoral A;
encapsulating the realized content and path of the configuration file, the content and path of the self-starting service configuration file into a request body through a pastoral A, and sending the request body to a virtual machine mirror image loading service agent;
analyzing the request body sent by the pastoral A through a virtual machine mirror image carrying service agent;
and writing the configuration file content analyzed by the completion request body into a specified configuration file.
In summary, with the above technical solution of the present invention, the virtual machine image-loading service agent (virtual machine image-loading service agent) of the present invention is only responsible for writing data transmitted from the farm a layer into a file with a specified path, and the content of the data file and the path of the data file are both implemented and controlled through the farm a, so that the upgrade content and format are transparent to the farm a layer, and on one hand, no upgrade is needed no matter how the configuration content changes in the later stage, and the stability of the image can be ensured, and on the other hand, the configuration file content and the configuration file path are both implemented and controlled by the farm a, and the content of the configuration file can be dynamically generated according to different protocols and different bottom layers, so as to implement flexible configuration without any influence on the existing configuration; meanwhile, the virtual machine mirror image carrying service agent is simpler and more convenient. The invention can respectively correspond to different drivers to generate configuration files according to different monitoring protocols, namely a four-layer protocol and a seven-layer protocol, so that the four-layer protocol (TCP/UDP) and the seven-layer protocol (HTTP/HTTPS) cannot influence each other, therefore, if the implementation of a bottom layer changes, for example, the seven-layer protocol is changed from a front-end load balancing server (haproxy) into a high-performance response protocol and a reverse proxy world wide web server (nginx), only the drivers of the seven-layer protocol need to be modified, and the four-layer startup is not influenced. When the configuration format needs to be upgraded, the method only needs to adapt a new format on the pastoral layer A and upgrade the pastoral layer A, and cannot cause any influence on thousands of carrier virtual machines. The invention can rapidly realize the upgrading of the content and the format of the configuration file, and the virtual machine has no perception; and the method can also interact with thousands of load balancing virtual machines simultaneously, and the performance cannot be influenced mutually.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (10)
1. A soft load balancing dynamic issuing configuration method is characterized in that the soft load balancing dynamic issuing configuration method comprises the following steps:
s1, judging the protocol type of the listener by creating the listener, and generating a virtual server cluster system or a front-end load balancing server by a four-layer protocol or a seven-layer protocol to package the content of the configuration file, the path of the configuration file, the content of the configuration file for self-starting of the service and the path into a request body;
s2, calling a predefined function of a virtual machine mirror image carrying service agent on the virtual machine according to a response protocol request by inquiring a management network IP corresponding to the virtual machine with balanced load;
s3, loading a service agent through a virtual machine mirror image to write the content of the configuration file and the path of the configuration file which are transmitted by the pastoral A into a specified file;
and S4, according to different protocols, selecting to restart the virtual server cluster system or the front-end load balancing server.
2. The soft load balancing dynamic delivery configuration method according to claim 1, wherein the step of determining the protocol type of the listener by creating the listener, and generating a virtual server cluster system or a front end load balancing server by a four-layer protocol or a seven-layer protocol to encapsulate the content of the configuration file, the path of the configuration file, the content of the configuration file for service self-starting, and the path into a request body further comprises the steps of:
s101, judging that the type of the monitoring protocol is a four-layer protocol by creating the monitoring protocol;
s102, reading relevant configuration and parameters, filling the relevant configuration and parameters into a virtual service cluster system template, and generating configuration file contents of a four-layer protocol;
s103, calculating the path of the configuration file content of the four-layer protocol;
s104, calculating the path of the configuration file of the four-layer protocol, and then generating the content of the self-starting service configuration file of the virtual service cluster system and the path of the configuration file;
and S105, encapsulating the content of the configuration file, the path of the configuration file, the content of the self-starting service configuration file and the path of the configuration file into a request body.
3. The method according to claim 2, wherein the reading of the relevant configuration and parameters, the filling of the read relevant configuration and parameters into the virtual service cluster system template, and the generation of the configuration content of the four-layer protocol further comprises the following steps:
reading port number and connection number configuration of the listener;
generating corresponding parameters according to the read port number of the listener and the server bound by the connection configuration;
and filling corresponding parameters generated by the server bound according to the read port number of the listener and the connection configuration into a template of the virtual service cluster system, and generating configuration contents of a four-layer protocol.
4. The soft load balancing dynamic delivery configuration method according to claim 1, wherein the step of determining the protocol type of the listener by creating the listener, and generating a virtual server cluster system or a front end load balancing server by a four-layer protocol or a seven-layer protocol to encapsulate the content of the configuration file, the path of the configuration file, the content of the configuration file for service self-starting, and the path into a request body further comprises the steps of:
s101', judging the type of the monitoring protocol to be a seven-layer protocol by creating the monitoring protocol;
s102', reading corresponding rules and parameters of the listener, filling the rules and parameters into a template of a front-end load balancing server, and generating configuration file contents of a seven-layer protocol;
s103', calculating a configuration file path of the configuration file content of the seven-layer protocol;
s104', calculating the configuration file path of the configuration file content of the seven-layer protocol, and generating the configuration file content and the configuration file path of the self-starting service of the front-end load balancing server;
s105', packaging the content of the configuration file, the path of the configuration file, the content of the self-starting service configuration file and the path of the configuration file into a request body.
5. The soft load balancing dynamic delivery configuration method according to claim 4, wherein the reading of the corresponding rules and parameters of the listener is filled into a template of the front-end load balancing server, and the generation of the configuration file content of the seven-layer protocol further comprises the following steps:
reading a port number rule, a protocol rule and a forwarding rule of the listener;
generating corresponding parameters according to the server bound by the read port number rule, protocol rule and forwarding rule of the listener;
and filling corresponding parameters generated by the server bound by the read port number rule, protocol rule and forwarding rule of the listener into a template of the front-end load balancing server, and generating the content of a configuration file of a seven-layer protocol.
6. The soft load balancing dynamic delivery configuration method according to claim 1, wherein the writing of the content of the configuration file and the path of the configuration file, which are transmitted from the herdsield a, into the specified file by the virtual machine image-mounted service agent further comprises the following steps:
realizing the content of the configuration file and the path of the configuration file through the pastoral A;
encapsulating the realized content and path of the configuration file, the content and path of the self-starting service configuration file into a request body through a pastoral A, and sending the request body to a virtual machine mirror image loading service agent;
analyzing the request body sent by the pastoral A through a virtual machine mirror image carrying service agent;
and writing the configuration file content analyzed by the completion request body into a specified configuration file.
7. A soft load balancing dynamic issuing configuration system is characterized in that the soft load balancing dynamic issuing configuration system comprises:
the request body generation module (1) judges the protocol type of the monitor by creating the monitor, and generates a virtual server cluster system or a front-end load balancing server by a four-layer protocol or a seven-layer protocol to package the content of the configuration file, the path of the configuration file, the content of the configuration file for self-starting service and the path into a request body;
calling a function module (2), calling a predefined function of a virtual machine mirror image carrying service agent on the virtual machine according to a response protocol request by inquiring a management network IP corresponding to the virtual machine with balanced load;
the content and path writing module (3) writes the content of the configuration file and the path of the configuration file which are transmitted from the pastoral A into a specified file by carrying a service agent through a virtual machine mirror image;
and the restarting module (4) selects to restart the virtual server cluster system or the front-end load balancing server according to different protocols.
8. The system according to claim 7, wherein the step of determining the protocol type of the listener by creating the listener, and generating a virtual server cluster system or a front-end load balancing server by using a four-layer protocol or a seven-layer protocol to encapsulate the content of the configuration file, the path of the configuration file, the content of the configuration file for service self-starting, and the path into a request body further comprises the steps of:
s101, judging that the type of the monitoring protocol is a four-layer protocol by creating the monitoring protocol;
s102, reading relevant configuration and parameters, filling the relevant configuration and parameters into a virtual service cluster system template, and generating configuration file contents of a four-layer protocol;
s103, calculating the path of the configuration file content of the four-layer protocol;
s104, calculating the path of the configuration file of the four-layer protocol, and then generating the content of the self-starting service configuration file of the virtual service cluster system and the path of the configuration file;
and S105, encapsulating the content of the configuration file, the path of the configuration file, the content of the self-starting service configuration file and the path of the configuration file into a request body.
9. The system according to claim 7, wherein the step of determining the protocol type of the listener by creating the listener, and generating a virtual server cluster system or a front-end load balancing server by using a four-layer protocol or a seven-layer protocol to encapsulate the content of the configuration file, the path of the configuration file, the content of the configuration file for service self-starting, and the path into a request body further comprises the steps of:
s101', judging the type of the monitoring protocol to be a seven-layer protocol by creating the monitoring protocol;
s102', reading corresponding rules and parameters of the listener, filling the rules and parameters into a template of a front-end load balancing server, and generating configuration file contents of a seven-layer protocol;
s103', calculating a configuration file path of the configuration file content of the seven-layer protocol;
s104', calculating the configuration file path of the configuration file content of the seven-layer protocol, and generating the configuration file content and the configuration file path of the self-starting service of the front-end load balancing server;
s105', packaging the content of the configuration file, the path of the configuration file, the content of the self-starting service configuration file and the path of the configuration file into a request body.
10. The soft load balancing dynamic delivery configuration system according to claim 7, wherein the step of writing the content of the configuration file and the path of the configuration file, which are transmitted from the herdsield a, into the specified file by the virtual machine image-mounted service agent further comprises the steps of: realizing the content of the configuration file and the path of the configuration file through the pastoral A;
encapsulating the realized content and path of the configuration file, the content and path of the self-starting service configuration file into a request body through a pastoral A, and sending the request body to a virtual machine mirror image loading service agent;
analyzing the request body sent by the pastoral A through a virtual machine mirror image carrying service agent;
and writing the configuration file content analyzed by the completion request body into a specified configuration file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010926828.5A CN112099915B (en) | 2020-09-07 | 2020-09-07 | Soft load balancing dynamic issuing configuration method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010926828.5A CN112099915B (en) | 2020-09-07 | 2020-09-07 | Soft load balancing dynamic issuing configuration method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112099915A true CN112099915A (en) | 2020-12-18 |
CN112099915B CN112099915B (en) | 2022-10-25 |
Family
ID=73758537
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010926828.5A Active CN112099915B (en) | 2020-09-07 | 2020-09-07 | Soft load balancing dynamic issuing configuration method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112099915B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112714028A (en) * | 2021-01-29 | 2021-04-27 | 紫光云技术有限公司 | Monitoring method for load balancing SLB flow and data packet parameters |
CN113742079A (en) * | 2021-09-10 | 2021-12-03 | 安超云软件有限公司 | Method for realizing K8S seven-layer load balancing strategy and application |
CN114826919A (en) * | 2022-03-21 | 2022-07-29 | 浪潮思科网络科技有限公司 | SDN-based load balancing software hosting method, device, equipment and medium |
CN115604244A (en) * | 2022-07-01 | 2023-01-13 | 山东爱特云翔信息技术有限公司(Cn) | Method, system, device and storage medium for OpenStack adaptive load balancing service |
CN113742079B (en) * | 2021-09-10 | 2024-05-03 | 安超云软件有限公司 | Method for realizing K8S seven-layer load balancing strategy and application |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130007506A1 (en) * | 2011-07-01 | 2013-01-03 | Microsoft Corporation | Managing recovery virtual machines in clustered environment |
CN106790595A (en) * | 2016-12-29 | 2017-05-31 | 上海理想信息产业(集团)有限公司 | A kind of Docker containers active load balancer and method |
CN107547661A (en) * | 2017-10-12 | 2018-01-05 | 福建富士通信息软件有限公司 | A kind of container payload balance realizing method of high-performance and High Availabitity |
CN108989430A (en) * | 2018-07-19 | 2018-12-11 | 北京百度网讯科技有限公司 | Load-balancing method, device and storage medium |
CN109451065A (en) * | 2018-12-26 | 2019-03-08 | 中电福富信息科技有限公司 | A kind of soft load balancing shunts automated system and its operation method |
CN111274027A (en) * | 2020-01-09 | 2020-06-12 | 山东汇贸电子口岸有限公司 | Multi-live load balancing method and system applied to openstack cloud platform |
CN111427949A (en) * | 2019-01-09 | 2020-07-17 | 杭州海康威视数字技术股份有限公司 | Method and device for creating big data service |
-
2020
- 2020-09-07 CN CN202010926828.5A patent/CN112099915B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130007506A1 (en) * | 2011-07-01 | 2013-01-03 | Microsoft Corporation | Managing recovery virtual machines in clustered environment |
CN106790595A (en) * | 2016-12-29 | 2017-05-31 | 上海理想信息产业(集团)有限公司 | A kind of Docker containers active load balancer and method |
CN107547661A (en) * | 2017-10-12 | 2018-01-05 | 福建富士通信息软件有限公司 | A kind of container payload balance realizing method of high-performance and High Availabitity |
CN108989430A (en) * | 2018-07-19 | 2018-12-11 | 北京百度网讯科技有限公司 | Load-balancing method, device and storage medium |
CN109451065A (en) * | 2018-12-26 | 2019-03-08 | 中电福富信息科技有限公司 | A kind of soft load balancing shunts automated system and its operation method |
CN111427949A (en) * | 2019-01-09 | 2020-07-17 | 杭州海康威视数字技术股份有限公司 | Method and device for creating big data service |
CN111274027A (en) * | 2020-01-09 | 2020-06-12 | 山东汇贸电子口岸有限公司 | Multi-live load balancing method and system applied to openstack cloud platform |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112714028A (en) * | 2021-01-29 | 2021-04-27 | 紫光云技术有限公司 | Monitoring method for load balancing SLB flow and data packet parameters |
CN113742079A (en) * | 2021-09-10 | 2021-12-03 | 安超云软件有限公司 | Method for realizing K8S seven-layer load balancing strategy and application |
CN113742079B (en) * | 2021-09-10 | 2024-05-03 | 安超云软件有限公司 | Method for realizing K8S seven-layer load balancing strategy and application |
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 |
CN115604244A (en) * | 2022-07-01 | 2023-01-13 | 山东爱特云翔信息技术有限公司(Cn) | Method, system, device and storage medium for OpenStack adaptive load balancing service |
Also Published As
Publication number | Publication date |
---|---|
CN112099915B (en) | 2022-10-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112099915B (en) | Soft load balancing dynamic issuing configuration method and system | |
US10587544B2 (en) | Message processing method, processing server, terminal, and storage medium | |
RU2436148C2 (en) | Adaptive gateway for switching transactions and data on untrusted networks using context-based rules | |
EP1303096B1 (en) | Virtual network with adaptive dispatcher | |
JP2022522368A (en) | Mobile Edge Computing Node Selection Methods, Devices and Systems | |
US7899047B2 (en) | Virtual network with adaptive dispatcher | |
WO2017054531A1 (en) | Yang model-based compiling method, and corresponding interface, component, and system | |
EP2853074B1 (en) | Methods for optimizing service of content requests and devices thereof | |
AU2009202285A1 (en) | Java application framework for use in a content delivery network (CDN) | |
TW202038581A (en) | Management client, and device monitoring system and method | |
CN110728558B (en) | Virtual package transmitting method, device, equipment and storage medium | |
CN111367685B (en) | Interface calling method and device, computer equipment and storage medium | |
CN101542438B (en) | A method, apparatus and computer program for modifying an endpoint reference representing a web service endpoint | |
CN114338689A (en) | Session holding method, apparatus, device, medium, and program product | |
CN113556359A (en) | Communication protocol conversion method, device, system and gateway device | |
CN111736844B (en) | Database cloud service standard interface and implementation method | |
JP2004246747A (en) | Wrapping method and system of existing service | |
CN115242882A (en) | Method and device for accessing k8s container environment based on transport layer route | |
CN110022332A (en) | A kind of Hyper text transfer security protocol Proxy Method, device, equipment and medium | |
CN108173900A (en) | A kind of method and apparatus of transparent migration | |
CN111988283A (en) | Data transmission method, system, device and computer readable storage medium | |
CN111414262A (en) | Service calling method and device | |
CN113254019A (en) | Method and device for registering front-end data stream state file | |
CN114756309B (en) | Service calling method, framework, device and storage medium | |
CN117135156B (en) | Edge cluster nano-tube method, system, computer readable storage medium and electronic equipment based on publish/subscribe message protocol |
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 |