CN111597047A - Service deployment method, device, electronic equipment and storage medium - Google Patents

Service deployment method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111597047A
CN111597047A CN202010412963.8A CN202010412963A CN111597047A CN 111597047 A CN111597047 A CN 111597047A CN 202010412963 A CN202010412963 A CN 202010412963A CN 111597047 A CN111597047 A CN 111597047A
Authority
CN
China
Prior art keywords
service
server
response time
target
determining
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
CN202010412963.8A
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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202010412963.8A priority Critical patent/CN111597047A/en
Publication of CN111597047A publication Critical patent/CN111597047A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the disclosure provides a service deployment method and device, electronic equipment and a storage medium, and relates to the field of cloud computing. The method comprises the following steps: responding to the trigger operation of the target service, and determining the service state information of each server according to the resource index and the service response time of each server; selecting a target server from the servers based on the service state information; deploying the target service to the target server. The service response time can directly reflect the service level of the server, so the service state information can be used for accurately evaluating the service level of the server, and further, the target server selected based on the service state information can better provide services to the outside, so the accuracy of service deployment can be improved, and the service level to a client is improved.

Description

Service deployment method, device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of resource scheduling technologies, and in particular, to a service deployment method and apparatus, an electronic device, and a storage medium.
Background
The service cluster resource scheduling is used for scheduling resources in the server cluster and distributing the resources to a database in the server, and finally, the database provides services for the outside. I.e., selecting an appropriate server and deploying the service to that server to complete the outbound service.
In the current service deployment manner, the considered reference indexes include a Central Processing Unit (CPU), a memory, a hard disk, an Input/Output (IO), a bandwidth, and the like of the server, and the considered reference indexes are concentrated on the resource dimension of the server and may be referred to as resource indexes. The service deployment modes referring to the resource indexes may have different emphasis points, some of which focus on the resource balanced use of the servers in the cluster, and some of which focus on completing more service deployments.
The resource indexes of the server can only reflect the load condition of the server from the resource dimension of the server, but cannot reflect the service level of the server, so that the service deployment is lack of accuracy, and the service to a client cannot be optimized better.
Disclosure of Invention
The embodiment of the invention aims to provide a service deployment method, a service deployment device, electronic equipment and a storage medium, so as to improve the accuracy of service deployment and improve the service level of customers. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a service deployment method, where the method includes:
responding to the trigger operation aiming at the target service, and determining the service state information of each server according to the resource index and the service response time of each server;
selecting a target server from the servers based on the service state information;
deploying the target service to the target server.
As an embodiment, before the step of determining the service status information of each server according to the resource index and the service response time of each server in response to the triggering operation for the target service, the method further includes:
the method comprises the steps of obtaining response time of services operated by each server, determining the service as a target service when the service with the response time not meeting preset conditions exists, and determining to obtain triggering operation aiming at the target service;
or the like, or, alternatively,
when a new service to be deployed is acquired, determining that the service to be deployed is a target service, and determining to acquire a trigger operation for the target service.
In one embodiment, the step of determining the service status information of each server according to the resource index and the service response time of each server includes:
acquiring service response time and resource indexes of each server;
calculating a weighted score corresponding to each server according to the preset weight corresponding to the resource index and the service response time of each server;
and determining the evaluation score of each server based on the weighted score as service state information.
As an embodiment, the step of obtaining the service response time and the resource index of each server includes:
and acquiring the service response time and the resource index of each server from a preset time sequence database, wherein the acquired service response time of each server and the acquired resource index of each server are recorded in the time sequence database.
As an embodiment, before the step of obtaining the service response time and the resource indicator of each server, the method further includes:
acquiring the service response time of each server through a preset timing task;
writing the service response time to the timing database.
In one embodiment, the step of selecting a target server from the servers based on the service status information includes:
determining a highest score of the evaluation scores;
and determining the server corresponding to the highest score as a target server.
In a second aspect, an embodiment of the present invention provides a service deployment apparatus, where the apparatus includes:
the service state information determining module is used for responding to the triggering operation aiming at the target service and determining the service state information of each server according to the resource index and the service response time of each server;
a target server determination module, configured to select a target server from the servers based on the service state information;
and the target service deployment module is used for deploying the target service to the target server.
As an embodiment, the apparatus further comprises:
the trigger operation determining module is used for acquiring the response time of the service operated by each server before determining the service state information of each server according to the resource index and the service response time of each server in response to the trigger operation aiming at the target service, determining the service as the target service when the service with the response time not meeting the preset condition exists, and determining to acquire the trigger operation aiming at the target service;
or the like, or, alternatively,
the method comprises the steps of determining that a service to be deployed is a target service when a new service to be deployed is obtained, and determining that a trigger operation aiming at the target service is obtained.
As an embodiment, the service status information determining module includes:
the information acquisition unit is used for acquiring the service response time and the resource index of each server;
the weighted score calculating unit is used for calculating the weighted score corresponding to each server according to the preset weight respectively corresponding to the resource index and the service response time of each server;
and the evaluation score calculation unit is used for determining the evaluation score of each server based on the weighted score as service state information.
As an embodiment, the information acquisition unit includes:
and the information acquisition subunit is configured to acquire the service response time and the resource index of each server from a preset time sequence database, where the acquired service response time of each server and the acquired resource index of each server are recorded in the time sequence database.
As an embodiment, the apparatus further comprises:
the response time acquisition module is used for acquiring the service response time of each server through a preset timing task before the service response time and the resource index of each server are acquired;
and the data writing module is used for writing the service response time into the time sequence database.
As an embodiment, the target server determination module includes:
a highest score determining unit for determining a highest score among the evaluation scores;
and the target server determining unit is used for determining the server corresponding to the highest score as the target server.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the steps of the service deployment method according to any one of the first aspect described above when executing the program stored in the memory.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the service deployment method steps described in any one of the above first aspects.
In the scheme provided by the embodiment of the invention, when acquiring the trigger operation for the target service, the electronic device can determine the service state information of each server according to the resource index and the service response time of each server, then select the target server from each server based on the service state information, and further deploy the target service to the target server. The service response time can directly reflect the service level of the server, so the service state information can be used for accurately evaluating the service level of the server, and further, the target server selected based on the service state information can better provide services to the outside, so the accuracy of service deployment can be improved, and the service level to a client is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a service deployment method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a specific step S101 in the embodiment shown in FIG. 1;
FIG. 3 is a flow chart of a service response time writing method according to the embodiment shown in FIG. 1;
FIG. 4 is a flowchart illustrating a specific step S102 in the embodiment shown in FIG. 1;
fig. 5 is a schematic structural diagram of a service deployment apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of another service deployment apparatus based on the embodiment shown in FIG. 5;
fig. 7 is a schematic diagram illustrating a specific structure of the service status information determining module 510 in the embodiment shown in fig. 5;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to improve accuracy of service deployment and improve a service level to a customer, embodiments of the present invention provide a service deployment method, apparatus, electronic device, and non-transitory computer-readable storage medium.
First, a service deployment method provided by an embodiment of the present invention is described below. The service deployment method provided by the embodiment of the invention can be applied to a management server, a central processing unit and the like for resource scheduling in a server cluster, and can also be applied to any server in the server cluster, which are reasonable and are hereinafter referred to as electronic equipment for convenience of description.
As shown in fig. 1, a service deployment method includes:
s101, responding to trigger operation aiming at target service, and determining service state information of each server according to resource indexes and service response time of each server;
s102, selecting a target server from the servers based on the service state information;
s103, deploying the target service to the target server.
In the solution provided by the embodiment of the present invention, the electronic device may determine the service state information of each server according to the resource index and the service response time of each server in response to the trigger operation for the target service, and then select the target server from each server based on the service state information, and further deploy the target service to the target server. The service response time can directly reflect the service level of the server, so the service state information can be used for accurately evaluating the service level of the server, and further, the target server selected based on the service state information can better provide services to the outside, so the accuracy of service deployment can be improved, and the service level to a client is improved.
When the electronic device acquires the trigger operation for the target service, it indicates that one server needs to be selected to deploy the target service. The triggering operation may be set in advance according to a service type, a network environment, and other factors, for example, the triggering operation may be a server restart, a new service request received, and the like, and is not limited specifically herein. In the embodiment of the present invention, the type and specific content of the service are not limited.
In order to determine the service state information capable of accurately reflecting the service level of the server, the electronic device may determine the service state information of each server according to the resource index and the service response time of each server in response to the trigger operation for the target service. The resource index is each index representing a server resource, and for example, the resource index may include a CPU, a memory, a hard disk, an IO (Input/Output), an occupancy rate of a bandwidth, and the like of the server, which is not specifically limited herein.
The service response time is the time length required by the server to process each service, and the longer the service response time is, the slower the speed of processing the service by the server is, and the lower the service level is; the shorter the service response time, the faster the server processes the service, and the higher the service level, so the service response time can directly and accurately reflect the processing level of the server for each service.
As an embodiment, the electronic device may use the sum of the resource indicator and the service response time as the service state information of the server, and certainly, it is reasonable that the resource indicator and the service response time are calculated according to a preset calculation method, and an obtained calculation result is used as the service state information of the server.
Next, in step S102, the electronic device may select a target server from the servers based on the service status information. The specific manner of selecting the target server is related to the manner of determining the service status information.
For example, if the service status information of the server is the sum of the resource index and the service response time, and since the higher the value of the resource index and the longer the service response time, the lower the service level of the server is, the electronic device may select the server with the smaller value of the service status information from the servers as the target server.
Specifically, the electronic device may determine, as candidate servers, servers whose values of the service status information are smaller than a preset value, and then select one of the candidate servers as a target server. In one embodiment, the electronic device may randomly select one of the candidate servers as the target server, and in another embodiment, the electronic device may select a server with the smallest value of the service status information from the candidate servers as the target server.
After the target server is determined, the electronic device may deploy the target service to the target server, so that the target server processes the target service to provide corresponding service to the outside. The service response time can directly reflect the service level of the server, so the service state information can be used for accurately evaluating the service level of the server, and further, the target server selected based on the service state information can better provide services to the outside, so the accuracy of service deployment can be improved, and the service level to a client is improved.
As an implementation manner of the embodiment of the present invention, before the step of determining the service state information of each server according to the resource index and the service response time of each server in response to the trigger operation for the target service, the method may further include:
the method comprises the steps of obtaining response time of services operated by each server, determining the service as a target service when the service with the response time not meeting preset conditions exists, and determining to obtain triggering operation aiming at the target service; or when a new service to be deployed is acquired, determining that the service to be deployed is a target service, and determining to acquire a trigger operation for the target service.
The determination method for acquiring the trigger operation for the target service may include at least the following two manners.
In the first manner, the electronic device may obtain the response time of the service run by each server, specifically, the electronic device may obtain the response time of the service run by each server periodically or aperiodically, where the service run by the server is the current online service, that is, the service being processed by the server.
The electronic equipment can acquire the response time of the service operated by each server in the modes of packet capturing, slow query log analysis and the like through a preset timing task. In another embodiment, it is reasonable that each server may report its own response time periodically or aperiodically.
As an embodiment, it is reasonable that the electronic device may obtain the response time of all the services operated by each server, or may obtain the response time of a part of all the services.
After the response time of the service operated by each server is obtained, the electronic device may compare the response time with a preset condition, and when there is a service whose response time does not satisfy the preset condition, it indicates that the current processing level of the service cannot satisfy the user's requirement.
The preset condition may be preset according to an actual requirement of the user, for example, may be a response time corresponding to a Service-Level Agreement (SLA) agreed by the user in advance, or the like.
In order to improve the service quality, the electronic device may migrate the service, that is, select a server with better service state information from the servers to continue processing the service, and then the electronic device may determine that the service is a target service and determine that a trigger operation for the target service is acquired. In this way, the electronic device may then deploy the target service to the target server through the above steps S101 to S103, and complete the service migration.
In the second manner, when the electronic device acquires a new service to be deployed, that is, a newly acquired service to be deployed, a server needs to be allocated to process the service to be deployed, so that the electronic device may determine that the service to be deployed is a target service and determine to acquire a trigger operation for the target service. In this way, the electronic device may then deploy the target service to the target server through the above steps S101 to S103, and complete the service deployment.
In this embodiment, when there is a service whose service level cannot meet the user requirement in the services operated by each server, the electronic device may perform service migration to ensure the service level, and meanwhile, when a new service to be deployed is obtained, the electronic device may also deploy the target service to the target server to complete service deployment to ensure the service level of the new service.
As an implementation manner of the embodiment of the present invention, as shown in fig. 2, the step of determining the service state information of each server according to the resource index and the service response time of each server may include:
s201, acquiring service response time and resource indexes of each server;
in order to determine the service state information of each server, the electronic device may first obtain a service response time and a resource indicator of each server, where the service response time of each server may include a response time of each service run by each server.
S202, calculating a weighting score corresponding to each server according to the preset weight corresponding to the resource index and the service response time of each server;
for convenience of calculation, weights corresponding to each resource indicator and the service response time may be preset, that is, preset weights. The preset weight can be set according to the dependence degree of the service on the resource index, the requirement on the response speed and other factors.
For example, for a service of type a, it needs a larger memory, and the preset weight corresponding to the memory may be higher; for another example, for a service of type B, which has a higher requirement on response speed and requires a lower time delay, the preset weight corresponding to the service response time may be higher.
Thus, after the service response time and the resource index of each server are obtained, the electronic device can calculate the weighting score corresponding to each server according to the preset weight corresponding to the resource index and the service response time of each server respectively.
For example, the resource index of the server f1 includes a, b, c, and d, the corresponding preset weights are w1, w2, w3, and w4, respectively, and the preset weight corresponding to the service response time t is w5, so the weighted score of the server f1 is a × w1+ b × w2+ c × w3+ d × w4+ t × w 5. In general, w1+ w2+ w3+ w4+ w5 is 1.
S203, determining the evaluation score of each server based on the weighted score as service state information.
Next, the electronic device may determine an evaluation score of each server as the service status information based on the weighted scores. In an embodiment, since a higher score indicates better quality, which is better in accordance with the conventional practice, and the service response time and resource index of the server are both lower and better, in order to make the evaluation score conform to the conventional practice, the electronic device may determine an inverse number of the above-mentioned weighted score as the evaluation score of each server, or may adopt another calculation method, so that the evaluation score is inversely proportional to the weighted score, which is not specifically limited herein.
Of course, it is reasonable to determine the corresponding weighted score as the evaluation score of each server. Then, in this case, the lower the evaluation score is, the higher the service level of the corresponding server is indicated; the higher the evaluation score, the lower the service level of the corresponding server is indicated.
In this embodiment, the electronic device may obtain the service response time and the resource index of each server, calculate a weighted score corresponding to each server according to the preset weight corresponding to the resource index and the service response time of each server, and determine an evaluation score of each server based on the weighted score as the service state information. Therefore, the electronic equipment can determine the weighting score corresponding to each server according to the preset weight corresponding to different requirements of different services, so that the accuracy of the determined service state information is further improved, and the service level of a client is further improved.
As an implementation manner of the embodiment of the present invention, the step of acquiring the service response time and the resource index of each server may include:
and acquiring the service response time and the resource index of each server from a preset time sequence database.
In order to obtain the service response time and the resource index of each server when the service state information needs to be determined, a time sequence database may be preset, and the time sequence database is used for recording the obtained service response time of each server and the collected resource index of each server.
The service response time of each server may be obtained by the electronic device at regular time or in real time, and the resource index of each server may also be collected by the electronic device at regular time or in real time, and the specific collection manner may be any collection manner of the resource index in the related field, which is not specifically limited and described herein.
Therefore, when the service state information needs to be determined, the electronic equipment can acquire the service response time and the resource index of each server from the preset time sequence database.
If the data recorded in the time sequence database only includes the latest acquired service response time of each server and the latest acquired resource index of each server, the electronic device may directly acquire the service response time and the resource index of each server recorded therein.
If the data recorded in the time-series database includes all or a period of time of the service response time of each server and the collected resource index of each server, the electronic device may obtain the latest recorded service response time of each server and the collected resource index of each server from the time-series database.
In this embodiment, the electronic device may obtain the service response time and the resource index of each server from a preset time sequence database, may quickly and accurately obtain the service response time and the resource index of each server, and may ensure accuracy and efficiency of determining the service state information.
As an implementation manner of the embodiment of the present invention, as shown in fig. 3, before the step of acquiring the service response time and the resource index of each server, the method may further include:
s301, acquiring the service response time of each server through a preset timing task;
in order to be able to obtain the service response time of each server, a timing task for obtaining the service response time of each server may be preset. The preset timing task can acquire the service response time of each server in various modes such as packet capturing, slow query log analysis and the like.
The specific timing time of the preset timing task is not specifically limited herein, and may be determined according to factors such as real-time requirements of each service. Of course, it is reasonable that manual intervention can be performed to obtain the service response time of each server.
S302, writing the service response time into the time sequence database.
After the service response time of each server is obtained, the service response time can be written into the time sequence database, so that the corresponding service response time can be obtained in the subsequent process, and the obtaining time point corresponding to the service response time can be recorded simultaneously when the service response time is written into the time sequence database. Similarly, when the resource index is written into the time sequence database, the acquisition time point corresponding to the resource index can be recorded at the same time.
In one embodiment, the service response time and the resource index may be recorded in a form of a table, for example, as shown in the following table, which is a record table corresponding to the server a.
Figure BDA0002493925510000111
Here, T1 is earlier than T2, T2 is earlier than T3, that is, the service response time obtained at the time point of T3 is the latest data, and the resource index acquired at the time point of T3 is the latest resource index, then, at this time, the electronic device may obtain the service response time and the resource index of the server a from the table, that is, the service response time corresponding to the time point of T3 is Xy3, Xy4, and Xy7, and at the same time, the resource index corresponding to the time point of T3 is Zy 3.
In this embodiment, the electronic device may obtain the service response time of each server through a preset timing task, and write the service response time into the time sequence database. Therefore, when the electronic equipment needs to acquire the service response time, the service response time of each service can be quickly and accurately acquired from the time sequence database.
As an implementation manner of the embodiment of the present invention, as shown in fig. 4, the step of selecting a target server from the servers based on the service status information may include:
s401, determining the highest score in the evaluation scores;
since the higher the evaluation score corresponding to the server is, the better the service level of the server is, the better the target service can be completed, the electronic device may determine the highest score among the evaluation scores corresponding to the servers.
S402, determining the server corresponding to the highest score as a target server.
Furthermore, the electronic device may determine the server corresponding to the highest score as the target server to complete the deployment of the target service and provide the corresponding service for the user.
For example, if the server cluster includes 5 servers, i.e., server 1, server 2, server 3, server 4, and server 5, and their corresponding evaluation scores are 73, 86, 55, 60, and 91, respectively, the electronic device may determine that the highest score is 91, and further, may determine that server 5 is the target server.
In this embodiment, the electronic device may determine the highest score in the evaluation scores of the servers, and further determine the server corresponding to the highest score as the target server. Therefore, the electronic equipment can select the server with the best current service level as the target server, can better complete the target service and improve the service level.
Corresponding to the service deployment method, the embodiment of the invention also provides a service deployment device. A service deployment apparatus provided in an embodiment of the present invention is described below.
As shown in fig. 5, a service deployment apparatus, the apparatus comprising:
a service status information determining module 510, configured to determine, in response to a trigger operation for a target service, service status information of each server according to a resource indicator and a service response time of each server;
a target server determination module 520, configured to select a target server from the servers based on the service status information;
a target service deployment module 530, configured to deploy the target service to the target server.
In the solution provided by the embodiment of the present invention, the electronic device may determine the service state information of each server according to the resource index and the service response time of each server in response to the trigger operation for the target service, and then select the target server from each server based on the service state information, and further deploy the target service to the target server. The service response time can directly reflect the service level of the server, so the service state information can be used for accurately evaluating the service level of the server, and further, the target server selected based on the service state information can better provide services to the outside, so the accuracy of service deployment can be improved, and the service level to a client is improved.
As an implementation manner of the embodiment of the present invention, as shown in fig. 6, the apparatus may further include:
a triggering operation determining module 540, configured to obtain response time of a service run by each server before determining service state information of each server according to a resource index and service response time of each server in response to the triggering operation for the target service, determine that the service is the target service when there is a service for which the response time does not meet a preset condition, and determine to obtain the triggering operation for the target service;
or the like, or, alternatively,
the method comprises the steps of determining that a service to be deployed is a target service when a new service to be deployed is obtained, and determining that a trigger operation aiming at the target service is obtained.
As an implementation manner of the embodiment of the present invention, as shown in fig. 7, the service status information determining module 510 may include:
an information obtaining unit 511, configured to obtain service response time and resource indexes of each server;
a weighted score calculating unit 512, configured to calculate a weighted score corresponding to each server according to preset weights respectively corresponding to the resource indicator and the service response time of each server;
an evaluation score calculation unit 513 configured to determine an evaluation score of each server as service state information based on the weighted score.
As an implementation manner of the embodiment of the present invention, the information acquiring unit 511 may include:
an information obtaining subunit (not shown in fig. 5 to 7) configured to obtain the service response time and the resource indicator of each server from a preset time sequence database.
The acquired service response time of each server and the acquired resource indexes of each server are recorded in the time sequence database.
As an implementation manner of the embodiment of the present invention, the apparatus may further include:
a response time obtaining module (not shown in fig. 5-7) configured to obtain the service response time of each server through a preset timing task before obtaining the service response time and the resource indicator of each server;
a data write module (not shown in FIGS. 5-7) for writing the service response time to the timing database.
As an implementation manner of the embodiment of the present invention, the target server determining module 530 may include:
a highest score determining unit (not shown in fig. 5-7) for determining a highest score among the evaluation scores;
and a target server determining unit (not shown in fig. 5-7) for determining the server corresponding to the highest score as the target server.
An embodiment of the present invention further provides an electronic device, as shown in fig. 8, the electronic device may include a processor 801, a communication interface 802, a memory 803, and a communication bus 804, where the processor 801, the communication interface 802, and the memory 803 complete mutual communication through the communication bus 804,
a memory 803 for storing a computer program;
the processor 801 is configured to implement the following steps when executing the program stored in the memory 803:
responding to the trigger operation aiming at the target service, and determining the service state information of each server according to the resource index and the service response time of each server;
selecting a target server from the servers based on the service state information;
deploying the target service to the target server.
In the solution provided by the embodiment of the present invention, the electronic device may determine the service state information of each server according to the resource index and the service response time of each server in response to the trigger operation for the target service, and then select the target server from each server based on the service state information, and further deploy the target service to the target server. The service response time can directly reflect the service level of the server, so the service state information can be used for accurately evaluating the service level of the server, and further, the target server selected based on the service state information can better provide services to the outside, so the accuracy of service deployment can be improved, and the service level to a client is improved.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
Before the step of determining the service state information of each server according to the resource index and the service response time of each server in response to the trigger operation for the target service, the method may further include:
the method comprises the steps of obtaining response time of services operated by each server, determining the service as a target service when the service with the response time not meeting preset conditions exists, and determining to obtain triggering operation aiming at the target service;
or the like, or, alternatively,
when a new service to be deployed is acquired, determining that the service to be deployed is a target service, and determining to acquire a trigger operation for the target service.
The step of determining the service state information of each server according to the resource index and the service response time of each server may include:
acquiring service response time and resource indexes of each server;
calculating a weighted score corresponding to each server according to the preset weight corresponding to the resource index and the service response time of each server;
and determining the evaluation score of each server based on the weighted score as service state information.
The step of obtaining the service response time and the resource index of each server may include:
and acquiring the service response time and the resource index of each server from a preset time sequence database.
The acquired service response time of each server and the acquired resource indexes of each server are recorded in the time sequence database.
Before the step of obtaining the service response time and the resource index of each server, the method may further include:
acquiring the service response time of each server through a preset timing task;
writing the service response time to the timing database.
The step of selecting a target server from the servers based on the service state information may include:
determining a highest score of the evaluation scores;
and determining the server corresponding to the highest score as a target server.
An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and when executed by a processor, the computer program implements the following steps:
when the triggering operation aiming at the target service is responded, the service state information of each server is determined according to the resource index and the service response time of each server;
selecting a target server from the servers based on the service state information;
deploying the target service to the target server.
In the solution provided in the embodiment of the present invention, when the computer program is executed by the processor, the computer program may determine the service state information of each server according to the resource index and the service response time of each server when responding to the trigger operation for the target service, and then select the target server from each server based on the service state information, and further deploy the target service to the target server. The service response time can directly reflect the service level of the server, so the service state information can be used for accurately evaluating the service level of the server, and further, the target server selected based on the service state information can better provide services to the outside, so the accuracy of service deployment can be improved, and the service level to a client is improved.
Before the step of determining the service state information of each server according to the resource index and the service response time of each server in response to the trigger operation for the target service, the method may further include:
the method comprises the steps of obtaining response time of services operated by each server, determining the service as a target service when the service with the response time not meeting preset conditions exists, and determining to obtain triggering operation aiming at the target service;
or the like, or, alternatively,
when a new service to be deployed is acquired, determining that the service to be deployed is a target service, and determining to acquire a trigger operation for the target service.
The step of determining the service state information of each server according to the resource index and the service response time of each server may include:
acquiring service response time and resource indexes of each server;
calculating a weighted score corresponding to each server according to the preset weight corresponding to the resource index and the service response time of each server;
and determining the evaluation score of each server based on the weighted score as service state information.
The step of obtaining the service response time and the resource index of each server may include:
and acquiring the service response time and the resource index of each server from a preset time sequence database.
The acquired service response time of each server and the acquired resource indexes of each server are recorded in the time sequence database.
Before the step of obtaining the service response time and the resource index of each server, the method may further include:
acquiring the service response time of each server through a preset timing task;
writing the service response time to the timing database.
The step of selecting a target server from the servers based on the service state information may include:
determining a highest score of the evaluation scores;
and determining the server corresponding to the highest score as a target server.
It should be noted that, for the above-mentioned apparatus, electronic device and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (14)

