CN118101659A - Load balancing task issuing method and device, computer equipment and storage medium - Google Patents

Load balancing task issuing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN118101659A
CN118101659A CN202410224617.5A CN202410224617A CN118101659A CN 118101659 A CN118101659 A CN 118101659A CN 202410224617 A CN202410224617 A CN 202410224617A CN 118101659 A CN118101659 A CN 118101659A
Authority
CN
China
Prior art keywords
load balancing
task
equipment
configuration file
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.)
Pending
Application number
CN202410224617.5A
Other languages
Chinese (zh)
Inventor
李凯祺
陈�峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN202410224617.5A priority Critical patent/CN118101659A/en
Publication of CN118101659A publication Critical patent/CN118101659A/en
Pending legal-status Critical Current

Links

Landscapes

  • Supply And Distribution Of Alternating Current (AREA)

Abstract

The disclosure provides a load balancing task issuing method, a load balancing task issuing device, computer equipment and a storage medium. The method comprises the following steps: receiving load balancing configuration data for carrying out load balancing configuration on the server, wherein the server comprises the load balancing configuration equipment and load balancing equipment; generating at least one load balancing configuration file according to the load balancing configuration data, wherein the load balancing configuration file comprises at least one load balancing task and corresponding load balancing equipment; and issuing the load balancing task in the load balancing configuration file to corresponding load balancing equipment through an automatic operation and maintenance tool so that the corresponding load balancing equipment executes the load balancing task. The method can realize more accurate and efficient automatic generation and issuing of the load balancing task, and can meet the effect of high concurrency requirements of the server.

Description

