CN111459674A - Distributed service management method and system - Google Patents

Distributed service management method and system Download PDF

Info

Publication number
CN111459674A
CN111459674A CN202010244751.3A CN202010244751A CN111459674A CN 111459674 A CN111459674 A CN 111459674A CN 202010244751 A CN202010244751 A CN 202010244751A CN 111459674 A CN111459674 A CN 111459674A
Authority
CN
China
Prior art keywords
service
server
management module
busy
response time
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
CN202010244751.3A
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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202010244751.3A priority Critical patent/CN111459674A/en
Publication of CN111459674A publication Critical patent/CN111459674A/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/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems

Abstract

The invention discloses a distributed service management method and a system, wherein the method comprises the following steps: judging whether a server cluster executing the service is busy or idle according to the average response time of a certain service in a set time period and the consumed server resource amount; if the server cluster executing the service is busy, starting a new server to execute the service; and if the server cluster which executes the service currently is idle, at least one server which executes the service is turned off. By adopting the technical scheme of the invention, the number of the servers can be automatically configured, and the utilization rate of server resources is improved.

Description

Distributed service management method and system
Technical Field
The present invention relates to the field of distributed services, and in particular, to a distributed service management method and system.
Background
In the internet era, networks are dense and inseparable, and accordingly, the network demand is increased, distributed services provide a good solution for high concurrent requests, but at present, the deployment strategy of the distributed services generally adopts artificial observation of server pressure or request response time. When the pressure of a single server is large, the number of the servers is transversely expanded manually. Thus, the labor cost is increased, and the expansion of the service is not real-time. In addition, the idle service can not be recovered in time, which causes the waste of server resources.
Disclosure of Invention
The present invention provides a distributed service management method and system, aiming at the technical problem of untimely distributed service expansion or resource waste in the prior art.
In an embodiment of the present invention, a distributed service management method is provided, which includes:
judging whether a server cluster executing the service is busy or idle according to the average response time of a certain service in a set time period and the consumed server resource amount;
if the server cluster executing the service is busy, starting a new server to execute the service;
and if the server cluster which executes the service currently is idle, at least one server which executes the service is turned off.
In the embodiment of the present invention, before determining whether a server cluster currently executing the service is busy or idle, the method further includes:
and recording the number of the service requests, the response time of each service request and the number of the servers currently executing the service in a set time period.
In the embodiment of the present invention, determining whether a server cluster currently executing the service is busy or idle according to a certain number of service requests, an average response time, and a consumed service resource amount in a set time period includes:
calculating the average response time of the service request;
calculating the average response time of the service request and the number of servers currently running the service to obtain a strategy parameter for judging whether the servers are busy;
if the strategy parameter is larger than a set first threshold value, the current server cluster is busy;
and if the strategy parameter is smaller than a set second threshold value, indicating that the current server cluster is idle.
In the embodiment of the invention, the calculation formula of the strategy parameters is as follows:
Z=a*X*Y,
wherein a is a set normalization coefficient, X is the average response time of the service request, and Y is the number of servers currently executing the service.
In the embodiment of the present invention, a first management module is used to manage a server that has already been run, a second management module is used to manage a standby server that has not been started, when the server managed by the second management module is started, the started server is brought into the first management module to be managed, and when the server managed by the first management module is closed, the closed server is brought into the second management module to be managed.
In an embodiment of the present invention, a distributed service management system includes:
the first management module is used for managing the running server;
the second management module is used for managing the standby server which is not started;
the big data platform is used for judging whether a server cluster executing the service is busy or idle according to the average response time of a certain service in a set time period and the consumed server resource amount;
the service dispatching center is used for controlling the first management module and the second management module to manage the running server and the un-started server according to the judgment result of the big data platform,
if the server cluster executing the service is busy, starting a new server to execute the service;
and if the server cluster which executes the service currently is idle, at least one server which executes the service is turned off.
In this embodiment of the present invention, the distributed service management system further includes:
and the gateway service module is used for receiving and distributing the service requests and recording the number of the service requests and the response time of each service request.
In the embodiment of the present invention, the determining, by the big data platform, whether a server cluster currently executing the service is busy or idle according to a certain service request amount, an average response time, and a consumed service resource amount in a set time period includes:
calculating the average response time of the service request;
calculating the obtained average response time and the number of servers currently running the service to obtain a strategy parameter for judging whether the servers are busy;
if the strategy parameter is larger than a set first threshold value, the current server cluster is busy;
and if the strategy parameter is smaller than a set second threshold value, indicating that the current server cluster is idle.
In the embodiment of the invention, the calculation formula of the strategy parameters is as follows:
Z=a*X*Y,
wherein a is a set normalization coefficient, X is the average response time of the service request, and Y is the number of servers currently executing the service.
In this embodiment of the present invention, when a server managed by the second management module is started, the started server is included in the first management module for management, and when the server managed by the first management module is closed, the closed server is included in the second management module for management.
Compared with the prior art, in the distributed service management method and system, the average response time of a certain service and the amount of consumed server resources in a set time period are used for judging whether a server cluster executing the service is busy or idle, and the running state of each service is monitored and detected by a service scheduling monitoring mode instead of a human, so that the number of the current servers is automatically configured, manual configuration is not needed, the labor cost can be reduced, and the server resources are utilized more in real time and efficiently.
Drawings
Fig. 1 is a schematic structural diagram of a distributed service management system according to an embodiment of the present invention.
Fig. 2 is a flowchart of a distributed service management method according to an embodiment of the present invention.
Detailed Description
As shown in fig. 1, in the embodiment of the present invention, a distributed service management system is further provided, which includes a first management module 1, a second management module 2, a gateway service module 3, a big data platform 4, and a service scheduling center 5. The following description will be made separately.
The first management module 1 is configured to manage a server that has already been operated.
And the second management module 2 manages the standby server which is not started.
It should be noted that, in a distributed service management system, a plurality of server clusters are generally provided for responding to service requests from the internet in various ways to execute these services. Each server cluster is composed of a plurality of servers for executing the same service request. In the embodiment of the present invention, a plurality of servers that have been started to operate are provided to form a server cluster, and the first management module 1 is used to manage these servers that have been operated, and a plurality of standby servers are provided, and the second management module 2 is used to manage these standby servers.
The gateway service module 3 is configured to receive and distribute a service request, send the service request to the server cluster, and return data of the server cluster executing the service to a requester. The gateway service module 3 records the response time of each service request.
And the big data platform 4 is used for judging whether a server cluster executing the service is busy or idle according to the average response time of a certain service in a set time period and the consumed server resource amount.
Specifically, the manner of determining whether a server cluster currently executing a certain service is busy or idle according to the average response time of the service and the amount of consumed server resources in a set time period is as follows:
firstly, recording the number of the service requests, the response time of each service request and the number of the servers currently running the service in a set time period;
then, calculating the average response time of the service request;
then, the obtained average response time and the number of servers currently running the service are operated to obtain a policy parameter for judging whether the server is busy, in the embodiment of the invention, the calculation formula of the policy parameter is as follows:
Z=a*X*Y,
wherein a is a set normalization coefficient, X is the average response time of the service request, and Y is the number of servers currently executing the service;
finally, judging whether the server cluster is busy or idle according to the strategy parameters:
if the strategy parameter is larger than a set first threshold value, the current server cluster is busy;
and if the strategy parameter is smaller than a set second threshold value, indicating that the current server cluster is idle.
It should be noted that, because the nature of each service function is different, some service interfaces may have a longer average response time for users to process complex objects, and some service interfaces may have a shorter average response time for processing simple logic. Therefore, it is obviously infeasible to compare the service request response time to judge the service efficiency, and therefore, in the embodiment of the present invention, the operation processing is performed according to the average response time of a certain service in each time period and the consumed server resource to obtain the policy parameter for judging whether the server is busy. The amount of server resources consumed by a certain service is the number of servers executing the service. The big data platform 4 records the number of each service request, the response time of each service request and the number of servers consumed by the service requests in real time to form historical big data, and processes the historical big data to obtain a first threshold value and a second threshold value for judging whether each server is busy or idle.
The service scheduling center 5 is configured to control the first management module 1 and the second management module 2 to manage a server that has already been operated and a server that is not started according to a determination result of the big data platform 4, and if a server cluster that currently executes the service is busy, a new server is started to execute the service; and if the server cluster which executes the service currently is idle, at least one server which executes the service is turned off.
When the server managed by the second management module 2 is started, the started server is incorporated into the first management module 1 for management; when the server managed by the first management module 1 is shut down, the shut down server is incorporated into the second management module 2 for management.
As shown in fig. 2, in an embodiment of the present invention, a distributed service management method is further provided, where the distributed service management method includes:
step S1: recording the number of certain service requests, the response time of each service request and the number of servers currently executing the service in a set time period;
step S2: judging whether a server cluster executing the service currently is busy or idle according to the average response time of the service and the consumed server resource amount;
step S3: if the server cluster executing the service is busy, starting a new server to execute the service;
step S4: and if the server cluster which executes the service currently is idle, at least one server which executes the service is turned off.
In step S2, the step of determining whether the server cluster currently executing the service is busy or idle according to the number of service requests, the average response time, and the amount of consumed service resources in a predetermined time period includes:
calculating the average response time of the service request;
calculating the average response time of the service request and the number of servers currently running the service to obtain a strategy parameter for judging whether the servers are busy;
if the strategy parameter is larger than a set first threshold value, the current server cluster is busy;
and if the strategy parameter is smaller than a set second threshold value, indicating that the current server cluster is idle.
In the embodiment of the invention, the calculation formula of the strategy parameters is as follows:
Z=a*X*Y,
wherein a is a set normalization coefficient, X is the average response time of the service request, and Y is the number of servers currently executing the service.
In summary, in the distributed service management method and system of the present invention, the average response time and the amount of consumed server resources of a certain service within a set time period are used to determine whether a server cluster executing the service is busy or idle, and the operation status of each service is monitored and detected by a service scheduling monitoring mode instead of a human, so as to automatically configure the number of current servers, without manual configuration, reduce labor cost, and make more real-time and efficient use of server resources.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. A distributed service management method, comprising:
judging whether a server cluster executing the service is busy or idle according to the average response time of a certain service in a set time period and the consumed server resource amount;
if the server cluster executing the service is busy, starting a new server to execute the service;
and if the server cluster which executes the service currently is idle, at least one server which executes the service is turned off.
2. The distributed service management method of claim 1, before determining whether a cluster of servers currently executing the service is busy or idle, further comprising:
and recording the number of the service requests, the response time of each service request and the number of the servers currently executing the service in a set time period.
3. The distributed service management method of claim 2, wherein determining whether a server cluster currently executing the service is busy or idle according to a certain number of service requests, an average response time, and an amount of consumed service resources within a set time period comprises:
calculating the average response time of the service request;
calculating the average response time of the service request and the number of servers currently running the service to obtain a strategy parameter for judging whether the servers are busy;
if the strategy parameter is larger than a set first threshold value, the current server cluster is busy;
and if the strategy parameter is smaller than a set second threshold value, indicating that the current server cluster is idle.
4. The distributed service management method of claim 1 wherein the policy parameters are calculated as follows:
Z=a*X*Y,
wherein a is a set normalization coefficient, X is the average response time of the service request, and Y is the number of servers currently executing the service.
5. The distributed service management method of claim 1, wherein a first management module is used to manage an already running server, a second management module is used to manage a non-started standby server, the started server is included in the first management module to be managed when the server managed by the second management module is started, and the closed server is included in the second management module to be managed when the server managed by the first management module is closed.
6. A distributed service management system, comprising:
the first management module is used for managing the running server;
the second management module is used for managing the standby server which is not started;
the big data platform is used for judging whether a server cluster executing the service is busy or idle according to the average response time of a certain service in a set time period and the consumed server resource amount;
the service dispatching center is used for controlling the first management module and the second management module to manage the running server and the un-started server according to the judgment result of the big data platform,
if the server cluster executing the service is busy, starting a new server to execute the service;
and if the server cluster which executes the service currently is idle, at least one server which executes the service is turned off.
7. The distributed service management system of claim 6, further comprising:
and the gateway service module is used for receiving and distributing the service requests and recording the number of the service requests and the response time of each service request.
8. The distributed service management system according to claim 7, wherein the big data platform determines whether the server cluster currently executing the service is busy or idle according to a certain service request quantity, an average response time and a consumed service resource quantity in a set time period, and includes:
calculating the average response time of the service request;
calculating the obtained average response time and the number of servers currently running the service to obtain a strategy parameter for judging whether the servers are busy;
if the strategy parameter is larger than a set first threshold value, the current server cluster is busy;
and if the strategy parameter is smaller than a set second threshold value, indicating that the current server cluster is idle.
9. The distributed service management system of claim 8 wherein the policy parameters are calculated as follows:
Z=a*X*Y,
wherein a is a set normalization coefficient, X is the average response time of the service request, and Y is the number of servers currently executing the service.
10. The distributed service management system of claim 6, wherein the server managed by the second management module is incorporated into the first management module for management when the server managed by the second management module is started, and the server managed by the first management module is incorporated into the second management module for management when the server managed by the first management module is shut down.
CN202010244751.3A 2020-03-31 2020-03-31 Distributed service management method and system Pending CN111459674A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010244751.3A CN111459674A (en) 2020-03-31 2020-03-31 Distributed service management method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010244751.3A CN111459674A (en) 2020-03-31 2020-03-31 Distributed service management method and system