1. A method for service deployment, the method comprising:
responding to the trigger operation aiming at the target service, and determining the service state information of each server according to the resource index and the service response time of each server;
selecting a target server from the servers based on the service state information;
deploying the target service to the target server.
2. The method of claim 1, wherein prior to the step of determining the service status information of each server according to the resource indicator and the service response time of each server in response to the triggering operation for the target service, the method further comprises:
the method comprises the steps of obtaining response time of services operated by each server, determining the service as a target service when the service with the response time not meeting preset conditions exists, and determining to obtain triggering operation aiming at the target service;
or the like, or, alternatively,
when a new service to be deployed is acquired, determining that the service to be deployed is a target service, and determining to acquire a trigger operation for the target service.
3. The method according to claim 1 or 2, wherein the step of determining the service status information of each server according to the resource index and the service response time of each server comprises:
acquiring service response time and resource indexes of each server;
calculating a weighted score corresponding to each server according to the preset weight corresponding to the resource index and the service response time of each server;
and determining the evaluation score of each server based on the weighted score as service state information.
4. The method of claim 3, wherein the step of obtaining the service response time and the resource indicator of each server comprises:
and acquiring the service response time and the resource index of each server from a preset time sequence database, wherein the acquired service response time of each server and the acquired resource index of each server are recorded in the time sequence database.
5. The method of claim 4, wherein prior to the step of obtaining the service response time and resource metrics for each server, the method further comprises:
acquiring the service response time of each server through a preset timing task;
writing the service response time to the timing database.
6. The method of claim 3, wherein said step of selecting a target server from said servers based on said service status information comprises:
determining a highest score of the evaluation scores;
and determining the server corresponding to the highest score as a target server.
7. A service deployment apparatus, characterized in that the apparatus comprises:
the service state information determining module is used for responding to the triggering operation aiming at the target service and determining the service state information of each server according to the resource index and the service response time of each server;
a target server determination module, configured to select a target server from the servers based on the service state information;
and the target service deployment module is used for deploying the target service to the target server.
8. The apparatus of claim 7, wherein the apparatus further comprises:
the trigger operation determining module is used for acquiring the response time of the service operated by each server before determining the service state information of each server according to the resource index and the service response time of each server in response to the trigger operation aiming at the target service, determining the service as the target service when the service with the response time not meeting the preset condition exists, and determining to acquire the trigger operation aiming at the target service;
or the like, or, alternatively,
the method comprises the steps of determining that a service to be deployed is a target service when a new service to be deployed is obtained, and determining that a trigger operation aiming at the target service is obtained.
9. The apparatus of claim 7 or 8, wherein the service state information determination module comprises:
the information acquisition unit is used for acquiring the service response time and the resource index of each server;
the weighted score calculating unit is used for calculating the weighted score corresponding to each server according to the preset weight respectively corresponding to the resource index and the service response time of each server;
and the evaluation score calculation unit is used for determining the evaluation score of each server based on the weighted score as service state information.
10. The apparatus of claim 9, wherein the information acquisition unit comprises:
and the information acquisition subunit is configured to acquire the service response time and the resource index of each server from a preset time sequence database, where the acquired service response time of each server and the acquired resource index of each server are recorded in the time sequence database.
11. The apparatus of claim 10, wherein the apparatus further comprises:
the response time acquisition module is used for acquiring the service response time of each server through a preset timing task before the service response time and the resource index of each server are acquired;
and the data writing module is used for writing the service response time into the time sequence database.
12. The apparatus of claim 9, wherein the target server determination module comprises:
a highest score determining unit for determining a highest score among the evaluation scores;
and the target server determining unit is used for determining the server corresponding to the highest score as the target server.
13. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
the processor, when executing the program stored in the memory, implementing the method steps of any of claims 1-6.
14. A computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method steps of any of claims 1-6.
CN202010412963.8A 2020-05-15 2020-05-15 Service deployment method, device, electronic equipment and storage medium Pending CN111597047A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010412963.8A CN111597047A (en) 2020-05-15 2020-05-15 Service deployment method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010412963.8A CN111597047A (en) 2020-05-15 2020-05-15 Service deployment method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111597047A true CN111597047A (en) 2020-08-28