Load balancing task issuing method and device, computer equipment and storage medium
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a method and device for issuing a load balancing task, a computer device and a storage medium.
Background
With the rapid development of digitization, enterprises are increasingly competing, and the traditional operation mode cannot meet the market demand. Therefore, the digital transformation is the key point for improving the competitiveness of enterprises. Load balancing is an important basic measure for digital construction. With the rapid growth of internet traffic, many enterprises meet the high concurrency demands by creating load balancing configurations on load balancing devices.
In the related art, load balancing task codes are usually written manually by operation staff and issued to corresponding load balancing devices, so that the load balancing devices execute corresponding load balancing tasks. However, the manner of manually writing codes to realize the issuing of the load balancing task has the problems of low efficiency and low accuracy.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides a method, an apparatus, a computer device, and a storage medium for issuing a load balancing task.
According to a first aspect of an embodiment of the present disclosure, the present application provides a load balancing task issuing method, which is applied to a load balancing configuration device of a server, and the method includes:
Receiving load balancing configuration data for carrying out load balancing configuration on the server, wherein the server comprises the load balancing configuration equipment and load balancing equipment;
Generating at least one load balancing configuration file according to the load balancing configuration data, wherein the load balancing configuration file comprises at least one load balancing task and corresponding load balancing equipment;
And issuing the load balancing task in the load balancing configuration file to corresponding load balancing equipment through an automatic operation and maintenance tool so that the corresponding load balancing equipment executes the load balancing task.
In combination with any one of the embodiments of the present disclosure, the generating at least one load balancing configuration file according to the load balancing configuration data includes:
generating at least one load balancing task according to the load balancing configuration data;
and generating at least one load balancing configuration file according to the task allocation data in the load balancing configuration data and the at least one load balancing task.
In combination with any one of the embodiments of the present disclosure, the issuing the load balancing task in the load balancing configuration file to a corresponding load balancing device, so that the corresponding load balancing device executes the load balancing task, includes:
According to the load balancing configuration file, determining an equipment IP address corresponding to the load balancing task in the load balancing configuration file;
according to the equipment IP address, searching for load balancing equipment corresponding to the load balancing task, and establishing connection with the load balancing equipment;
and issuing the load balancing task in the load balancing configuration file to corresponding load balancing equipment so as to enable the corresponding load balancing equipment to execute the load balancing task.
In combination with any one of the embodiments of the present disclosure, the issuing the load balancing task in the load balancing configuration file to a corresponding load balancing device, so that the corresponding load balancing device executes the load balancing task, includes:
And sending the load balancing task in the load balancing configuration file to corresponding load balancing equipment through a RESTful interface so that the corresponding load balancing equipment executes the load balancing task.
In combination with any of the embodiments of the present disclosure, the method further comprises:
performing standard judgment on the load balancing configuration data in the load balancing configuration file through the automatic operation and maintenance tool;
Outputting error prompt information under the condition that the load balancing configuration data is judged to be out of specification; the error prompt information is used for prompting that the load balancing configuration data does not accord with the specification.
In combination with any of the embodiments of the present disclosure, the method further comprises:
Storing the load balancing configuration file into a preset storage area;
before the load balancing task in the load balancing configuration file is issued to the corresponding load balancing device through the automatic operation and maintenance tool, so that the corresponding load balancing device executes the load balancing task, the method further comprises:
and acquiring the load balancing configuration file in the preset storage area through the automatic operation and maintenance tool.
In combination with any of the embodiments of the present disclosure, the method further comprises:
Acquiring a task execution result fed back by each load balancing device through the automatic operation and maintenance tool;
And outputting a task execution result of each load balancing device to prompt the task execution result of each load balancing device.
In combination with any of the embodiments of the present disclosure, the method further comprises:
Acquiring configuration information of load balancing equipment corresponding to each load balancing task in the load balancing configuration file;
and under the condition that the configuration information of the load balancing equipment is different from the load balancing task corresponding to the load balancing equipment, modifying the configuration information of the load balancing equipment corresponding to the load balancing task according to the load balancing task.
In connection with any embodiment of the disclosure, the automated operation tool comprises Ansible.
In a second aspect, the present application further provides a load balancing task issuing device, including:
the data receiving module is used for receiving load balancing configuration data for carrying out load balancing configuration on the server, wherein the server comprises load balancing configuration equipment and load balancing equipment;
the file generation module is used for generating at least one load balancing configuration file according to the load balancing configuration data, wherein the load balancing configuration file comprises at least one load balancing task and corresponding load balancing equipment;
And the task issuing module is used for issuing the load balancing task in the load balancing configuration file to the corresponding load balancing equipment through an automatic operation and maintenance tool so as to enable the corresponding load balancing equipment to execute the load balancing task.
In one embodiment, the file generating module includes:
The task generating unit is used for generating at least one load balancing task according to the load balancing configuration data;
And the file generation unit is used for generating at least one load balancing configuration file according to the task allocation data in the load balancing configuration data and the at least one load balancing task.
In one embodiment, the task issuing module includes:
The address determining unit is used for determining the equipment IP address corresponding to the load balancing task in the load balancing configuration file according to the load balancing configuration file;
The connection establishment unit is used for searching the load balancing equipment corresponding to the load balancing task according to the equipment IP address and establishing connection with the load balancing equipment;
And the task issuing unit is used for issuing the load balancing task in the load balancing configuration file to the corresponding load balancing equipment so as to enable the corresponding load balancing equipment to execute the load balancing task.
In one embodiment, the task issuing unit is further configured to:
And sending the load balancing task in the load balancing configuration file to corresponding load balancing equipment through a RESTful interface so that the corresponding load balancing equipment executes the load balancing task.
In one embodiment, the task issuing module further includes:
The information output unit is used for carrying out standard judgment on the load balancing configuration data in the load balancing configuration file through the automatic operation and maintenance tool; outputting error prompt information under the condition that the load balancing configuration data is judged to be out of specification; the error prompt information is used for prompting that the load balancing configuration data does not accord with the specification.
In one embodiment, the load balancing task issuing device further includes:
the file storage module is used for storing the load balancing configuration file into a preset storage area;
Before the task issuing module, the load balancing task issuing device further comprises:
And the file acquisition module is used for acquiring the load balancing configuration file in the preset storage area through the automatic operation and maintenance tool.
In one embodiment, the load balancing task issuing device further includes:
the result output module is used for acquiring a task execution result fed back by each load balancing device through the automatic operation and maintenance tool; and outputting a task execution result of each load balancing device to prompt the task execution result of each load balancing device.
In one embodiment, the load balancing task issuing device further includes:
The configuration modification module is used for acquiring configuration information of the load balancing equipment corresponding to each load balancing task in the load balancing configuration file; and under the condition that the configuration information of the load balancing equipment is different from the load balancing task corresponding to the load balancing equipment, modifying the configuration information of the load balancing equipment corresponding to the load balancing task according to the load balancing task.
In one embodiment, the automated operation tool comprises Ansible.
In a third aspect, the application provides a computer program product comprising computer programs/instructions which when executed by a processor implement the steps of the method of any of the embodiments.
In a fourth aspect, the present application provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method according to any of the embodiments described above when the program is executed by the processor.
In a fifth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method of any of the embodiments described above.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
In the embodiment of the disclosure, compared with the method that the load balancing configuration file is generated by the manual coding of the operation and maintenance personnel and the load balancing task in the load balancing configuration file is issued to the corresponding load balancing equipment, according to the scheme, the operation and maintenance personnel only need to input relatively simple load balancing configuration data according to the load balancing configuration required by the server and send the load balancing configuration data to the server, and then the server realizes efficient and accurate generation of the load balancing configuration file according to the load balancing configuration data; and furthermore, an automatic operation and maintenance tool capable of analyzing the load balancing configuration file is introduced, and the load balancing task in the load balancing configuration file can be automatically issued to the corresponding load balancing equipment through the automatic operation and maintenance tool, so that the effects of more accurately and efficiently automatically generating and issuing the load balancing task and meeting the high concurrency requirement of the server are achieved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this disclosure, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow chart of a method of load balancing task delivery, as shown in some example embodiments.
FIG. 2 is a flow chart of another load balancing task delivery method shown in some exemplary embodiments.
FIG. 3 is a flow chart illustrating yet another method of load balancing task delivery in accordance with some illustrative embodiments.
FIG. 4 is a flow chart illustrating yet another method of load balancing task delivery in accordance with some illustrative embodiments.
Fig. 5 is a block diagram of a load balancing task issuing apparatus according to some exemplary embodiments.
Fig. 6 is a hardware block diagram of a computer device as illustrated in some example embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination" depending on the context.
With the rapid development of digitization, enterprises are increasingly competing, and the traditional operation mode cannot meet the market demand. Therefore, the digital transformation is the key point for improving the competitiveness of enterprises. Load balancing is an important basic measure for digital construction. With the rapid growth of internet traffic, many enterprises meet the high concurrency demands by creating load balancing configurations on load balancing devices.
In the related art, load balancing task codes are usually written manually by operation staff and issued to corresponding load balancing devices, so that the load balancing devices execute corresponding load balancing tasks. However, the manner of manually writing codes to realize the issuing of the load balancing task has the problems of low efficiency and low accuracy.
In order to solve the problems, the disclosure provides a load balancing task issuing method, which is applied to a scenario of issuing a load balancing task to a server. Optionally, the load balancing task issuing method may be executed by a load balancing system for issuing a load balancing task to a server. Wherein the server may comprise one load balancing configuration device (e.g. a primary node of the server) and a plurality of load balancing devices (e.g. secondary nodes of the server), the load balancing system may be integrated on the load balancing configuration device of the server. Optionally, the load balancing system integrated on the load balancing configuration device may receive load balancing configuration data for performing load balancing configuration on the server, and generate at least one load balancing configuration file according to the received load balancing configuration data; further, interaction can be performed between the network and the load balancing device corresponding to the load balancing task in the load balancing configuration file, and the load balancing task in the load balancing configuration file is issued to the corresponding load balancing device, so that the load balancing device which receives the load balancing task executes the corresponding load balancing task.
The first aspect of the present disclosure provides a load balancing task issuing method, which is applied to load balancing configuration equipment of a server. Referring to fig. 1, the method includes the following steps:
S101, receiving load balancing configuration data for carrying out load balancing configuration on the server.
The server can comprise a load balancing configuration device and a plurality of load balancing devices; the load balancing configuration equipment is equipment for issuing a load balancing task to the load balancing equipment according to load balancing configuration requirements; the load balancing device is the device for receiving and executing the load balancing task issued by the load balancing configuration device. The load balancing configuration data is used for carrying out load balancing configuration on the server, and may include data such as a device number, a device IP address, specific configuration information (for example, a task name and a task label that need to be executed by the load balancing device) that needs to be issued to the load balancing device to be configured, and the like.
Optionally, under the condition that the server has a load balancing configuration requirement, the load balancing configuration data can be automatically written by the server according to the load balancing configuration requirement; or the operation and maintenance personnel can directly input the load balancing configuration data through the interaction component of the server according to the load balancing configuration requirement of the server, or input the load balancing configuration data at the front end, and the front end sends the load balancing configuration data input by the operation and maintenance personnel to the server; in another embodiment, the visualization tool is preconfigured in the server, so that the operation and maintenance personnel only need to correspondingly input the load balancing configuration data to the key data, and the server can receive the load balancing configuration data input by the operation and maintenance personnel through the visualization tool. Further, the load balancing configuration device of the server can receive load balancing configuration data input by operation and maintenance personnel.
S102, generating at least one load balancing configuration file according to the load balancing configuration data.
The load balancing configuration files may be one or more, and refer to configuration files for performing load balancing configuration on the server, and may include at least one load balancing task and corresponding load balancing devices, where one load balancing task may correspond to multiple load balancing devices. For example, one load balancing profile may include two load balancing tasks (load balancing task a and load balancing task B), and a load balancing device 1 corresponding to the load balancing task a, and a load balancing device 2 and a load balancing device 3 corresponding to the load balancing task B.
Optionally, after receiving the load balancing configuration data, the load balancing configuration data may be added to the configuration file template according to a data identifier (or a field position) corresponding to the load balancing configuration data based on a preset configuration file template, so as to generate at least one load balancing configuration file.
It should be noted that the configuration file template needs to satisfy the writing specification of the automation operation and maintenance tool, so that the automation operation and maintenance tool can parse the load balancing configuration file generated by the configuration file template according to the writing specification.
Further, after the load balancing configuration file is generated, the load balancing configuration file can be output, and whether to create the load balancing configuration based on the load balancing configuration file is queried, so that an operation and maintenance person can check the generated load balancing configuration file and determine whether to create the load balancing configuration corresponding to the load balancing configuration file. And when the load balancing configuration corresponding to the load balancing configuration file is established by receiving the determination of the feedback of the operation and maintenance personnel, continuing to execute S103. Optionally, if the load balancing configuration corresponding to the load balancing configuration file is not created and fed back by the operation and maintenance personnel, the load balancing device corresponding to each load balancing task in the load balancing configuration file is searched according to the load balancing configuration file, and the configuration information of each load balancing device is deleted, wherein the configuration information is the same as the configuration information of the corresponding load balancing task. For example, if the load balancing configuration corresponding to the load balancing configuration file is not created and fed back by the operation and maintenance personnel is received, the load balancing device 1 corresponding to the load balancing task a in the load balancing configuration file can be searched, and the configuration information of the load balancing device 1 is obtained as "executing tasks a and b"; and further, according to the 'load balancing device 1 executing task a' in the load balancing task A, the configuration information of the load balancing device 1 is modified into the 'executing task b', so that the load balancing configuration corresponding to the load balancing configuration file is not created.
S103, the load balancing tasks in the load balancing configuration file are issued to corresponding load balancing equipment through an automatic operation and maintenance tool, so that the load balancing equipment receiving the load balancing tasks execute the corresponding load balancing tasks.
The automatic operation and maintenance tool refers to a tool capable of automatically performing configuration management, application deployment, task automation and other operation and maintenance on a server. For example, the automated operation tool may include Ansible or the like. Ansible is a lightweight automated operation and maintenance management tool that does not require clients or agents to be installed on the remote host, but communicates with the remote host based on the SSH protocol. Ansible is mainly characterized in that the automation of Ansible is realized by supporting the gradual execution and return of results based on execution steps in the script file through the edited script file, so that the effects of greatly reducing repetitive work and further improving the working efficiency can be realized.
Optionally, the generated load balancing configuration file can be input into an automatic operation and maintenance tool, and the load balancing configuration file is analyzed through the automatic operation and maintenance tool to obtain load balancing tasks in the load balancing configuration file and load balancing equipment corresponding to each load balancing task; further, each load balancing task is issued to the corresponding load balancing device, so that the load balancing device which receives the load balancing task executes the corresponding load balancing task. For example, if the load balancing configuration file includes a load balancing task a and a load balancing task B, and the load balancing device corresponding to the load balancing task a is a load balancing device 1, and the load balancing device corresponding to the load balancing task B is a load balancing device 2 and a load balancing device 3, the load balancing task a is issued to the load balancing device 1, so that the load balancing device 1 executes the load balancing task a; and issues the load balancing task B to the load balancing device 2 and the load balancing device 3, so that the load balancing device 2 and the load balancing device 3 execute the load balancing task B.
In the embodiment of the disclosure, compared with the method that the load balancing configuration file is generated by the manual coding of the operation and maintenance personnel and the load balancing task in the load balancing configuration file is issued to the corresponding load balancing equipment, according to the scheme, the operation and maintenance personnel only need to input relatively simple load balancing configuration data according to the load balancing configuration required by the server and send the load balancing configuration data to the server, and then the server realizes efficient and accurate generation of the load balancing configuration file according to the load balancing configuration data; and furthermore, an automatic operation and maintenance tool capable of analyzing the load balancing configuration file is introduced, and the load balancing task in the load balancing configuration file can be automatically issued to the corresponding load balancing equipment through the automatic operation and maintenance tool, so that the effects of more accurately and efficiently automatically generating and issuing the load balancing task and meeting the high concurrency requirement of the server are achieved.
Further, in an optional embodiment, the task execution result fed back by each load balancing device may be obtained by the automated operation and maintenance tool; and outputting a task execution result of each load balancing device to prompt the task execution result of each load balancing device.
Optionally, after each load balancing device executes a corresponding load balancing task, the load balancing device may interact with the automated operation and maintenance tool through a network, and feedback a task execution result to the automated operation and maintenance tool; the load balancing system can acquire a task execution result fed back by each load balancing device through an automatic operation and maintenance tool; further, the task execution result fed back by each load balancing device is output in a mode of a prompt box and the like, so that the execution result of executing the corresponding load balancing task by each load balancing device is prompted. For example, if the task execution result of a certain load balancing device X (may be the device number of the load balancing device) fails, a prompt message of "the device X fails in task execution" may be output to prompt that the task execution result of the load balancing device fails, and may ask whether to instruct the load balancing device X again to execute the corresponding load balancing task.
It can be understood that the task execution result fed back by each load balancing device is obtained through the automatic operation and maintenance tool, so that the task execution result of each load balancing device is output, and the effect of prompting the task execution result of each load balancing device can be realized more conveniently and intuitively.
In an alternative embodiment, please refer to fig. 2, further refine S102, which specifically includes the following steps:
s201, generating at least one load balancing task according to the load balancing configuration data.
Optionally, after receiving the load balancing configuration data, the load balancing configuration data may be parsed, and the load balancing configuration data is split into load balancing configuration data corresponding to each load balancing task; further, based on a preset task generation template, according to the data identifier corresponding to the load balancing configuration data, the load balancing configuration data corresponding to each load balancing task is added to the task generation template to generate at least one load balancing task. It should be noted that the task generating template needs to satisfy the writing specification of the automation operation and maintenance tool, so that both the generated load balancing task and the load balancing configuration file generated by the load balancing task can be resolved by the automation operation and maintenance tool.
S202, generating at least one load balancing configuration file according to task allocation data in the load balancing configuration data and the at least one load balancing task.
The task allocation data refers to data used for carrying out file allocation on the load balancing tasks in the load balancing configuration data.
Optionally, after the load balancing task is generated, the generated load balancing task may be combined according to task allocation data in the load balancing configuration data to obtain at least one load balancing configuration file. For example, if three load balancing tasks (load balancing task a, load balancing task B, and load balancing task C) are generated, the task allocation data is to generate a load balancing profile according to the load balancing task a and the load balancing task B, and a load balancing profile according to the load balancing task C, a load balancing profile including the load balancing task a and the load balancing task B, and a load balancing profile including the load balancing task C may be generated according to the task allocation data.
It can be understood that by generating at least one load balancing task according to the load balancing configuration data, and then combining the load balancing tasks based on task allocation data in the load balancing configuration data, at least one load balancing configuration file is obtained, so that the effect of generating the load balancing configuration file more orderly and reasonably can be achieved.
In an alternative embodiment, referring to fig. 3, the step of further refining S103 may specifically include the following steps:
s301, according to the load balancing configuration file, determining the equipment IP address corresponding to the load balancing task in the load balancing configuration file.
The device IP address refers to an IP address of a load balancing device corresponding to the load balancing task.
Optionally, after the load balancing configuration file is generated, the automatic operation and maintenance tool can analyze the load balancing configuration file according to the writing specification of the configuration file, split the load balancing configuration file into at least one load balancing task, analyze the load balancing task, and determine the device IP address of the load balancing device corresponding to each load balancing task.
S302, according to the equipment IP address, searching for load balancing equipment corresponding to the load balancing task, and establishing connection with the load balancing equipment.
Optionally, after determining the device IP address of the load balancing device corresponding to each load balancing task, the load balancing device corresponding to each load balancing task may be found from the load balancing devices of the server according to the device IP address, and then a connection is established with the found load balancing device.
S303, the load balancing tasks in the load balancing configuration file are issued to the corresponding load balancing equipment, so that the corresponding load balancing equipment executes the load balancing tasks.
Optionally, after connection is established between the load balancing devices corresponding to the load balancing tasks, each load balancing task may be transmitted to the corresponding load balancing device through the established connection link, so that the load balancing device that receives the load balancing task executes the corresponding load balancing task.
In one implementation manner, the load balancing task can be issued to the corresponding load balancing device through the RESTful interface, so that the load balancing device which receives the load balancing task executes the corresponding load balancing task, and the security of issuing the corresponding load balancing task by the load balancing device is improved.
It can be understood that the load balancing configuration file is analyzed by the automatic operation and maintenance tool, so that the equipment IP address corresponding to each load balancing task can be more efficiently and accurately determined; furthermore, according to the IP address of the device, the load balancing device corresponding to the load balancing task can be quickly searched and connected, and the effect of more efficiently issuing the corresponding load balancing task to the load balancing device is further achieved.
In an optional embodiment, after the load balancing configuration file is generated, the specification judgment can be performed on the load balancing configuration data in the load balancing configuration file through the automatic operation and maintenance tool; and outputting error prompt information under the condition that the load balancing configuration data is judged to be out of specification.
The error prompt information is used for prompting that the load balancing configuration data does not accord with the specification.
Optionally, after generating at least one load balancing configuration file, the load balancing configuration file may be input into an automation operation and maintenance tool, and through the automation operation and maintenance tool, it is judged whether the data type, the data format, etc. of the load balancing configuration data in the load balancing configuration file meet the specification; for example, if the data type of the IP address of the device in the load balancing configuration data is set to be a character string type, the data format of the task execution time is set to be YY-MM-DD, and the data type of the IP address of the device in the load balancing configuration data included in the load balancing configuration file is set to be integer, and the data format of the task execution time is set to be YYYY-MM-DD, it may be determined that load balancing configuration data that does not meet the specification exists in the load balancing configuration file.
Further, in the case that the load balancing configuration data is judged to be out of specification, error prompt information may be generated according to the configuration data out of specification in the load balancing configuration data, for example, in the case that the data type of the device IP address is out of specification, an error may be generated as follows! The data type of the device IP address should be the string type-! "error prompt message; and the generated error prompt information can be output in a prompt box and other modes to prompt that the load balancing configuration data does not accord with the specification, and operation and maintenance personnel are required to carry out operations such as modification. If it is determined that the load balancing configuration data in the load balancing configuration file meets the specification, the step S301 may be continuously performed.
It can be understood that the automatic operation and maintenance tool is used for judging the specification of the load balancing configuration data in the load balancing configuration file, and outputting error prompt information under the condition that the load balancing configuration data does not accord with the specification, so that the condition that the load balancing configuration data is not specified can be more intuitively fed back, the operation and maintenance personnel can modify the load balancing configuration data, the accuracy of the load balancing configuration data is improved, and further, the effect of issuing the load balancing task more accurately is achieved.
In an alternative embodiment, after the load balancing configuration file is generated, the load balancing configuration file may be stored in a preset storage area.
The preset storage area is a preset area for storing the load balancing configuration file.
Optionally, after the load balancing configuration file is generated, the generated load balancing configuration file may be stored in a preset storage area based on a preset storage path, so that the stored load balancing configuration file is obtained by a subsequent automation operation and maintenance tool when the automation operation and maintenance tool is in an idle state.
Further, before executing the step S103, the load balancing configuration file in the preset storage area may be obtained by the automated operation and maintenance tool.
Optionally, in the case that the automation operation and maintenance tool is in an idle state, the load balancing configuration file may be obtained from a preset storage area, so as to execute the operation of S103.
It can be understood that by setting the preset storage area, the load balancing configuration file is stored in the preset storage area, and then the load balancing configuration file in the preset storage area is acquired when the automatic operation and maintenance tool is in an idle state, so that the accuracy of the load balancing configuration file can be ensured, and further, the effect of issuing the load balancing task in the load balancing configuration file can be more accurately achieved.
In an alternative embodiment, referring to fig. 4, after generating the load balancing configuration file, the method for issuing the load balancing task may further include the following steps:
s401, acquiring configuration information of load balancing equipment corresponding to each load balancing task in the load balancing configuration file.
The configuration information is configuration data of the load balancing device at the current moment, and may include information such as a load balancing task number currently executed by the load balancing device.
Optionally, after the load balancing configuration file is generated, the load balancing device corresponding to each load balancing task in the load balancing configuration file can be searched according to the load balancing configuration file, and the configuration information of the searched load balancing device is obtained.
S402, modifying the configuration information of the load balancing device corresponding to the load balancing task according to the load balancing task when the configuration information of the load balancing device is different from the load balancing task corresponding to the load balancing device.
Optionally, according to the obtained configuration information of the load balancing device, the load balancing tasks corresponding to the load balancing device can be compared; and under the condition that the configuration information is different from the load balancing task, modifying the configuration information of the load balancing equipment according to the load balancing task so as to enable the load balancing equipment to execute the load balancing task. For example, if the configuration information of the load balancing device includes the "executing task a", and the load balancing task corresponding to the load balancing device is the "executing task b", the configuration information of the load balancing device may be modified to the "executing task b" to implement that the load balancing device executes the corresponding load balancing task. Or if the configuration information of a certain load balancing device is the same as the load balancing task corresponding to the load balancing device, the configuration information of the load balancing device is not required to be modified, and the subsequent steps are executed.
It can be understood that by acquiring the configuration information of the load balancing device corresponding to each load balancing task in the load balancing configuration file, only the configuration information of the load balancing device with the configuration information different from the corresponding load balancing task needs to be modified, and the modification of the configuration information is not needed for the load balancing device with the configuration information identical to the corresponding load balancing task, so that the effect of enabling the load balancing device to execute the corresponding load balancing task more efficiently and accurately can be achieved.
A second aspect of the present disclosure provides a load balancing task issuing apparatus. Referring to fig. 5, the load balancing task issuing apparatus includes:
A data receiving module 501, configured to receive load balancing configuration data for performing load balancing configuration on the server, where the server includes the load balancing configuration device and a load balancing device;
The file generating module 502 is configured to generate at least one load balancing configuration file according to the load balancing configuration data, where the load balancing configuration file includes at least one load balancing task and a corresponding load balancing device;
And the task issuing module 503 is configured to issue, through an automation operation and maintenance tool, the load balancing task in the load balancing configuration file to a corresponding load balancing device, so that the corresponding load balancing device executes the load balancing task.
In one embodiment, the file generating module includes:
The task generating unit is used for generating at least one load balancing task according to the load balancing configuration data;
And the file generation unit is used for generating at least one load balancing configuration file according to the task allocation data in the load balancing configuration data and the at least one load balancing task.
In one embodiment, the task issuing module includes:
The address determining unit is used for determining the equipment IP address corresponding to the load balancing task in the load balancing configuration file according to the load balancing configuration file;
The connection establishment unit is used for searching the load balancing equipment corresponding to the load balancing task according to the equipment IP address and establishing connection with the load balancing equipment;
And the task issuing unit is used for issuing the load balancing task in the load balancing configuration file to the corresponding load balancing equipment so as to enable the corresponding load balancing equipment to execute the load balancing task.
In one embodiment, the task issuing unit is further configured to:
And sending the load balancing task in the load balancing configuration file to corresponding load balancing equipment through a RESTful interface so that the corresponding load balancing equipment executes the load balancing task.
In one embodiment, the task issuing module further includes:
The information output unit is used for carrying out standard judgment on the load balancing configuration data in the load balancing configuration file through the automatic operation and maintenance tool; outputting error prompt information under the condition that the load balancing configuration data is judged to be out of specification; the error prompt information is used for prompting that the load balancing configuration data does not accord with the specification.
In one embodiment, the load balancing task issuing device further includes:
the file storage module is used for storing the load balancing configuration file into a preset storage area;
Before the task issuing module, the load balancing task issuing device further comprises:
And the file acquisition module is used for acquiring the load balancing configuration file in the preset storage area through the automatic operation and maintenance tool.
In one embodiment, the load balancing task issuing device further includes:
the result output module is used for acquiring a task execution result fed back by each load balancing device through the automatic operation and maintenance tool; and outputting a task execution result of each load balancing device to prompt the task execution result of each load balancing device.
In one embodiment, the load balancing task issuing device further includes:
The configuration modification module is used for acquiring configuration information of the load balancing equipment corresponding to each load balancing task in the load balancing configuration file; and under the condition that the configuration information of the load balancing equipment is different from the load balancing task corresponding to the load balancing equipment, modifying the configuration information of the load balancing equipment corresponding to the load balancing task according to the load balancing task.
In one embodiment, the automated operation tool comprises Ansible.
The implementation process of the functions and roles of each module in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
A third aspect of the present disclosure provides a computer program product comprising computer programs/instructions which, when executed by a processor, implement the method as described in the first aspect.
For apparatus embodiments and computer program product embodiments, reference is made to the description of method embodiments for relevance, since they correspond essentially to the method embodiments. Furthermore, the apparatus embodiments described above are merely illustrative, wherein the modules illustrated as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the objectives of the disclosed solution. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
In a fourth aspect, an embodiment of a load balancing task issuing apparatus provided by the present disclosure may be applied to a computer device. Referring to FIG. 6, a hardware schematic of a computer device is shown. For example, device 600 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
The device 600 may include one or more of the following components: a processing component 601, a memory 602, a power component 603, a multimedia component 604, an audio component 605, an input/output (I/O) interface 606, a sensor component 607, and a communication component 608.
The processing component 601 generally controls overall operation of the device 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 601 may include one or more processors 609 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 601 may include one or more modules that facilitate interactions between the processing component 601 and other components. For example, the processing component 601 may include a multimedia module to facilitate interaction between the multimedia component 604 and the processing component 601.
The memory 602 is configured to store various types of data to support operations at the device 600. Examples of such data include instructions for any application or method operating on device 600, contact data, phonebook data, messages, pictures, videos, and the like. The memory 602 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power component 603 provides power to the various components of the apparatus 600. Power component 603 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for device 600.
The multimedia component 604 includes a screen between the device 600 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or sliding action, but also the duration and pressure associated with the touch or sliding operation. In some embodiments, the multimedia component 604 includes a front camera and/or a rear camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 600 is in an operational mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 605 is configured to output and/or input audio signals. For example, the audio component 605 includes a Microphone (MIC) configured to receive external audio signals when the device 600 is in an operational mode, such as a call mode, a recording mode, and a speech recognition mode. The received audio signals may be further stored in the memory 602 or transmitted via the communication component 608. In some embodiments, the audio component 605 also includes a speaker for outputting audio signals.
The I/O interface 606 provides an interface between the processing component 601 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 607 includes one or more sensors for providing status assessment of various aspects of the device 600. For example, the sensor assembly 607 may detect the on/off state of the device 600, the relative positioning of the components, such as the display and keypad of the device 600, the sensor assembly 607 may also detect the change in position of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, the orientation or acceleration/deceleration of the device 600, and the change in temperature of the device 600. The sensor assembly 607 may also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 607 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 607 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 608 is configured to facilitate communication between the device 600 and other devices, either wired or wireless. The device 600 may access a wireless network based on a communication standard, such as WiFi,2G or 3G,4G or 5G, or a combination thereof. In one exemplary embodiment, the communication component 608 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 608 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for performing the load balancing task issuing method of the computer apparatus described above.
In a fifth aspect, the present disclosure also provides, in an exemplary embodiment, a non-transitory computer-readable storage medium, such as memory 602, comprising instructions executable by processor 609 of device 600 to perform the method of load balancing task delivery of a computer device described above. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
The foregoing has described certain embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
The foregoing description of the preferred embodiments of the present disclosure is not intended to limit the disclosure, but rather to cover all modifications, equivalents, improvements and alternatives falling within the spirit and principles of the present disclosure.

