CN112099915B - Soft load balancing dynamic issuing configuration method and system - Google Patents
Soft load balancing dynamic issuing configuration method and system Download PDFInfo
- Publication number
- CN112099915B CN112099915B CN202010926828.5A CN202010926828A CN112099915B CN 112099915 B CN112099915 B CN 112099915B CN 202010926828 A CN202010926828 A CN 202010926828A CN 112099915 B CN112099915 B CN 112099915B
- Authority
- CN
- China
- Prior art keywords
- configuration file
- content
- path
- layer protocol
- configuration
- 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.)
- Active
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
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer And Data Communications (AREA)
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. At present, there are packets of haproxy and lvs in the mirror image, but to actually start a listener, a configuration file required by software needs to be generated according to the own configuration of a user, which is implemented by lvs adopted by a four-layer protocol (TCP/UDP), and which is implemented by haproxy adopted by a seven-layer protocol (HTTP/HTTPs). 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 one aspect of the present invention, a soft load balancing dynamic delivery configuration method is provided, which comprises the following steps:
s1, judging the protocol type of a monitor by creating the monitor, generating a virtual server cluster system or a front-end load balancing server by a four-layer protocol or a seven-layer protocol, and encapsulating the content of a 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;
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, writing the content of the configuration file and the path of the configuration file which are transmitted in the pastoral A into a specified file through a virtual machine mirror image carrying service agent;
and S4, according to different protocols, restarting 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 monitor, 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, there is provided a soft load balancing dynamic delivery configuration system, comprising:
the request body generation module is used for judging the protocol type of the monitor by creating the monitor, 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;
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 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, 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 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 monitor, 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 a pasture field layer A into a file of a designated path, and the content of the data file and the path of the data file are realized and controlled through the pasture field A, so that 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 pasture field 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 invention only needs to adapt a new format on the pastoral A layer and upgrade the pastoral A layer, 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 a monitor by creating the monitor, generating a virtual server cluster system or a front-end load balancing server by a four-layer protocol or a seven-layer protocol, and encapsulating the content of a 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;
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 with balanced load;
s3, writing the content of the configuration file and the path of the configuration file which are transmitted in the pastoral A into a specified file through a virtual machine mirror image carrying service agent;
and S4, according to different protocols, restarting the virtual server cluster system or the front-end load balancing server.
In one example, the determining, by creating a listener, 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-start, 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, after calculating the path of the configuration file of the four-layer protocol, 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 generating corresponding parameters according to the read port number of the listener and the server bound by the connection configuration, filling the parameters 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 the 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 filling the corresponding rules and parameters of the read listener into a 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.
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, there is provided a soft load balancing dynamic delivery configuration system, comprising:
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 through the virtual machine mirror image carrying service agent;
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 determining, by creating a listener, 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-start, 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 invention only needs to adapt a new format on the pastoral A layer and upgrade the pastoral A layer, 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 (8)
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 a monitor by creating the monitor, generating a virtual server cluster system or a front-end load balancing server by a four-layer protocol or a seven-layer protocol, and encapsulating the content of a 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;
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, writing the content of the configuration file and the path of the configuration file which are transmitted in the pastoral A into a specified file through a virtual machine mirror image carrying service agent;
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 carrying 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;
writing the configuration file content analyzed by the request body into a specified configuration file;
and S4, according to different protocols, restarting 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 soft load balancing dynamic issuing configuration method according to claim 2, wherein the reading of the relevant configuration and parameters, the filling into the virtual service cluster system template, and the generation of the configuration content of the four-layer protocol further comprise 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. A soft load balancing dynamic issuing configuration system is characterized in that the soft load balancing dynamic issuing configuration system comprises:
the system comprises a request body generation module (1), a virtual server cluster system or a front-end load balancing server, a request body generation module and a service self-starting module, wherein the request body generation module is used for judging the protocol type of a monitor by creating the monitor, 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 a configuration file, the path of the configuration file, the content of the configuration file for self-starting the 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 through the virtual machine mirror image carrying service agent;
the step of writing the content of the configuration file and the path of the configuration file which are transmitted from the herd field A into the appointed file by the virtual machine mirror image carrying 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;
writing the configuration file content analyzed by the request body into a specified configuration file;
and the restarting module (4) selects to restart the virtual server cluster system or the front-end load balancing server according to different protocols.
7. The system according to claim 6, 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-start, 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.
8. The system according to claim 6, 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-start, 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 the configuration file path of the configuration file content of the seven-layer protocol;
s104', after calculating the configuration file path of the configuration file content of the seven-layer protocol, 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.
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 CN112099915A (en) | 2020-12-18 |
CN112099915B true 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) |
Families Citing this family (3)
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 |
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 |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9176829B2 (en) * | 2011-07-01 | 2015-11-03 | Microsoft Technology Licensing, Llc | Managing recovery virtual machines in clustered environment |
CN106790595B (en) * | 2016-12-29 | 2020-12-22 | 上海理想信息产业(集团)有限公司 | Docker container active load balancing device and method |
CN107547661B (en) * | 2017-10-12 | 2020-05-08 | 中电福富信息科技有限公司 | Container load balancing implementation method |
CN108989430B (en) * | 2018-07-19 | 2022-01-25 | 北京百度网讯科技有限公司 | Load balancing method, device and storage medium |
CN109451065B (en) * | 2018-12-26 | 2021-06-01 | 中电福富信息科技有限公司 | Soft load balancing and shunting automation system and operation method thereof |
CN111427949B (en) * | 2019-01-09 | 2023-10-20 | 杭州海康威视数字技术股份有限公司 | 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 |
-
2020
- 2020-09-07 CN CN202010926828.5A patent/CN112099915B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN112099915A (en) | 2020-12-18 |
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 | |
EP1303096B1 (en) | Virtual network with adaptive dispatcher | |
CN111542064B (en) | Container arrangement management system and arrangement method for wireless access network | |
RU2436148C2 (en) | Adaptive gateway for switching transactions and data on untrusted networks using context-based rules | |
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 | |
TW202038581A (en) | Management client, and device monitoring system and method | |
CN107451169A (en) | A kind of athletic competition information issuing system general-purpose platform | |
CN110728558B (en) | Virtual package transmitting method, device, equipment and storage medium | |
CN108804100B (en) | Method and device for creating interface element, storage medium and mobile terminal | |
CN108234149A (en) | Network request management method and device | |
CN111367685B (en) | Interface calling method and device, computer equipment and storage medium | |
CN113076163A (en) | Card rendering method and device | |
WO2015117522A1 (en) | Parameter configuration data processing method and device, and parameter configuration method and device | |
CN101542438B (en) | A method, apparatus and computer program for modifying an endpoint reference representing a web service endpoint | |
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 | |
CN113037834A (en) | Web page state updating method and device based on distributed instant push | |
CN106648610B (en) | Method and device for remotely calling and responding functional interface | |
CN110022332A (en) | A kind of Hyper text transfer security protocol Proxy Method, device, equipment and medium | |
CN115242882A (en) | Method and device for accessing k8s container environment based on transport layer route | |
CN108173900A (en) | A kind of method and apparatus of transparent migration | |
CN111988283A (en) | Data transmission method, system, device and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |