CN115242615A - Server operation management method and device, electronic equipment and storage medium - Google Patents

Server operation management method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115242615A
CN115242615A CN202210761441.8A CN202210761441A CN115242615A CN 115242615 A CN115242615 A CN 115242615A CN 202210761441 A CN202210761441 A CN 202210761441A CN 115242615 A CN115242615 A CN 115242615A
Authority
CN
China
Prior art keywords
server
preset
service
result
interface
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.)
Granted
Application number
CN202210761441.8A
Other languages
Chinese (zh)
Other versions
CN115242615B (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.)
Beijing Jutongda Technology Co ltd
Original Assignee
Beijing Jutongda 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 Jutongda Technology Co ltd filed Critical Beijing Jutongda Technology Co ltd
Priority to CN202210761441.8A priority Critical patent/CN115242615B/en
Publication of CN115242615A publication Critical patent/CN115242615A/en
Application granted granted Critical
Publication of CN115242615B publication Critical patent/CN115242615B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0659Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities
    • H04L41/0661Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities by reconfiguring faulty entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Hardware Redundancy (AREA)

Abstract

The present disclosure relates to the field of information technologies, and in particular, to a method and an apparatus for managing operation of a server, an electronic device, and a storage medium. Firstly, sending an interface detection request to a main server; then monitoring an interface detection result corresponding to the interface detection request sent by the main server; and under the condition that the first monitoring result represents that the interface detection result is received and the interface detection result represents that the primary server has a first code error, the current software version of the primary server is returned to the target software version, and under the condition that the first monitoring result represents that the interface detection result is received and the interface detection result represents that the primary server has a first server error, the primary server is switched to the standby server. Therefore, according to the monitoring result of the interface detection request, the version is timely returned to the target software version or the primary server is switched to the standby server, the running reliability of the server is improved, and the user experience is improved.

Description