Claims (13)

1. The method for issuing the load balancing task is characterized by being applied to load balancing configuration equipment of a server, and comprises the following steps:
Receiving load balancing configuration data for carrying out load balancing configuration on the server, wherein the server comprises the load balancing configuration equipment and load balancing equipment;
Generating at least one load balancing configuration file according to the load balancing configuration data, wherein the load balancing configuration file comprises at least one load balancing task and corresponding load balancing equipment;
And issuing the load balancing task in the load balancing configuration file to corresponding load balancing equipment through an automatic operation and maintenance tool so that the corresponding load balancing equipment executes the load balancing task.
2. The method of claim 1, wherein generating at least one load balancing profile from the load balancing configuration data comprises:
generating at least one load balancing task according to the load balancing configuration data;
and generating at least one load balancing configuration file according to the task allocation data in the load balancing configuration data and the at least one load balancing task.
3. The method of claim 1, wherein the issuing the load balancing task in the load balancing configuration file to the corresponding load balancing device, to cause the corresponding load balancing device to perform the load balancing task, comprises:
According to the load balancing configuration file, determining an equipment IP address corresponding to the load balancing task in the load balancing configuration file;
according to the equipment IP address, searching for load balancing equipment corresponding to the load balancing task, and establishing connection with the load balancing equipment;
and issuing the load balancing task in the load balancing configuration file to corresponding load balancing equipment so as to enable the corresponding load balancing equipment to execute the load balancing task.
4. The method of claim 3, wherein the issuing the load balancing task within the load balancing configuration file to a corresponding load balancing device to cause the corresponding load balancing device to perform the load balancing task comprises:
And sending the load balancing task in the load balancing configuration file to corresponding load balancing equipment through a RESTful interface so that the corresponding load balancing equipment executes the load balancing task.
5. A method according to claim 3, characterized in that the method further comprises:
performing standard judgment on the load balancing configuration data in the load balancing configuration file through the automatic operation and maintenance tool;
Outputting error prompt information under the condition that the load balancing configuration data is judged to be out of specification; the error prompt information is used for prompting that the load balancing configuration data does not accord with the specification.
6. The method according to claim 1, wherein the method further comprises:
Storing the load balancing configuration file into a preset storage area;
before the load balancing task in the load balancing configuration file is issued to the corresponding load balancing device through the automatic operation and maintenance tool, so that the corresponding load balancing device executes the load balancing task, the method further comprises:
and acquiring the load balancing configuration file in the preset storage area through the automatic operation and maintenance tool.
7. The method according to claim 1, wherein the method further comprises:
Acquiring a task execution result fed back by each load balancing device through the automatic operation and maintenance tool;
And outputting a task execution result of each load balancing device to prompt the task execution result of each load balancing device.
8. The method of claim 1, wherein the issuing the load balancing task within the load balancing configuration file to a corresponding load balancing device comprises:
Acquiring configuration information of load balancing equipment corresponding to each load balancing task in the load balancing configuration file;
and under the condition that the configuration information of the load balancing equipment is different from the load balancing task corresponding to the load balancing equipment, modifying the configuration information of the load balancing equipment corresponding to the load balancing task according to the load balancing task.
9. The method of any one of claims 1-8, wherein the automated operation tool comprises Ansible.
10. A load balancing task issuing apparatus, the apparatus comprising:
The data receiving module is used for receiving load balancing configuration data for carrying out load balancing configuration on a server, wherein the server comprises load balancing configuration equipment and load balancing equipment;
the file generation module is used for generating at least one load balancing configuration file according to the load balancing configuration data, wherein the load balancing configuration file comprises at least one load balancing task and corresponding load balancing equipment;
And the task issuing module is used for issuing the load balancing task in the load balancing configuration file to the corresponding load balancing equipment through an automatic operation and maintenance tool so as to enable the corresponding load balancing equipment to execute the load balancing task.
11. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the method of any one of claims 1 to 9.
12. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 9 when the program is executed by the processor.
13. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1 to 9.
CN202410224617.5A 2024-02-28 2024-02-28 Load balancing task issuing method and device, computer equipment and storage medium Pending CN118101659A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410224617.5A CN118101659A (en) 2024-02-28 2024-02-28 Load balancing task issuing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410224617.5A CN118101659A (en) 2024-02-28 2024-02-28 Load balancing task issuing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118101659A true CN118101659A (en) 2024-05-28

