CN109361525B - Method, device, control terminal and medium for restarting distributed deployment of multiple services - Google Patents

Method, device, control terminal and medium for restarting distributed deployment of multiple services Download PDF

Info

Publication number
CN109361525B
CN109361525B CN201811248684.1A CN201811248684A CN109361525B CN 109361525 B CN109361525 B CN 109361525B CN 201811248684 A CN201811248684 A CN 201811248684A CN 109361525 B CN109361525 B CN 109361525B
Authority
CN
China
Prior art keywords
target
target service
heartbeat information
restart command
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811248684.1A
Other languages
Chinese (zh)
Other versions
CN109361525A (en
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.)
Zhuhai Pilot Technology Co ltd
Original Assignee
Zhuhai Pilot 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 Zhuhai Pilot Technology Co ltd filed Critical Zhuhai Pilot Technology Co ltd
Priority to CN201811248684.1A priority Critical patent/CN109361525B/en
Publication of CN109361525A publication Critical patent/CN109361525A/en
Application granted granted Critical
Publication of CN109361525B publication Critical patent/CN109361525B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/12Arrangements for remote connection or disconnection of substations or of equipment thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users

Abstract

The invention discloses a method for restarting distributed deployment of multiple services, wherein the services are deployed in a server, and the method comprises the following steps: receiving heartbeat information sent by a target service through a forwarding mechanism, and judging whether the target service is in an operating state or not according to the heartbeat information; and sending a restart command to the forwarding mechanism when the target service is in the running state so that the target service reads and executes the restart command. The invention also discloses a device for restarting the distributed deployment of the multi-service, a control terminal and a computer readable storage medium. The invention receives the heartbeat information of the target service through the forwarding mechanism to determine whether the target service is in the running state, and sends the restart command through the forwarding mechanism when the target service is in the running state, so that the control terminal can restart the service without having the login authority of the server.

Description