Family

ID=72182848

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010412963.8A Pending CN111597047A (en) 2020-05-15 2020-05-15 Service deployment method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111597047A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115348234A (en) * 2022-08-10 2022-11-15 山石网科通信技术股份有限公司 Server detection method and device and electronic equipment

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6327622B1 (en) * 1998-09-03 2001-12-04 Sun Microsystems, Inc. Load balancing in a network environment
US20080270199A1 (en) * 2007-04-30 2008-10-30 David Michael Chess Methods and apparatus for management of heterogeneous workloads
CN105530313A (en) * 2015-12-21 2016-04-27 中国石油大学(华东) Context sensing service migrating method based on OSGi pervasive cloud environment
CN106657367A (en) * 2016-12-30 2017-05-10 北京三快在线科技有限公司 Service data acquisition method, device and system
CN107168797A (en) * 2017-05-12 2017-09-15 中国人民解放军信息工程大学 Resource regulating method based on dynamic game under cloud environment
CN108769101A (en) * 2018-04-03 2018-11-06 北京奇艺世纪科技有限公司 A kind of information processing method, client and system
CN109167812A (en) * 2018-08-02 2019-01-08 网宿科技股份有限公司 Evaluation services quality, the method for determining adjustable strategies, server and storage medium
CN109408227A (en) * 2018-09-19 2019-03-01 平安科技(深圳)有限公司 Load-balancing method, device and storage medium
CN109710412A (en) * 2018-12-28 2019-05-03 广州市巨硅信息科技有限公司 A kind of Nginx load-balancing method based on dynamical feedback
CN110389822A (en) * 2019-07-29 2019-10-29 北京金山云网络技术有限公司 The node scheduling method, apparatus and server of execution task
CN110471761A (en) * 2019-07-24 2019-11-19 中南民族大学 Control method, user equipment, storage medium and the device of server
CN110647392A (en) * 2018-06-26 2020-01-03 山东北邮信息技术产业研究院有限公司 Intelligent elastic expansion method based on container cluster

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6327622B1 (en) * 1998-09-03 2001-12-04 Sun Microsystems, Inc. Load balancing in a network environment
US20080270199A1 (en) * 2007-04-30 2008-10-30 David Michael Chess Methods and apparatus for management of heterogeneous workloads
CN105530313A (en) * 2015-12-21 2016-04-27 中国石油大学(华东) Context sensing service migrating method based on OSGi pervasive cloud environment
CN106657367A (en) * 2016-12-30 2017-05-10 北京三快在线科技有限公司 Service data acquisition method, device and system
CN107168797A (en) * 2017-05-12 2017-09-15 中国人民解放军信息工程大学 Resource regulating method based on dynamic game under cloud environment
CN108769101A (en) * 2018-04-03 2018-11-06 北京奇艺世纪科技有限公司 A kind of information processing method, client and system
CN110647392A (en) * 2018-06-26 2020-01-03 山东北邮信息技术产业研究院有限公司 Intelligent elastic expansion method based on container cluster
CN109167812A (en) * 2018-08-02 2019-01-08 网宿科技股份有限公司 Evaluation services quality, the method for determining adjustable strategies, server and storage medium
CN109408227A (en) * 2018-09-19 2019-03-01 平安科技(深圳)有限公司 Load-balancing method, device and storage medium
CN109710412A (en) * 2018-12-28 2019-05-03 广州市巨硅信息科技有限公司 A kind of Nginx load-balancing method based on dynamical feedback
CN110471761A (en) * 2019-07-24 2019-11-19 中南民族大学 Control method, user equipment, storage medium and the device of server
CN110389822A (en) * 2019-07-29 2019-10-29 北京金山云网络技术有限公司 The node scheduling method, apparatus and server of execution task

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115348234A (en) * 2022-08-10 2022-11-15 山石网科通信技术股份有限公司 Server detection method and device and electronic equipment
CN115348234B (en) * 2022-08-10 2023-11-03 山石网科通信技术股份有限公司 Server detection method and device and electronic equipment