Server operation management method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of information technologies, and in particular, to a method and an apparatus for managing operation of a server, an electronic device, and a storage medium.
Background
With the development of information technology, the iteration of server software versions is faster and faster, for example, in the field of internet e-commerce, the internet e-commerce program updates and iterates faster and faster due to e-commerce business requirements. After the server software version is upgraded and iterated, whether the server can operate stably is crucial to improving user experience.
In the related art, a timing handshake mode is generally adopted to detect the operation condition of a server, so that the operation condition of an upper layer service in server software cannot be accurately detected, and corresponding countermeasures cannot be taken in time when the abnormal operation condition of the server is detected.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides an operation management method and apparatus for a server, an electronic device, and a storage medium.
According to a first aspect of the embodiments of the present disclosure, there is provided an operation management method for a server, where the server includes an active server and a standby server, the method including:
sending an interface detection request to the primary server, wherein the interface detection request is used for requesting to detect a service interface of the primary server;
monitoring an interface detection result corresponding to the interface detection request sent by the main server;
when a first monitoring result represents that the interface detection result is received and the interface detection result represents that a first code error occurs in the main server, the current software version of the main server is returned to a target software version, and the first code error represents that the main server captures a preset first code exception when responding to the interface detection request;
and switching the primary server to the standby server under the condition that a first monitoring result represents that the interface detection result is received and the interface detection result represents that a first server error occurs in the primary server, wherein the first server error represents that the interface detection request is not normally responded due to the primary server.
Optionally, the target software version is determined by:
taking a preset software version as the target software version; alternatively, the first and second liquid crystal display panels may be,
and taking the last version of the current software version as the target software version.
Optionally, the method further comprises:
and switching the active server to the standby server under the condition that the interface detection result is not received after the first monitoring result representation reaches a first preset time period.
Optionally, the method further comprises:
and informing the first monitoring result to a preset target terminal through a preset communication mode.
Optionally, the method further comprises:
sending a service detection request to the primary server, wherein the service detection request is used for requesting one or more simulation service operations of the primary server;
monitoring a service detection result corresponding to the service detection request sent by the main server, wherein the service detection result comprises a simulation service operation result corresponding to each simulation service operation;
and determining a target operation management strategy from preset operation management strategies according to the second monitoring result, and executing the target operation management strategy.
Optionally, the preset operation policy includes at least one of switching the active server to the standby server, returning the current software version of the active server to the target software version, and notifying the second monitoring result to a preset target terminal through the preset communication manner, the determining a target operation management policy from preset operation management policies according to the second monitoring result, and the executing the target operation management policy includes:
when a second monitoring result represents that the service detection result is received and the service detection result represents that a second server error occurs in the main server, switching the main server to the standby server and/or informing a preset target terminal of the second monitoring result in a preset communication mode, wherein the second server error represents that the service detection request is not normally responded due to the main server; alternatively, the first and second liquid crystal display panels may be,
when a second monitoring result represents that the service detection result is received and the service detection result represents that a second code error occurs in the main server, returning the current software version of the main server to the target software version and/or informing a preset target terminal of the second monitoring result in the preset communication mode, wherein the second code error represents that the main server captures a preset second code exception when responding to the service detection request; alternatively, the first and second electrodes may be,
under the condition that a second monitoring result represents that the service detection result is received and any one of the simulation service operation results does not meet the corresponding expected result range, the current software version of the main server is returned to the target software version and/or the second monitoring result is notified to a preset target terminal through the preset communication mode; alternatively, the first and second electrodes may be,
and switching the main server to the standby server and/or informing a preset target terminal of a second monitoring result in a preset communication mode under the condition that the service detection result is not received after the second monitoring result representation reaches a second preset time period.
Optionally, the determining a target operation management policy from preset operation management policies according to the second monitoring result includes:
and when a second monitoring result represents that the service detection result is received and the service detection result represents that the simulation service operation result meets the corresponding expected result range, informing a preset target terminal of the second monitoring result in a preset communication mode.
According to a second aspect of the embodiments of the present disclosure, there is provided an operation management apparatus of a server, the apparatus including:
an interface monitoring module, configured to send an interface detection request to the primary server, where the interface detection request is used to request to detect a service interface of the primary server;
a first monitoring module, configured to monitor an interface detection result corresponding to the interface detection request sent by the active server;
the first operation management module is configured to determine the abnormal type of the service interface when the first monitoring result represents that the interface detection result is received and the interface detection result represents that the service interface is abnormal; when the abnormality type represents that the primary server has a first code error, the current software version of the primary server is returned to a target software version, and the first code error represents that the primary server captures a preset first code abnormality when responding to the interface detection request; and under the condition that the abnormal type represents that the main server has a first server error, switching the main server to the standby server, wherein the first server error representation does not normally respond to the interface detection request due to the main server.
Optionally, the first operation management module is further configured to:
and switching the active server to the standby server under the condition that the interface detection result is not received after the first monitoring result representation reaches a first preset time period.
Optionally, the first operation management module is further configured to:
and informing the first monitoring result to a preset target terminal through a preset communication mode.
Optionally, the apparatus further comprises:
a service detection module configured to send a service detection request to the primary server, where the service detection request is used to request one or more simulated service operations on the primary server;
a second monitoring module, configured to monitor a service detection result corresponding to the service detection request sent by the active server, where the service detection result includes a simulated service operation result corresponding to each simulated service operation;
and the second operation management module is configured to determine a target operation management strategy from preset operation management strategies according to a second monitoring result and execute the target operation management strategy.
Optionally, the preset operation policy includes at least one of switching the active server to the standby server, returning the current software version of the active server to the target software version, and notifying the second monitoring result to a preset target terminal through the preset communication manner, and the second operation management module is further configured to:
when a second monitoring result represents that the service detection result is received and the service detection result represents that a second server error occurs in the main server, switching the main server to the standby server and/or informing a preset target terminal of the second monitoring result in a preset communication mode, wherein the second server error represents that the service detection request is not normally responded due to the main server; alternatively, the first and second electrodes may be,
when a second monitoring result represents that the service detection result is received and the service detection result represents that a second code error occurs in the main server, returning the current software version of the main server to the target software version and/or informing a preset target terminal of the second monitoring result in the preset communication mode, wherein the second code error represents that the main server captures a preset second code exception when responding to the service detection request; alternatively, the first and second electrodes may be,
under the condition that a second monitoring result represents that the service detection result is received and any one of the simulation service operation results does not meet the corresponding expected result range, returning the current software version of the main server to the target software version and/or informing a preset target terminal of the second monitoring result in the preset communication mode; alternatively, the first and second electrodes may be,
and switching the active server to the standby server and/or informing a preset target terminal of the second monitoring result in a preset communication mode under the condition that the service detection result is not received after the second monitoring result representation reaches a second preset time period.
Optionally, the second operation management module is further configured to:
and when a second monitoring result represents that the service detection result is received and the service detection result represents that the simulation service operation result meets the corresponding expected result range, informing a preset target terminal of the second monitoring result in a preset communication mode.
According to a third aspect of an embodiment of the present disclosure, there is provided an electronic apparatus including:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any of the embodiments of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of the first aspect described above.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
the method comprises the steps of firstly sending an interface detection request to the main server; then monitoring an interface detection result corresponding to the interface detection request sent by the main server; and returning the current software version of the primary server to a target software version under the condition that a first monitoring result represents that the interface detection result is received and the primary server has a first code error, and switching the primary server to the standby server under the condition that the first monitoring result represents that the interface detection result is received and the interface detection result represents that the primary server has a first server error. Therefore, according to the monitoring result of the interface detection request, the version is timely returned to the target software version or the primary server is switched to the standby server, the running reliability of the server is improved, and the user experience is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure, but are not to be construed as limiting the disclosure.
Fig. 1 is a flowchart illustrating a method of operation management of a server according to an example embodiment.
Fig. 2 is a flow chart illustrating another method for managing the operation of a server according to an example embodiment.
Fig. 3 is a flowchart illustrating a method for managing operations of a server according to another embodiment.
Fig. 4 is a flowchart illustrating yet another method for operation management of a server in accordance with an illustrative embodiment.
Fig. 5 is a block diagram illustrating an operation management apparatus of a server according to an exemplary embodiment.
Fig. 6 is a block diagram illustrating another operation management apparatus of a server according to an example embodiment.
FIG. 7 is a block diagram of an electronic device shown in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims, and it should be understood that the specific embodiments described herein are merely illustrative and explanatory of the disclosure, and do not restrict it.
It should be noted that all the actions of acquiring signals, information or data in the present application are performed under the premise of complying with the corresponding data protection regulation policy of the country of the location and obtaining the authorization given by the owner of the corresponding device.
First, an application scenario of the present disclosure is explained, in the related art, an operation management scheme of a server is usually detected by a timing handshake mechanism, for example, a preset liveness detection service program may be started in the server, and after the liveness detection service program receives a preset first handshake instruction, a second handshake instruction may be replied to complete the handshake detection mechanism. Because the live detection service program cannot completely reflect the interface and service conditions, for example, when the service layer program captures an abnormal code error, but the live detection service program can still normally reply the second handshake instruction, the running state of the server is misjudged, the running reliability of the server is affected, and the user experience is reduced.
In addition, the inventor also notes that reliability measures in the related art, such as switching between a master server and a standby server, are usually performed under the condition of human intervention or performed at regular time, and a technical scheme of adopting a corresponding operation management strategy of the server according to an interface and a service detection result is lacked, so that the corresponding operation management strategy cannot be adopted in time when the server is abnormal, the operation reliability of the server is affected, and the user experience is reduced.
The present disclosure is described below with reference to specific examples.
Fig. 1 is a flowchart illustrating an operation management method of a server according to an exemplary embodiment, and as shown in fig. 1, the method may include the following steps:
in step S101, an interface detection request is sent to the primary server.
The server may include an active server and a standby server, and the interface detection request is used to request to detect a service interface of the active server.
The backup protection provided by the backup server is a common technical scheme for improving reliability of IT (Information Technology) and is used for switching to the backup server in time to provide service for an end user when the primary server is abnormal.
The software versions of the primary server and the backup server may be the same, for example, both the primary server and the backup server are upgraded to the latest software version, or the software versions of the primary server and the backup server may also be different, for example, the primary server is upgraded to the latest software version, and the backup server is the last stable backup version, which is not limited in this disclosure.
The interface detection request is used to simulate an interface access request of a final user, and is sent to a server through a service interface of the primary server, so as to detect whether an upper layer service of the primary server can normally respond to the interface detection request, where the interface detection request may be initiated according to a preset policy, such as periodically, or may be initiated after responding to an interface detection command triggered by a user, and the disclosure does not limit this.
Illustratively, the primary server may be a Nginx (engine x server), which may run on a Linux or Unix operating system. In some possible implementations, the interface detection request may be initiated by a periodic task set in a crontab file preset in the Linux or Unix operating system. Taking the example that the primary server is a Web server, the interface detection request may be a Get request to the primary server initiated by a simulated end user, for example, the periodic task set in the crontab file includes a Get request to the primary server initiated by a CURL command in Linux, and for specific technical requests about the crontab periodic task and the CURL command, reference is made to description in related art, and details are not described here.
It should be noted that, an example that the active server is a Web server is given here, the active server may further include an FTP server and an SMTP server, the present disclosure does not limit the specific type of the active server, and the technical scheme of simulating that an end user initiates an interface detection request by different types of servers is similar to the scheme of the Web server, and reference may be made to the description in the related art.
In step S102, an interface detection result corresponding to the interface detection request sent by the active server is monitored.
After sending the interface detection request to the primary server, monitoring an interface monitoring result sent by the primary server in response to the interface detection request.
In step S103, when the first monitoring result indicates that the interface detection result is received, and the interface detection result indicates that the first code error occurs in the primary server, the current software version of the primary server is rolled back to the target software version.
The first code error representation main server captures a preset first code exception when responding to the interface detection request.
For example, taking the active server as a Web server based on Nginx as an example, after initiating an HTTP request through CURL, a return result may be determined by CURL _ HTTP _ CODE in a return message. If the CURLINFO _ HTTP _ CODE is 500, it is characterized that the primary server captures a first CODE exception when responding to an interface detection request.
It should be particularly noted that, the above example shows an example of a first code error, and the present disclosure does not limit a specific implementation scheme for the primary server to capture the first code exception.
And when the first monitoring result represents that the interface detection result is received and the interface detection result represents that the first code error occurs in the main server, the first code error influencing the service exists in the current version, and the current version of the main server can be returned to the target version.
In some embodiments, the target version may be determined by any of the following:
the method I is to take the preset software version as the target software version.
And secondly, taking the last version of the current software version as the target software version.
In another embodiment, a plurality of interface detection requests may also be initiated, and when a proportion of an abnormal detection result representing that the first code error occurs in all interface detection results in a plurality of interface detection results corresponding to the plurality of interface detection requests, respectively, is greater than or equal to a preset proportion threshold, the current version of the active server is rolled back to the target version.
The current version of the primary server may be consistent with the current version of the backup server, and after the current version of the primary server is rolled back to the target version, the current version of the backup server may be rolled back to the target version according to a preset rolling back policy, for example, the preset rolling back policy may be that version rolling back is performed after a preset time interval. The technical solution of the specific version rollback may refer to the description in the related art, and is not described herein again.
In step S104, when the first monitoring result indicates that the interface detection result is received, and the interface detection result indicates that the first server error occurs in the active server, the active server is switched to the standby server.
And the first server error representation does not normally respond to the interface detection request due to the main server.
Taking the active server as a Web server based on Nginx as an example, after initiating an Http request through CURL, a return result may be determined by CURL info _ Http _ CODE in a return message. And in the case that the CURLINFO _ HTTP _ CODE is 200 or 201, the interface detection result is characterized as normal. And in the case that the CURLINFO _ HTTP _ CODE is not equal to 200 or 201, the interface detection request is not normally responded to due to the main server. For example, a CURLINFO _ HTTP _ CODE is 404 a corresponding web page does not exist for which the interface detects a request.
When the first monitoring result represents that the interface detection result is received and the interface detection result represents that the first server error occurs in the primary server, the primary server may be switched to the standby server, so that the standby server provides a service for a user, and the influence of the primary server error on a service is avoided.
In another embodiment, a plurality of interface detection requests may also be initiated, and the active server is switched to the standby server when a ratio of a plurality of interface detection results corresponding to the plurality of interface detection requests respectively representing abnormal interface detection results where the first server error occurs in all the interface detection results is greater than or equal to a preset second ratio threshold.
By the technical scheme, the version is timely returned to the target software version or the main server is switched to the standby server according to the monitoring result of the interface detection request, so that the running reliability of the server is improved, and the user experience is improved.
Fig. 2 is a flowchart illustrating another method for managing the operation of a server according to an exemplary embodiment, where as shown in fig. 2, the method may further include the following steps:
in step S105, the active server is switched to the standby server when the first monitoring result indicates that the interface detection result is not received after the first preset time period is reached.
For example, still taking the active server as a Web server based on Nginx as an example, after sending an interface detection request in a CURL manner, after a first preset time period is reached, a corresponding interface detection result is not received, and the active server may be switched to a standby server.
By the technical scheme, the primary server is switched to the standby server under the condition that the monitoring result of the interface detection request represents that the server responds to the overtime interface detection request, so that the running reliability of the server is further improved, and the user experience is improved.
Fig. 3 is a flowchart illustrating a method for managing operations of a server according to another exemplary embodiment, where the method may further include the following steps, as shown in fig. 3:
in step S106, the first monitoring result is notified to a preset target terminal through a preset communication method.
The preset communication mode may include at least one communication mode such as a short message, an email, or an instant messaging.
The target terminal can be a preset terminal of the operation and maintenance personnel or related personnel of the server.
Through foretell technical scheme, can in time inform the operation and maintenance personnel or the relevant personnel of server with the monitoring result of interface test request through predetermined communication mode, be convenient for in time carry out the analysis to the monitoring result of interface test request, improve the unusual response speed of server, further improve the reliability of server, promote user's experience.
Fig. 4 is a flowchart illustrating a method for managing operations of a server according to another exemplary embodiment, where the method may further include the following steps, as shown in fig. 4:
in step S107, a service detection request is sent to the active server.
The service detection request is used for requesting one or more simulation service operations of the main server.
In some possible implementation manners, in a case that the interface detection result is normal, the service detection request may be further initiated.
Illustratively, still taking the active server as a Web server based on Nginx as an example, when the curlin _ HTTP _ CODE in the CURL return message is equal to 200 or 201, it represents that the interface detection result is normal. For example, the server deploys an e-commerce system, a simulated store may be set in the e-commerce system, and the service detection request may be a request initiated by a simulated user to perform a service operation in the simulated store, for example, ordering and purchasing a commodity, specifically, a request initiated by the simulated user to the simulated store, for example, a request initiated by a CURL command in Linux to a main server, and for specific technical requests on a crontab periodic task and a CURL command, reference is made to the description in the related art, and details are not described herein again. In another embodiment, the active server may also be an FTP server, and the service detection request may be to upload a test file to the active server or download a test file from the server. The present disclosure is not limited to a particular type of server.
In step S108, a service detection result corresponding to the service detection request sent by the active server is monitored.
And the service detection result comprises a simulation service operation result corresponding to each simulation service operation.
For example, in a case that the active server is a Web server based on nginnx, an e-commerce system is already deployed on the server, a simulation shop is set in the e-commerce system, the service detection request may simulate an end user to perform a service operation in the simulation shop, for example, ordering to purchase goods, and the like, after the server completes processing the service detection request, the corresponding service detection result may be obtained, for example, after the simulation shop completes ordering to purchase goods, the service detection result may be obtained by querying whether order data corresponding to the ordering to purchase goods operation exists in an order database in the server, and in a case that the active server is the FTP server, the service detection result may be obtained by querying whether an FTP upload exists in a preset active FTP directory or an FTP download corresponding test file exists in an upload directory on the FTP server, for example, after an upload of a test file to the server is completed, the service detection result may be determined by whether the test file exists in the upload directory on the FTP server.
In step S109, a target operation management policy is determined from the preset operation management policies according to the second monitoring result, and the target operation management policy is executed.
The preset operation strategy comprises at least one of switching the main server to the standby server, returning the current software version of the main server to the target software version and informing the second monitoring result to the preset target terminal through a preset communication mode.
In some possible implementations, the preset operation policy may be configured by a user, so that the corresponding operation policy is implemented according to a different second monitoring result.
In some embodiments, the target operation management policy may be determined from the preset operation management policies according to the second monitoring result in the following manner, and then the target operation management policy may be executed.
In the first mode, when the second monitoring result represents that the service detection result is received and the service detection result represents that the second server is wrong with the main server, the main server is switched to the standby server and/or the second monitoring result is notified to a preset target terminal through a preset communication mode.
And the second server error representation does not normally respond to the service detection request due to the main server.
Taking the primary server as a Web server based on Nginx as an example, after initiating an Http request through the CURL, a return result may be determined by the CURL info _ Http _ CODE in a return message. In the case that the CURLINFO _ HTTP _ CODE is not equal to any of 200, 201, or 500, it is characterized that the service detection request is not normally responded to due to the active server. In this case, the active server is switched to the standby server and/or the second monitoring result is notified to the preset target terminal through a preset communication mode.
And in the second mode, under the condition that the second monitoring result represents that the service detection result is received and the service detection result represents that the second code error occurs in the main server, the current software version of the main server is returned to the target software version and/or the second monitoring result is notified to a preset target terminal through a preset communication mode.
And the second code error representation shows that the preset second code abnormality is captured by the primary server when the primary server responds to the service detection request.
For example, taking the active server as a Web server based on Nginx as an example, after initiating a service detection request through CURL, a return result may be determined through CURL _ HTTP _ CODE in a return message. And in the case that the CURLINFO _ HTTP _ CODE is equal to 500, characterizing that the primary server captures a second CODE exception in response to an interface detection request. In this case, the current software version of the primary server is backed to the target software version and/or the second monitoring result is notified to the preset target terminal through a preset communication mode. The target software version can be a preset software version; or, a version that is the last version of the current software version, which the present disclosure does not limit.
And thirdly, under the condition that the second monitoring result represents that the service detection result is received and any simulation service operation result represented by the service detection result does not meet the corresponding expected result range, returning the current software version of the main server to the target software version and/or informing the second monitoring result to a preset target terminal through a preset communication mode.
Taking the example that the primary server is a Web server based on Nginx, when a service detection request is initiated through CURL (for example, after an order placing and purchasing operation is completed in a simulated shop), a service detection result is determined by querying whether order data corresponding to the order placing and purchasing operation exists in an order database in the server, and when the service detection result indicates that any simulated service operation result does not meet a corresponding expected result range (for example, the order data corresponding to the order placing and purchasing operation does not exist in the order data), the current software version of the primary server is backed to a target software version and/or a second monitoring result is notified to a preset target terminal through a preset communication mode. The target software version can be a preset software version; or, a version that is the last version of the current software version, which the present disclosure does not limit.
And in the fourth mode, when the second monitoring result representation reaches a second preset time period and the service detection result is not received, the main server is switched to the standby server and/or the second monitoring result is notified to a preset target terminal through a preset communication mode.
For example, still taking the example that the primary server is a Web server based on Nginx, after the service detection request is sent in a CURL manner, and after a second preset time period is reached, a corresponding service detection result is not received, the primary server may be switched to a standby server and/or the second monitoring result may be notified to a preset target terminal in a preset communication manner.
And fifthly, when the second monitoring result represents that the service detection result is received, and when the service detection result represents that the simulation service operation result meets the corresponding expected result range, the second monitoring result is notified to a preset target terminal through a preset communication mode.
Taking the primary server as a Web server based on Nginx as an example, when a service detection request is initiated through the CURL (for example, after an order placing and commodity purchasing operation is completed in a simulated shop), a service detection result is determined by inquiring whether order data corresponding to the order placing and commodity purchasing operation exists in an order database in the server, and when the service detection result indicates that the simulated service operation results all meet a corresponding expected result range (for example, the order data corresponding to the order placing and commodity purchasing operation exists in the order data, and the detailed order data is the same as the data of the service detection request), a second monitoring result is notified to a preset target terminal through a preset communication mode.
According to the technical scheme, the target operation management strategy is determined from the preset operation management strategies according to the monitoring result of the service detection request, and the target operation management strategy is executed, so that the operation reliability of the server is improved, and the user experience is improved.
Fig. 5 is a block diagram illustrating an operation management apparatus 500 of a server according to an exemplary embodiment, and as shown in fig. 5, the message processing apparatus 500 includes:
the interface monitoring module 501 is configured to send an interface detection request to the primary server, where the interface detection request is used to request to detect a service interface of the primary server;
a first monitoring module 502, configured to monitor an interface detection result corresponding to an interface detection request sent by the active server;
the first operation management module 503 is configured to determine an abnormal type of the service interface when the first monitoring result represents that the interface detection result is received and the interface detection result represents that the service interface is abnormal; when the abnormal type represents that the primary server has a first code error, the current software version of the primary server is returned to the target software version, and the first code error represents that the primary server captures a preset first code abnormality when responding to the interface detection request; and under the condition that the abnormal type represents that the primary server has a first server error, switching the primary server to a standby server, wherein the first server error representation does not normally respond to the interface detection request due to the primary server.
Optionally, the first operation management module 503 is further configured to:
and switching the main server to the standby server under the condition that the interface detection result is not received after the first monitoring result representation reaches a first preset time period.
Optionally, the first operation management module 503 is further configured to:
and informing the first monitoring result to a preset target terminal through a preset communication mode.
By the technical scheme, the version is timely returned to the target software version or the main server is switched to the standby server according to the monitoring result of the interface detection request, so that the running reliability of the server is improved, and the user experience is improved.
Fig. 6 is a block diagram illustrating an operation management apparatus 500 of a server according to an exemplary embodiment, and as shown in fig. 6, the message processing apparatus 500 further includes:
a service detection module 504 configured to send a service detection request to the active server, where the service detection request is used to request one or more simulated service operations for the active server;
a second monitoring module 505, configured to monitor a service detection result corresponding to the service detection request sent by the primary server, where the service detection result includes a simulation service operation result corresponding to each simulation service operation;
and a second operation management module 506 configured to determine a target operation management policy from the preset operation management policies according to the second monitoring result, and execute the target operation management policy.
Optionally, the preset operation policy includes at least one of switching the active server to the standby server, returning the current software version of the active server to the target software version, and notifying the second monitoring result to the preset target terminal through a preset communication manner, and the second operation management module 506 is further configured to:
when the second monitoring result represents that the service detection result is received and the service detection result represents that the primary server has a second server error, switching the primary server to a standby server and/or informing the second monitoring result to a preset target terminal in a preset communication mode, wherein the second server error represents that the service detection request is not normally responded due to the primary server; alternatively, the first and second electrodes may be,
when the second monitoring result represents that the service detection result is received and the service detection result represents that the primary server has a second code error, the current software version of the primary server is returned to the target software version and/or the second monitoring result is notified to a preset target terminal through a preset communication mode, and the second code error represents that the primary server captures a preset second code abnormality when responding to the service detection request; alternatively, the first and second electrodes may be,
under the condition that the second monitoring result represents that the service detection result is received and the service detection result represents that any simulation service operation result does not meet the corresponding expected result range, the current software version of the main server is returned to the target software version and/or the second monitoring result is notified to a preset target terminal through a preset communication mode; alternatively, the first and second electrodes may be,
and switching the primary server to the standby server and/or informing the second monitoring result to a preset target terminal in a preset communication mode under the condition that the service detection result is not received after the second monitoring result representation reaches a second preset time period.
Optionally, the second operation management module 506 is further configured to:
and when the second monitoring result represents that the service detection result is received and the service detection result represents that the simulation service operation result meets the corresponding expected result range, informing the second monitoring result to a preset target terminal in a preset communication mode.
With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
According to the technical scheme, the target operation management strategy is determined from the preset operation management strategies according to the monitoring result of the service detection request, and the target operation management strategy is executed, so that the operation reliability of the server is improved, and the user experience is improved.
Fig. 7 is a block diagram of an electronic device 700 shown in accordance with an example embodiment. As shown in fig. 7, the electronic device 700 may include: a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input/output (I/O) interface 704, and a communication component 705.
The processor 701 is configured to control the overall operation of the electronic device 700, so as to complete all or part of the steps in the above-described server operation management method. The memory 702 is used to store various types of data to support operation at the electronic device 700, such as instructions for any application or method operating on the electronic device 700 and application-related data, such as contact data, transmitted and received messages, pictures, audio, video, and the like. The Memory 702 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically Erasable Programmable Read-Only Memory (EEPROM), erasable Programmable Read-Only Memory (EPROM), programmable Read-Only Memory (PROM), read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk. The multimedia components 703 may include screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 702 or transmitted through the communication component 705. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 704 provides an interface between the processor 701 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, or combinations thereof, which is not limited herein. The corresponding communication component 705 may thus comprise: wi-Fi modules, bluetooth modules, NFC modules, and the like.
In an exemplary embodiment, the electronic Device 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described operation management method of the server.
In another exemplary embodiment, there is also provided a non-transitory computer readable storage medium including program instructions which, when executed by a processor, implement the steps of the operation management method of the server described above. For example, the computer readable storage medium may be the memory 702 including the program instructions, which are executable by the processor 701 of the electronic device 700 to perform the operation management method of the server described above.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. An operation management method for a server, wherein the server comprises an active server and a standby server, the method comprising:
sending an interface detection request to the primary server, wherein the interface detection request is used for requesting to detect a service interface of the primary server;
monitoring an interface detection result corresponding to the interface detection request sent by the main server;
when a first monitoring result represents that the interface detection result is received and the interface detection result represents that a first code error occurs in the main server, the current software version of the main server is returned to a target software version, and the first code error represents that the main server captures a preset first code exception when responding to the interface detection request;
and switching the primary server to the standby server under the condition that a first monitoring result represents that the interface detection result is received and the interface detection result represents that a first server error occurs in the primary server, wherein the first server error represents that the interface detection request is not normally responded due to the primary server.
2. The method of claim 1, wherein the target software version is determined by:
taking a preset software version as the target software version; alternatively, the first and second electrodes may be,
and taking the last version of the current software version as the target software version.
3. The method of claim 1, further comprising:
and switching the active server to the standby server under the condition that the first monitoring result representation does not receive the interface detection result after reaching a first preset time period.
4. The method according to any one of claims 1 to 3, further comprising:
and informing the first monitoring result to a preset target terminal through a preset communication mode.
5. The method of claim 4, further comprising:
sending a service detection request to the primary server, wherein the service detection request is used for requesting one or more simulation service operations of the primary server;
monitoring a service detection result corresponding to the service detection request sent by the main server, wherein the service detection result comprises a simulation service operation result corresponding to each simulation service operation;
and determining a target operation management strategy from preset operation management strategies according to the second monitoring result, and executing the target operation management strategy.
6. The method according to claim 5, wherein the preset operation policy includes at least one of switching the primary server to the backup server, rolling back a current software version of the primary server to the target software version, and notifying the second monitoring result to a preset target terminal through the preset communication manner, the determining a target operation management policy from preset operation management policies according to the second monitoring result, and executing the target operation management policy includes:
when a second monitoring result represents that the service detection result is received and the service detection result represents that a second server error occurs in the main server, switching the main server to the standby server and/or informing a preset target terminal of the second monitoring result in the preset communication mode, wherein the second server error represents that the service detection request is not normally responded due to the main server; alternatively, the first and second electrodes may be,
when a second monitoring result represents that the service detection result is received and the service detection result represents that a second code error occurs in the main server, returning the current software version of the main server to the target software version and/or informing a preset target terminal of the second monitoring result in the preset communication mode, wherein the second code error represents that the main server captures a preset second code exception when responding to the service detection request; alternatively, the first and second electrodes may be,
under the condition that a second monitoring result represents that the service detection result is received and any one of the simulation service operation results does not meet the corresponding expected result range, the current software version of the main server is returned to the target software version and/or the second monitoring result is notified to a preset target terminal through the preset communication mode; alternatively, the first and second electrodes may be,
and switching the active server to the standby server and/or informing a preset target terminal of the second monitoring result in a preset communication mode under the condition that the service detection result is not received after the second monitoring result representation reaches a second preset time period.
7. The method according to claim 6, wherein the determining a target operation management policy from preset operation management policies according to the second monitoring result, and the executing the target operation management policy comprises:
and when a second monitoring result represents that the service detection result is received and the service detection result represents that the simulation service operation result meets the corresponding expected result range, informing a preset target terminal of the second monitoring result in a preset communication mode.
8. An operation management apparatus for a server, the server including an active server and a standby server, the apparatus comprising:
the interface monitoring module is configured to send an interface detection request to the primary server, where the interface detection request is used to request to detect a service interface of the primary server;
a first monitoring module, configured to monitor an interface detection result corresponding to the interface detection request sent by the active server;
the first operation management module is configured to determine the abnormal type of the service interface under the condition that a first monitoring result represents that the interface detection result is received and the interface detection result represents that the service interface is abnormal; when the abnormal type represents that the primary server has a first code error, the current software version of the primary server is returned to a target software version, and the first code error represents that the primary server captures a preset first code abnormality when responding to the interface detection request; and switching the primary server to the standby server under the condition that the abnormal type represents that the primary server has a first server error, wherein the first server error representation does not normally respond to the interface detection request due to the primary server.
9. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202210761441.8A 2022-06-29 2022-06-29 Server operation management method and device, electronic equipment and storage medium Active CN115242615B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210761441.8A CN115242615B (en) 2022-06-29 2022-06-29 Server operation management method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210761441.8A CN115242615B (en) 2022-06-29 2022-06-29 Server operation management method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115242615A true CN115242615A (en) 2022-10-25
CN115242615B CN115242615B (en) 2023-04-14