Method, device, control terminal and medium for restarting distributed deployment of multiple services
Technical Field
The present invention relates to the technical field of service restart, and in particular, to a method, an apparatus, a control terminal, and a medium for restarting distributed deployment of multiple services.
Background
The method for restarting the service by the existing control terminal user mostly needs to acquire the login permission of all corresponding servers, and then the target service (i.e. the service to be restarted) is restarted by the server, so that the operation and maintenance workload is increased, the operation and maintenance cost is obviously increased, events of restarting one or two services in a missing or wrong way are easy to occur, the user experience is reduced, and the safety is poor. Moreover, since the control terminal user may not have the login authority of one or more or even all servers, and further, direct communication between the service and the control terminal may not be possible, in such a case, the control terminal user cannot restart the target service.
Disclosure of Invention
In order to overcome the defects of the prior art, an object of the present invention is to provide a method for restarting distributed deployment of multiple services, which receives heartbeat information of a target service through a forwarding mechanism to determine whether the target service is in a running state, and sends a restart command through the forwarding mechanism in the running state, so that a control terminal can restart the service without having a login right of a server.
The second purpose of the present invention is to provide a device for restarting distributed deployment of multiple services, which receives heartbeat information of a target service through a forwarding mechanism to determine whether the target service is in an operating state, and sends a restart command through the forwarding mechanism in the operating state, so that a control terminal can restart the service without having a login authority of a server.
The invention also aims to provide a control terminal for realizing the restarting distributed deployment multi-service method.
It is a fourth object of the present invention to provide a computer readable storage medium storing the above-described method for restarting distributed deployment of multiple services.
One of the purposes of the invention is realized by adopting the following technical scheme:
a method of restarting a distributed deployment of multiple services, the services deployed in a server, comprising the steps of:
receiving heartbeat information sent by a target service through a forwarding mechanism, and judging whether the target service is in an operating state or not according to the heartbeat information;
and sending a restart command to the forwarding mechanism when the target service is in the running state so that the target service reads and executes the restart command.
Further, the forwarding mechanism is a target database, and the target database is a database pointed by a server where the target service is located;
receiving heartbeat information sent by a target service through a forwarding mechanism, and judging whether the target service is in an operating state according to the heartbeat information, wherein the method comprises the following steps:
sending heartbeat information to a target database at preset intervals by a target service, wherein the target database stores the heartbeat information, a control terminal acquires the heartbeat information through the target database and judges whether the heartbeat information is updated, and if the heartbeat information is updated, the target service is in a running state;
when the target service is in a running state, sending a restart command to the forwarding mechanism so that the target service reads and executes the restart command, wherein the restart command comprises the following steps:
the control terminal sends a restart command to a target database, the target database stores the restart command, the target service reads the restart command from the target database at regular time, the restart operation is executed according to the restart command, and the restart command in the target database is deleted.
Further, the forwarding mechanism is a target shared file, and the target shared file is a shared file corresponding to a server where the target service is located;
receiving heartbeat information sent by a target service through a forwarding mechanism, and judging whether the target service is in an operating state according to the heartbeat information, wherein the method comprises the following steps:
sending heartbeat information to a target shared file at preset intervals by a target service, storing the heartbeat information by the target shared file, acquiring the heartbeat information by a control terminal through the target shared file, judging whether the heartbeat information is updated or not, and if so, keeping the target service in an operating state;
when the target service is in a running state, sending a restart command to the forwarding mechanism so that the target service reads and executes the restart command, wherein the restart command comprises the following steps:
the control terminal sends a restart command to a target shared file, the target shared file stores the restart command, the target service reads the restart command from the target shared file at regular time, executes restart operation according to the restart command, and deletes the restart command in the target shared file.
Further, the forwarding mechanism is a target third-party interface, and the target third-party interface is a third-party interface connected with a server where the target service is located;
receiving heartbeat information sent by a target service through a forwarding mechanism, and judging whether the target service is in an operating state according to the heartbeat information, wherein the method comprises the following steps:
the target service interval preset period sends heartbeat information to a target third-party interface, the target third-party interface stores the heartbeat information, a control terminal obtains the heartbeat information through the target third-party interface and judges whether the heartbeat information is updated or not, and if the heartbeat information is updated, the target service is in a running state;
when the target service is in a running state, sending a restart command to the forwarding mechanism so that the target service reads and executes the restart command, wherein the restart command comprises the following steps:
the control terminal sends a restart command to a target third-party interface, the target third-party interface stores the restart command, the target service regularly reads the restart command from the target third-party interface, the restart operation is executed according to the restart command, and the restart command in a target shared file is deleted.
The second purpose of the invention is realized by adopting the following technical scheme:
an apparatus to restart distributed deployment of multiple services, comprising:
the detection module is used for receiving heartbeat information sent by a target service through a forwarding mechanism and judging whether the target service is in a running state or not according to the heartbeat information;
and the restarting module is used for sending a restarting command to the forwarding mechanism when the target service is in the running state so as to enable the target service to read and execute the restarting command.
The third purpose of the invention is realized by adopting the following technical scheme:
a control terminal, comprising: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method of restarting distributed deployment of multiple services which is one of the objects of the present invention.
The fourth purpose of the invention is realized by adopting the following technical scheme:
a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method of restarting a distributed deployment of multiple services which is one of the objects of the invention.
Compared with the prior art, the invention has the beneficial effects that:
the invention receives the heartbeat information of the target service through the forwarding mechanism to determine whether the target service is in the running state, and sends the restart command through the forwarding mechanism when the target service is in the running state, so that the control terminal can restart the service without having the login authority of the server, the workload of an operation and maintenance engineer is greatly reduced, the operation and maintenance cost is reduced, the problem of operation and maintenance missing operation restart is reduced, and the user experience of a product is improved.
Drawings
Fig. 1 is a flowchart of a method for restarting a distributed deployment of multiple services according to a first embodiment of the present invention;
FIG. 2 is a block diagram of a method for restarting a distributed deployment of multiple services according to a second embodiment of the present invention;
FIG. 3 is a block diagram of a method for restarting a distributed deployment of multiple services according to a third embodiment of the present invention;
FIG. 4 is a block diagram of a method for restarting a distributed deployment of multiple services according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a restart distributed multi-service deployment apparatus according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a control terminal according to a sixth embodiment of the present invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict.
Example one
The embodiment of the invention discloses a method for restarting distributed deployment of multiple services, wherein the services are deployed in servers, one server can deploy multiple services, and the multiple services can be respectively deployed in different servers, the method can be executed by hardware or/and software, and please refer to fig. 1, and the method comprises the following steps:
110. and receiving heartbeat information sent by a target service through a forwarding mechanism, and judging whether the target service is in an operating state or not according to the heartbeat information.
The target service is a service for realizing restart of the control terminal, the target service sends heartbeat information to the forwarding mechanism once at intervals of a preset period (for example, 30s, 1min, 5min and the like), the target service is accompanied by a unique service identification number (GUID) when sending the heartbeat information, the forwarding mechanism stores the heartbeat information, the control terminal is waited to read the heartbeat information from the forwarding mechanism regularly, the control terminal confirms the heartbeat information of the target service according to the unique service identification number, and then judges the running state of the target service according to the heartbeat information, so that the control terminal can obtain the running state of the service without logging in a server, specifically, when two adjacent times of heartbeat information read by the control terminal from the forwarding mechanism are different, the heartbeat information is updated, the target service is alive, namely, the target service is in the running state, and 120 steps can be executed. And otherwise, the target service is not updated, after comparison is carried out through multiple times of heartbeat information, if the heartbeat information is not changed, the target service is confirmed to be in a stop state, and the target service is not restarted.
120. And sending a restart command to the forwarding mechanism when the target service is in the running state so that the target service reads and executes the restart command.
The control terminal sends a restart command to the forwarding mechanism, the restart command is accompanied by a unique service identification number (GUID) of the target service, the forwarding mechanism stores the restart command, the target service is communicated with the forwarding mechanism at regular time, and the corresponding restart command is read according to the unique service identification number, namely: if the corresponding restart command is read, executing the restart operation, deleting the corresponding restart command in the forwarding mechanism, and simultaneously recording a restart log in a database or a text file corresponding to the target service, namely if the server where the target service is located has a pointed database, recording the restart log in the database, and if the server where the target service is located does not have the pointed database, recording the restart log in a corresponding text file in the server where the target service is located, wherein the text file is in a folder where the target service is located; otherwise, if the corresponding restart command is not read, the reading to the forwarding mechanism is continued in a timing mode.
The heartbeat information of the target service is received through the forwarding mechanism to determine whether the target service is in the running state, and when the target service is in the running state, the forwarding mechanism sends the restart command, so that the control terminal can restart the service without having the login authority of the server, the workload of an operation and maintenance engineer is greatly reduced, the operation and maintenance cost is reduced, the problem of operation and maintenance missing operation restart is reduced, and the user experience of a product is improved.
Example two
The second embodiment of the present invention discloses a method for restarting distributed deployment of multiple services, where a service is deployed in a server, one server may deploy multiple services, and multiple services may be deployed in different servers respectively, and the method may be executed by hardware or/and software, and as shown in fig. 2, the method includes the following steps:
and receiving heartbeat information sent by a target service through a target database, and judging whether the target service is in an operating state or not according to the heartbeat information.
The target service, that is, the service 401 in which the control terminal 201 is to implement the restart, sends heartbeat information to a target database at intervals of a preset period (for example, 30s, 1min, 5min, etc.), the target service attaches a unique service identification number (GUID) when sending the heartbeat information, the target database is the database 301 to which the server in which the target service is located, the target database stores the heartbeat information, waits for the control terminal to read the heartbeat information from the target database at regular time, the control terminal determines the heartbeat information of the target service according to the unique service identification number, and further determines the running state of the target service according to the heartbeat information, so that the control terminal can obtain the running state of the service without logging in the server, and specifically, when the two adjacent heartbeat information read by the control terminal from the target database are different, the heartbeat information is updated, the target service may perform a restart operation alive, i.e. in a running state. And otherwise, the target service is not updated, after comparison is carried out through multiple times of heartbeat information, if the heartbeat information is not changed, the target service is confirmed to be in a stop state, and the target service is not restarted.
And when the target service is in a running state, sending a restart command to the target database so that the target service reads and executes the restart command.
The control terminal sends a restart command to the target database, the restart command is accompanied by a unique service identification number (GUID) of the target service, the target database stores the restart command (stored in a target database configuration table), the target service is communicated with the target database at regular time, and the corresponding restart command is read according to the unique service identification number, namely: if the corresponding restart command is read, executing the restart operation, deleting the corresponding restart command in the target database, and simultaneously recording a restart log in a database or a text file corresponding to the target service, namely recording the restart log in the database if a server where the target service is located has a pointed database; otherwise, if the corresponding restart command is not read, the target database is continuously read at regular time.
The heartbeat information of the target service is received through the target database to determine whether the target service is in the running state, and when the target service is in the running state, the target database sends a restart command, so that the control terminal can restart the service without having the login authority of the server, the workload of an operation and maintenance engineer is greatly reduced, the operation and maintenance cost is reduced, the problem of operation and maintenance missing operation restart is reduced, and the user experience of a product is improved.
EXAMPLE III
The third embodiment of the present invention discloses a method for restarting distributed deployment of multiple services, where a service is deployed in a server, one server may deploy multiple services, and multiple services may be deployed in different servers respectively, and the method may be executed by hardware or/and software, and as shown in fig. 3, the method includes the following steps:
and receiving heartbeat information sent by a target service through a target shared file, and judging whether the target service is in an operating state or not according to the heartbeat information.
The target service, that is, the service 402 for the control terminal 202 to implement the restart, sends heartbeat information to the target shared file once at preset intervals (for example, 30s, 1min, 5min, and the like), when the target service sends the heartbeat information, the target service attaches a unique service identification number (GUID), the target shared file is the shared file 302 corresponding to the server where the target service is located, generally, one server corresponds to one shared file, the target shared file stores the heartbeat information, waits for the control terminal to read the heartbeat information from the target shared file at regular time, the control terminal determines the heartbeat information of the target service according to the unique service identification number, and further determines the running state of the target service according to the heartbeat information, so that the control terminal can obtain the running state of the service without logging in the server, specifically, when the two adjacent heartbeat information read by the control terminal from the target shared file are different, it indicates that the heartbeat information is updated, and the target service is alive, i.e. in a running state, and can perform a restart operation. And otherwise, the target service is not updated, after comparison is carried out through multiple times of heartbeat information, if the heartbeat information is not changed, the target service is confirmed to be in a stop state, and the target service is not restarted.
And when the target service is in a running state, sending a restart command to the target shared file so that the target service reads and executes the restart command.
The control terminal sends a restart command to a target shared file, the restart command is accompanied by a unique service identification number (GUID) of a target service, the target shared file stores the restart command (stored in a target shared file configuration table), the target service communicates with the target shared file at regular time, and the corresponding restart command is read according to the unique service identification number, namely: if the corresponding restart command is read, executing the restart operation, deleting the corresponding restart command in the target shared file, and simultaneously recording a restart log in a corresponding text file in a server where the target service is located, wherein the text file is in a folder where the target service is located; otherwise, if the corresponding restart command is not read, the target shared file is read at regular time.
The heartbeat information of the target service is received through the target shared file to determine whether the target service is in the running state, and when the target service is in the running state, the restart command is sent through the target shared file, so that the control terminal can restart the service without having the login authority of the server, the workload of an operation and maintenance engineer is greatly reduced, the operation and maintenance cost is reduced, the problem of operation and maintenance missing operation restart is reduced, and the user experience of a product is improved.
Example four
The fourth embodiment of the present invention discloses a method for restarting distributed deployment of multiple services, where a service is deployed in a server, one server may deploy multiple services, and multiple services may be deployed in different servers respectively, and the method may be executed by hardware or/and software, and as shown in fig. 4, the method includes the following steps:
and receiving heartbeat information sent by a target service through a target third-party interface, and judging whether the target service is in an operating state or not according to the heartbeat information.
The target service, that is, the service 403 for the control terminal 203 to implement the restart, sends heartbeat information to a target third-party interface at preset intervals (for example, 30s, 1min, 5min, etc.), the target service attaches a unique service identification number (GUID) when sending the heartbeat information, the target third-party interface is the third-party interface 303 corresponding to the server where the target service is located, the target third-party interface stores the heartbeat information (stored in a storage medium corresponding to the third-party interface), waits for the control terminal to read the heartbeat information from the target third-party interface at regular time, the control terminal determines the heartbeat information of the target service according to the unique service identification number, and further determines the running state of the target service according to the heartbeat information, so that the control terminal can obtain the running state of the service without logging in the server, specifically, when the two adjacent heartbeat information read by the control terminal from the target third-party interface are different, it indicates that the heartbeat information is updated, and the target service is alive, i.e. in a running state, and can perform a restart operation. And otherwise, the target service is not updated, after comparison is carried out through multiple times of heartbeat information, if the heartbeat information is not changed, the target service is confirmed to be in a stop state, and the target service is not restarted.
And when the target service is in a running state, sending a restart command to the target third-party interface so that the target service reads and executes the restart command.
The control terminal sends a restart command to the target third-party interface, the restart command is accompanied by a unique service identification number (GUID) of the target service, the target third-party interface stores the restart command (stored in a configuration table of the target third-party interface), the target service is communicated with the target third-party interface at regular time, and the corresponding restart command is read according to the unique service identification number, namely: if the corresponding restart command is read, executing the restart operation, deleting the corresponding restart command in the target third-party interface, and simultaneously recording a restart log in a database or a text file corresponding to the target service, namely if the server where the target service is located has a pointed database, recording the restart log in the database, and if the server where the target service is located does not have the pointed database, recording the restart log in a text file corresponding to the server where the target service is located, wherein the text file is in a folder where the target service is located; otherwise, if the corresponding restart command is not read, the target third-party interface continues to be read regularly.
The heartbeat information of the target service is received through the target third-party interface so as to determine whether the target service is in the running state, and when the target service is in the running state, the target third-party interface sends the restart command, so that the control terminal can restart the service without having the login authority of the server, the workload of an operation and maintenance engineer is greatly reduced, the operation and maintenance cost is reduced, the problem of operation and maintenance missing operation restart is reduced, and the user experience of a product is improved.
EXAMPLE five
An embodiment five discloses a device for restarting distributed deployment of multiple services corresponding to the above embodiment, please refer to fig. 5, which includes:
the detection module 510 is configured to receive heartbeat information sent by a target service through a forwarding mechanism, and determine whether the target service is in a running state according to the heartbeat information;
the restart module 520 is configured to send a restart command to the forwarding mechanism when the target service is in a running state, so that the target service reads and executes the restart command.
EXAMPLE six
Fig. 6 is a schematic structural diagram of a control terminal according to a third embodiment of the present invention, as shown in fig. 6, the control terminal includes a processor 610, a memory 620, an input device 630, and an output device 640; the number of processors 610 in the computer device may be one or more, and one processor 610 is taken as an example in fig. 6; the processor 610, the memory 620, the input device 630 and the output device 640 in the control terminal may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 6.
The memory 620, which is a computer-readable storage medium, may be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the method for restarting the distributed deployment of multi-services in the embodiments of the present invention (e.g., the detection module 510 and the restart module 520 in the apparatus for restarting the distributed deployment of multi-services). The processor 610 executes various functional applications of the control terminal and data processing by executing software programs, instructions and modules stored in the memory 620, that is, implements the above-described method of restarting the distributed deployment of the multi-service.
The memory 620 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 620 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 620 may further include memory located remotely from the processor 610, which may be connected to the control terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Input device 630 may be used for user information. The output device 640 may include a display device such as a display screen.
EXAMPLE seven
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a method for restarting distributed deployment of multiple services, the method including:
receiving heartbeat information sent by a target service through a forwarding mechanism, and judging whether the target service is in an operating state or not according to the heartbeat information;
and sending a restart command to the forwarding mechanism when the target service is in the running state so that the target service reads and executes the restart command.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the method operations described above, and may also perform related operations in the method for restarting distributed deployment of multiple services provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a control terminal (which may be a mobile phone, a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the above embodiment of restarting the distributed multi-service deployment apparatus, each unit and each module included in the apparatus are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
The above embodiments are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited thereby, and any insubstantial changes and substitutions made by those skilled in the art based on the present invention are within the protection scope of the present invention.

Claims (7)

1. A method for restarting a distributed deployment of multiple services, said services being deployed in servers, characterized by comprising the steps of:
receiving heartbeat information sent by a target service through a forwarding mechanism, and judging whether the target service is in an operating state or not according to the heartbeat information;
when the target service is in a running state, sending a restart command to a forwarding mechanism so that the target service reads and executes the restart command;
receiving heartbeat information sent by a target service through a forwarding mechanism, and judging whether the target service is in an operating state or not according to the heartbeat information, specifically, sending the heartbeat information with a service unique identification number to the forwarding mechanism at intervals of a preset period by the target server, storing the heartbeat information by the forwarding mechanism, reading the heartbeat information by the control terminal through the forwarding mechanism, confirming the heartbeat information of the target service according to the service unique identification number, and judging the operating state of the target service according to the heartbeat information; if the heartbeat information of the two adjacent times is different, updating the heartbeat information, and keeping the target service in a running state; if the heartbeat information is not changed, the target service is in a stopped state.
2. The method of restarting distributed deployment of multiple services of claim 1 wherein said forwarding mechanism is a target database, said target database being a database pointed to by a server where the target service is located;
receiving heartbeat information sent by a target service through a forwarding mechanism, and judging whether the target service is in an operating state according to the heartbeat information, wherein the method comprises the following steps:
sending heartbeat information to a target database at preset intervals by a target service, wherein the target database stores the heartbeat information, a control terminal acquires the heartbeat information through the target database and judges whether the heartbeat information is updated, and if the heartbeat information is updated, the target service is in a running state;
when the target service is in a running state, sending a restart command to the forwarding mechanism so that the target service reads and executes the restart command, wherein the restart command comprises the following steps:
the control terminal sends a restart command to a target database, the target database stores the restart command, the target service reads the restart command from the target database at regular time, the restart operation is executed according to the restart command, and the restart command in the target database is deleted.
3. The method for restarting distributed deployment of multiple services according to claim 1, wherein the forwarding mechanism is a target shared file, and the target shared file is a shared file corresponding to a server where the target service is located;
receiving heartbeat information sent by a target service through a forwarding mechanism, and judging whether the target service is in an operating state according to the heartbeat information, wherein the method comprises the following steps:
sending heartbeat information to a target shared file at preset intervals by a target service, storing the heartbeat information by the target shared file, acquiring the heartbeat information by a control terminal through the target shared file, judging whether the heartbeat information is updated or not, and if so, keeping the target service in an operating state;
when the target service is in a running state, sending a restart command to the forwarding mechanism so that the target service reads and executes the restart command, wherein the restart command comprises the following steps:
the control terminal sends a restart command to a target shared file, the target shared file stores the restart command, the target service reads the restart command from the target shared file at regular time, executes restart operation according to the restart command, and deletes the restart command in the target shared file.
4. The method of restarting distributed deployment of multiple services of claim 1 wherein said forwarding mechanism is a target third party interface, said target third party interface being a third party interface to which a server where the target service is located is connected;
receiving heartbeat information sent by a target service through a forwarding mechanism, and judging whether the target service is in an operating state according to the heartbeat information, wherein the method comprises the following steps:
the target service interval preset period sends heartbeat information to a target third-party interface, the target third-party interface stores the heartbeat information, a control terminal obtains the heartbeat information through the target third-party interface and judges whether the heartbeat information is updated or not, and if the heartbeat information is updated, the target service is in a running state;
when the target service is in a running state, sending a restart command to the forwarding mechanism so that the target service reads and executes the restart command, wherein the restart command comprises the following steps:
the control terminal sends a restart command to a target third-party interface, the target third-party interface stores the restart command, the target service regularly reads the restart command from the target third-party interface, the restart operation is executed according to the restart command, and the restart command in a target shared file is deleted.
5. An apparatus for restarting a distributed deployment of multiple services, the services deployed in a server, comprising:
the detection module is used for receiving heartbeat information sent by a target service through a forwarding mechanism and judging whether the target service is in a running state or not according to the heartbeat information;
the restarting module is used for sending a restarting command to the forwarding mechanism when the target service is in a running state so that the target service reads and executes the restarting command;
receiving heartbeat information sent by a target service through a forwarding mechanism, and judging whether the target service is in an operating state or not according to the heartbeat information, specifically, sending the heartbeat information with a service unique identification number to the forwarding mechanism at intervals of a preset period by the target server, storing the heartbeat information by the forwarding mechanism, reading the heartbeat information by the control terminal through the forwarding mechanism, confirming the heartbeat information of the target service according to the service unique identification number, and judging the operating state of the target service according to the heartbeat information; if the heartbeat information of the two adjacent times is different, updating the heartbeat information, and keeping the target service in a running state; if the heartbeat information is not changed, the target service is in a stopped state.
6. A control terminal, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of restarting distributed deployment of multiple services as recited in any one of claims 1-4.
7. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method of restarting distributed deployment of multiple services according to any one of claims 1 to 4.
CN201811248684.1A 2018-10-25 2018-10-25 Method, device, control terminal and medium for restarting distributed deployment of multiple services Active CN109361525B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811248684.1A CN109361525B (en) 2018-10-25 2018-10-25 Method, device, control terminal and medium for restarting distributed deployment of multiple services

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811248684.1A CN109361525B (en) 2018-10-25 2018-10-25 Method, device, control terminal and medium for restarting distributed deployment of multiple services

Publications (2)

Publication Number Publication Date
CN109361525A CN109361525A (en) 2019-02-19
CN109361525B true CN109361525B (en) 2021-08-13

Family

ID=65346462

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811248684.1A Active CN109361525B (en) 2018-10-25 2018-10-25 Method, device, control terminal and medium for restarting distributed deployment of multiple services

Country Status (1)

Country Link
CN (1) CN109361525B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110417586B (en) * 2019-07-18 2022-04-08 新华三大数据技术有限公司 Service monitoring method, service node, server and computer readable storage medium
CN112542002A (en) * 2019-09-23 2021-03-23 北京轻享科技有限公司 Car renting system control method and device
CN112492555A (en) * 2020-11-30 2021-03-12 珠海格力电器股份有限公司 Control instruction processing method and device
CN113438122B (en) * 2021-05-14 2022-05-17 济南浪潮数据技术有限公司 Heartbeat management method and device for server, computer equipment and medium
CN113760409A (en) * 2021-09-09 2021-12-07 广州市百果园网络科技有限公司 Service instance management method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105978721A (en) * 2016-05-11 2016-09-28 中国农业银行股份有限公司 Method, device and system for monitoring operation state of services in clustering system
CN106302618A (en) * 2015-06-11 2017-01-04 阿里巴巴集团控股有限公司 Long-range control method, remote server, management equipment and terminal
CN106354602A (en) * 2016-08-25 2017-01-25 乐视控股(北京)有限公司 Service monitoring method and equipment
CN106789191A (en) * 2016-12-06 2017-05-31 微梦创科网络科技(中国)有限公司 A kind of automatic method for restarting of distributed deployment service processes and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2008126325A1 (en) * 2007-03-30 2010-07-22 富士通株式会社 Cluster system, software update method, service providing node, and service providing program
CN102404386A (en) * 2012-01-09 2012-04-04 无锡城市云计算中心有限公司 Method for ensuring high-reliability service of metadata server group of distributed file system
TW201405303A (en) * 2012-07-30 2014-02-01 Hon Hai Prec Ind Co Ltd System and method for monitoring baseboard management controller
CN103763155A (en) * 2014-01-24 2014-04-30 国家电网公司 Multi-service heartbeat monitoring method for distributed type cloud storage system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106302618A (en) * 2015-06-11 2017-01-04 阿里巴巴集团控股有限公司 Long-range control method, remote server, management equipment and terminal
CN105978721A (en) * 2016-05-11 2016-09-28 中国农业银行股份有限公司 Method, device and system for monitoring operation state of services in clustering system
CN106354602A (en) * 2016-08-25 2017-01-25 乐视控股(北京)有限公司 Service monitoring method and equipment
CN106789191A (en) * 2016-12-06 2017-05-31 微梦创科网络科技(中国)有限公司 A kind of automatic method for restarting of distributed deployment service processes and device

Also Published As

Publication number Publication date
CN109361525A (en) 2019-02-19

Similar Documents

Publication Publication Date Title
CN109361525B (en) Method, device, control terminal and medium for restarting distributed deployment of multiple services
CN108228814B (en) Data synchronization method and device
CN111555963B (en) Message pushing method and device, electronic equipment and storage medium
CN103152390A (en) Method and device and nodes and system for node configuration of distributed storage system
CN111400777B (en) Network storage system, user authentication method, device and equipment
CN110673941A (en) Migration method of micro-services in multiple computer rooms, electronic equipment and storage medium
CN110597918A (en) Account management method and device and computer readable storage medium
CN107729213B (en) Background task monitoring method and device
CN108366098B (en) Data interaction method and device for network nodes
CN111355765B (en) Network request processing and sending method and device
CN109600257B (en) Tool deployment method, device and storage medium
CN114363334A (en) Network configuration method, device and equipment for cloud system and cloud desktop virtual machine
CN109391658B (en) Account data synchronization method and equipment, storage medium and terminal thereof
CN110196749B (en) Virtual machine recovery method and device, storage medium and electronic device
CN110661851A (en) Data exchange method and device
CN108241616B (en) Message pushing method and device
CN110798358B (en) Distributed service identification method and device, computer readable medium and electronic equipment
CN107623705B (en) Storage mode upgrading method, device and system based on video cloud storage system
CN109542841B (en) Method for creating data snapshot in cluster and terminal equipment
CN111159233A (en) Distributed caching method, system, computer device and storage medium
CN110955460A (en) Service process starting method and device, electronic equipment and storage medium
SG194072A1 (en) Authentication information processing
CN103259863B (en) Based on the system and method that the control zookeeper of cluster serves
CN111291127B (en) Data synchronization method, device, server and storage medium
CN109639849B (en) Address query processing method and service discovery device

Legal Events

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