Publications (1)

Publication Number Publication Date
CN111459674A true CN111459674A (en) 2020-07-28

Family

ID=71679441

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010244751.3A Pending CN111459674A (en) 2020-03-31 2020-03-31 Distributed service management method and system

Country Status (1)

Country Link
CN (1) CN111459674A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546590A (en) * 2010-12-02 2012-07-04 瑞科网信科技有限公司 System and method for distributing application traffic to servers based on dynamic service response time
CN102891868A (en) * 2011-07-19 2013-01-23 上海可鲁系统软件有限公司 Load balancing method and device for distributed system
CN105610972A (en) * 2016-02-01 2016-05-25 中博信息技术研究院有限公司 Clustered task dispatching system
CN106331150A (en) * 2016-09-18 2017-01-11 北京百度网讯科技有限公司 Method and device for scheduling cloud servers
CN107145393A (en) * 2017-04-27 2017-09-08 努比亚技术有限公司 A kind of load regulation method, equipment and computer-readable recording medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546590A (en) * 2010-12-02 2012-07-04 瑞科网信科技有限公司 System and method for distributing application traffic to servers based on dynamic service response time
CN102891868A (en) * 2011-07-19 2013-01-23 上海可鲁系统软件有限公司 Load balancing method and device for distributed system
CN105610972A (en) * 2016-02-01 2016-05-25 中博信息技术研究院有限公司 Clustered task dispatching system
CN106331150A (en) * 2016-09-18 2017-01-11 北京百度网讯科技有限公司 Method and device for scheduling cloud servers
CN107145393A (en) * 2017-04-27 2017-09-08 努比亚技术有限公司 A kind of load regulation method, equipment and computer-readable recording medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李强: "《云计算及其应用》", 武汉:武汉大学出版社, pages: 12 - 17 *