Family

ID=83672431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210761441.8A Active CN115242615B (en) 2022-06-29 2022-06-29 Server operation management method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115242615B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100058189A1 (en) * 2007-03-02 2010-03-04 Viessmann Werke Gmbh & Co. Kg Device and method for controlling and monitoring domestic technology devices
CN104679604A (en) * 2015-02-12 2015-06-03 大唐移动通信设备有限公司 Method and device for switching between master node and standby node
US9888037B1 (en) * 2015-08-27 2018-02-06 Amazon Technologies, Inc. Cipher suite negotiation
US10454689B1 (en) * 2015-08-27 2019-10-22 Amazon Technologies, Inc. Digital certificate management
CN111324377A (en) * 2020-03-11 2020-06-23 上海东普信息科技有限公司 Application gray level release method, system, device and storage medium
CN111596940A (en) * 2020-05-19 2020-08-28 杭州视联动力技术有限公司 Version upgrading method and device, electronic equipment and storage medium
CN112966906A (en) * 2021-02-10 2021-06-15 西南电子技术研究所(中国电子科技集团公司第十研究所) Centralized monitoring platform of spacecraft ground measurement and control station resource pool architecture
CN113872812A (en) * 2021-09-29 2021-12-31 联想(北京)有限公司 Information processing method, network equipment and terminal equipment
CN114629822A (en) * 2022-04-18 2022-06-14 北京小米移动软件有限公司 Link detection method and device, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100058189A1 (en) * 2007-03-02 2010-03-04 Viessmann Werke Gmbh & Co. Kg Device and method for controlling and monitoring domestic technology devices
CN104679604A (en) * 2015-02-12 2015-06-03 大唐移动通信设备有限公司 Method and device for switching between master node and standby node
US9888037B1 (en) * 2015-08-27 2018-02-06 Amazon Technologies, Inc. Cipher suite negotiation
US10454689B1 (en) * 2015-08-27 2019-10-22 Amazon Technologies, Inc. Digital certificate management
CN111324377A (en) * 2020-03-11 2020-06-23 上海东普信息科技有限公司 Application gray level release method, system, device and storage medium
CN111596940A (en) * 2020-05-19 2020-08-28 杭州视联动力技术有限公司 Version upgrading method and device, electronic equipment and storage medium
CN112966906A (en) * 2021-02-10 2021-06-15 西南电子技术研究所(中国电子科技集团公司第十研究所) Centralized monitoring platform of spacecraft ground measurement and control station resource pool architecture
CN113872812A (en) * 2021-09-29 2021-12-31 联想(北京)有限公司 Information processing method, network equipment and terminal equipment
CN114629822A (en) * 2022-04-18 2022-06-14 北京小米移动软件有限公司 Link detection method and device, electronic equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
李靖: "Android应用服务器通信接口安全性检测的方案设计与实现" *
贾令涛: "一种C/S模式下客户端软件版本自动检测升级方法的设计与实现", 《今日制造与升级》 *
赵宪阳: "服务器管理软件高可用模块的设计与实现", 《东南大学》 *