Similar Documents

Publication Publication Date Title
EP3296876B1 (en) Systems and methods for predicting performance of applications on an internet of things (iot) platform
Rasooli et al. COSHH: A classification and optimization based scheduler for heterogeneous Hadoop systems
US11146497B2 (en) Resource prediction for cloud computing
US10783002B1 (en) Cost determination of a service call
CN112506643A (en) Load balancing method and device of distributed system and electronic equipment
CN107341029B (en) Method and device for acquiring system resource deployment strategy and electronic equipment
CN114095567B (en) Data access request processing method and device, computer equipment and medium
US9292039B2 (en) Adaptive service timeouts
US11514479B1 (en) Adaptive bidding for networked advertising
CN113505272B (en) Control method and device based on behavior habit, electronic equipment and storage medium
KR102195629B1 (en) Method for selecting workers based on capability of work in crowdsourcing based projects for artificial intelligence training data generation
CN111562884B (en) Data storage method and device and electronic equipment
CN111064802B (en) Network request processing method and device, electronic equipment and storage medium
CN110233840B (en) Service processing method, device, equipment and storage medium
CN114237852A (en) Task scheduling method, device, server and storage medium
CN111597047A (en) Service deployment method, device, electronic equipment and storage medium
CN112948262A (en) System test method, device, computer equipment and storage medium
CN104992060A (en) User age estimation method and apparatus
CN112134958A (en) Data request method, device, server and storage medium
KR102464688B1 (en) Method and apparatus for detrmining event level of monitoring result
CN116955148A (en) Service system testing method, device, equipment, storage medium and product
CN110019008A (en) Data storage method and device
CN113656046A (en) Application deployment method and device
CN113468398A (en) Book level determination method, computing device and computer storage medium
CN113746920A (en) Data forwarding method and device, electronic equipment 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