Similar Documents

Publication Publication Date Title
US8473768B2 (en) Power control apparatus and method for cluster system
CN108810100B (en) Method, device and equipment for electing master node
CN111818159B (en) Management method, device, equipment and storage medium of data processing node
CN112583861B (en) Service deployment method, resource allocation method, system, device and server
CN102546256B (en) System and method used for monitoring cloud computation service
CN102045321B (en) Flow control method and system for software downloading
CN108322345A (en) A kind of dissemination method and server of fault restoration data packet
CN109343939B (en) Distributed cluster and parallel computing task scheduling method
CN111414070B (en) Case power consumption management method and system, electronic device and storage medium
CN104144183A (en) Data center system and management method for data center system
CN113608871A (en) Service processing method and device
CN112579304A (en) Resource scheduling method, device, equipment and medium based on distributed platform
CN112380005A (en) Data center energy consumption management method and system
CN109428950B (en) Automatic scheduling method and system for IP address pool
CN111459674A (en) Distributed service management method and system
CN111796933A (en) Resource scheduling method, device, storage medium and electronic equipment
CN115484167B (en) Network slice shutdown method in communication network, computer device and storage medium
CN109936471B (en) Multi-cluster resource allocation method and device
CN112148462B (en) Jenkins-based CICD process processing method
CN213876703U (en) Resource pool management system
CN114090256A (en) Application delivery load management method and system based on cloud computing
CN111625355A (en) Service balance control method and system on server
CN102238022A (en) Network management system and data acquisition method
CN115097923A (en) AI (Artificial intelligence) accelerator card voltage frequency control method and device and AI hardware acceleration platform
CN117112352A (en) Data acquisition method, device, computer 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200728

RJ01 Rejection of invention patent application after publication