Also Published As

Publication number Publication date
CN115242615B (en) 2023-04-14

Similar Documents

Publication Publication Date Title
JP2022171958A (en) System, method, apparatus, and non-temporary computer readable storage medium for providing mobile device support services
CN109547245B (en) System, method, apparatus and medium for providing mobile device support service
CN111988200B (en) Automatic regression testing method and device based on real flow
US20130055271A1 (en) Apparatus and method for controlling polling
CN113407383B (en) Main and standby system switching method and device, server and main and standby system
CN113220540B (en) Service management method, device, computer equipment and storage medium
CN110784374A (en) Method, device, equipment and system for monitoring operation state of service system
WO2019140739A1 (en) Method for determining return visits to client, and electronic apparatus and computer-readable storage medium
CN112134961B (en) Client use control method, client and computer storage medium
CN111611140A (en) Reporting verification method and device of buried point data, electronic equipment and storage medium
CN109828830B (en) Method and apparatus for managing containers
CN111342986B (en) Distributed node management method and device, distributed system and storage medium
CN115242615B (en) Server operation management method and device, electronic equipment and storage medium
CN110417601B (en) Information prompting method, device and system in client and readable storage medium
CN111130856A (en) Server configuration method, system, equipment and computer readable storage medium
US20090083747A1 (en) Method for managing application programs by utilizing redundancy and load balance
CN110321251B (en) Data backup method, device, equipment and storage medium based on network block equipment
CN114138528A (en) Remote calling fault tolerance processing method, terminal equipment and storage medium
CN111290873B (en) Fault processing method and device
CN115134405B (en) Data processing method and device, electronic equipment and computer readable storage medium
CN110874238A (en) Online service updating method and device
CN114513844B (en) Network registration method and device, storage medium and electronic equipment
CN110045971A (en) System upgrade restoration methods and device
CN105320853B (en) Information monitoring method and device and terminal
CN113064615B (en) Software updating method and device, storage medium and electronic 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