Family

ID=91150126

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410224617.5A Pending CN118101659A (en) 2024-02-28 2024-02-28 Load balancing task issuing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118101659A (en)

Similar Documents

Publication Publication Date Title
EP3065428A1 (en) Method and device for displaying wifi list
CN113365106B (en) Multimedia resource generation method and device, electronic equipment and storage medium
US9485358B2 (en) Information acquisition method, device, and system
EP3051772A1 (en) Method and apparatus for accessing network
CN111338971B (en) Application testing method and device, electronic equipment and storage medium
CN109684112B (en) Program file operation method, device, terminal and storage medium
CN107463372B (en) Data-driven page updating method and device
CN112333337B (en) Message checking method, device, equipment and storage medium
CN115185717A (en) Interface calling method and device, electronic equipment and storage medium
CN110704030A (en) Interface configuration information generation method and device, electronic equipment and storage medium
CN111552688A (en) Data export method and device and electronic equipment
WO2023046105A1 (en) Message sending method and apparatus and electronic device
CN111459571A (en) Configuration method, processing method and device
CN112486617B (en) Ciphertext data processing architecture, method, apparatus and machine readable medium
CN114896165A (en) Testing method and device of conversation robot system, electronic equipment and storage medium
CN118101659A (en) Load balancing task issuing method and device, computer equipment and storage medium
CN114051009A (en) Message sending method and electronic equipment
JP2018503149A (en) Information input method, apparatus, program, and recording medium
CN112181453A (en) Firmware upgrading method and device and storage medium
CN111526084A (en) Information processing method, device, equipment and storage medium
CN111866278A (en) Electric quantity display method, device, equipment and storage medium of wireless earphone
CN114443161B (en) Application docking method, device, equipment and storage medium
EP2493158A1 (en) Apparatus and method for managing call notes in a wireless device
CN112270162B (en) Text conversion and message transmission method, device, equipment, server and medium
CN111538544B (en) Method and device for displaying configuration data, electronic equipment and storage medium

Legal Events

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