CN107888453B - Multi-server state monitoring method and system based on Nginx - Google Patents

Multi-server state monitoring method and system based on Nginx Download PDF

Info

Publication number
CN107888453B
CN107888453B CN201711205581.2A CN201711205581A CN107888453B CN 107888453 B CN107888453 B CN 107888453B CN 201711205581 A CN201711205581 A CN 201711205581A CN 107888453 B CN107888453 B CN 107888453B
Authority
CN
China
Prior art keywords
server
request
state
nginx
cluster
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
CN201711205581.2A
Other languages
Chinese (zh)
Other versions
CN107888453A (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.)
Suzhou Joylin Wireless Information Technology Co ltd
Original Assignee
Suzhou Joylin Wireless Information 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 Suzhou Joylin Wireless Information Technology Co ltd filed Critical Suzhou Joylin Wireless Information Technology Co ltd
Priority to CN201711205581.2A priority Critical patent/CN107888453B/en
Publication of CN107888453A publication Critical patent/CN107888453A/en
Application granted granted Critical
Publication of CN107888453B publication Critical patent/CN107888453B/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
    • 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
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • 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/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0883Semiautomatic configuration, e.g. proposals from system
    • 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/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Automation & Control Theory (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a multi-server state monitoring method based on Nginx, which comprises the following steps: s1: deploying a cluster server; s2: requesting a current server state; s3: returning to the current server state; s4: the server state is recorded and the request is returned to the available servers. The invention also discloses a multi-server state monitoring system based on the Nginx. The invention uses the big environment of load balancing multi-server cluster based on Nginx technology to carry out efficient and regular management of cluster servers for the current state of the servers, error reporting condition and garbage cleaning, even semi-automatically.

Description

Multi-server state monitoring method and system based on Nginx
Technical Field
The invention relates to the technical field of server state monitoring, in particular to a multi-server state monitoring method and a multi-server state monitoring system based on Nginx, which are suitable for a payment platform/an e-commerce platform/an online shopping platform/an operator service system.
Background
For the current server, the benefit compensation of a single high-performance server is far from the effect of coming of a multi-service cluster, the cost of the single server is high and concentrated, the error interference is serious, the whole system can be broken down when the server has an error, the flexibility of the server cluster is obviously improved by the multi-server cluster, the multi-server cluster is used in a wider range, the whole service can not be down even if the single server fails, and the method is the optimal quality selection from cost to error inclusion.
Under the condition that a multi-server cluster has great advantages, selecting a multi-server to carry out system operation is undoubtedly the most correct selection in terms of resources and fault tolerance, but due to the characteristics of the multi-server, most of the multi-server clusters on the market at present have the condition that the state monitoring of the server is not strict, and the monitoring delay of the server load state (such as the memory use condition, the hard disk load condition and the network fluctuation condition of a single server at present) exists. And more defects that the delivery garbage level of the server cannot be automatically cleaned and only can be manually managed appear. Moreover, there are inherent disadvantages to using multiple servers, such as data scatter, including the current load of the servers, the error rate of the servers processing data, and server garbage files, which all increase by multiple times after performing a multi-server cluster.
Therefore, the present inventors have earnestly demanded to conceive a new technology to improve the problems thereof.
Disclosure of Invention
The invention aims to provide a multi-server state monitoring method and system based on Nginx, which can be used for efficiently and regularly carrying out the current state, the error reporting condition and the garbage cleaning of a server, even semi-automatically executing cluster server management under the large environment of a load balancing multi-server cluster based on Nginx technology.
In order to solve the technical problems, the technical scheme of the invention is as follows:
a multi-server state monitoring method based on Nginx comprises the following steps:
s1: deploying a cluster server;
s2: requesting a current server state;
s3: returning to the current server state;
s4: the server state is recorded and the request is returned to the available servers.
Preferably, the step S1 specifically includes: the method comprises the steps of starting a server integrally through remote connection of a program manager, starting a process for each server thread when the server is started for automatically iterating to realize the file storage condition in a set folder, and automatically deleting a file when the file size or the file is wrong.
Preferably, the step S2 specifically includes: making a request for the cluster, requiring to return the current state of the cluster, wherein the states are divided into a response state and a non-response state, and the non-response server is recorded by Nginx; the server with response is divided into executable request and non-executable request, wherein the non-executable request includes but is not limited to full server storage and full server request load.
Preferably, the step S1 is performed in a shell script command manner in a conventional javaweb server boot manner.
Preferably, in step S2, for the case that the server storage is full, Nginx will automatically call the server to clear the garbage with the shell script.
A multi-server state monitoring system based on Nginx comprises the following modules:
the deployment module is used for deploying the cluster server;
the request module is used for requesting the current server state;
the return module is used for returning the current server state;
and the execution module is used for recording the state of the server and returning the request to the available server.
Preferably, the deployment module starts the server as a whole through remote connection of a program manager, and starts a process for each server thread when the server is started, so as to automatically iterate to realize the file storage condition in the set folder, and automatically delete the file when the file size or the file is in error.
Preferably, the request module makes a request to the cluster, and requires to return the current state of the request module, the state is divided into a response state and a non-response state, and a server without a response state is recorded by the Nginx; the server with response is divided into executable request and non-executable request, wherein the non-executable request includes but is not limited to full server storage and full server request load.
Preferably, the deployment module is executed in a shell script command manner in a conventional javaweb server starting manner.
Preferably, for the case that the server storage is full in the request module, the server is automatically called by the Nginx to clear the garbage by using the shell script.
By adopting the technical scheme, the invention at least comprises the following beneficial effects:
the method and the system for monitoring the state of the multiple servers based on the Nginx are used for conducting efficient and orderly treatment on the current state, the error reporting condition and the garbage cleaning of the servers under the large environment of the load balancing multiple server cluster based on the Nginx technology, and even semi-automatically executing cluster server management.
Drawings
FIG. 1 is a flow chart of a multi-server status monitoring method based on Nginx according to the present invention;
fig. 2 is a schematic structural diagram of a multi-server status monitoring system based on Nginx according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
As shown in fig. 1, a method for monitoring a multi-server status based on Nginx according to the present embodiment includes the following steps:
s1: deploying a cluster server;
s2: requesting a current server state;
s3: returning to the current server state;
s4: the server state is recorded and the request is returned to the available servers.
Preferably, the step S1 specifically includes: the method comprises the steps of starting a server integrally through remote connection of a program manager, starting a process for each server thread when the server is started for automatically iterating to realize the file storage condition in a set folder, and automatically deleting a file when the file size or the file is wrong.
Preferably, the step S2 specifically includes: making a request for the cluster, requiring to return the current state of the cluster, wherein the states are divided into a response state and a non-response state, and the non-response server is recorded by Nginx; the server with response is divided into executable request and non-executable request, wherein the non-executable request includes but is not limited to full server storage and full server request load.
Preferably, the step S1 is performed in a shell script command manner in a conventional javaweb server boot manner.
Preferably, in step S2, for the case that the server storage is full, Nginx will automatically call the server to clear the garbage with the shell script.
Example 2
As shown in fig. 2, a system for monitoring a multi-server status based on Nginx according to the present embodiment includes the following modules:
the deployment module is used for deploying the cluster server;
the request module is used for requesting the current server state;
the return module is used for returning the current server state;
and the execution module is used for recording the state of the server and returning the request to the available server.
Preferably, the deployment module starts the server as a whole through remote connection of a program manager, and starts a process for each server thread when the server is started, so as to automatically iterate to realize the file storage condition in the set folder, and automatically delete the file when the file size or the file is in error.
Preferably, the request module makes a request to the cluster, and requires to return the current state of the request module, the state is divided into a response state and a non-response state, and a server without a response state is recorded by the Nginx; the server with response is divided into executable request and non-executable request, wherein the non-executable request includes but is not limited to full server storage and full server request load.
Preferably, the deployment module is executed in a shell script command manner in a conventional javaweb server starting manner.
Preferably, for the case that the server storage is full in the request module, the server is automatically called by the Nginx to clear the garbage by using the shell script.
The following describes the invention in detail:
deployment of a cluster server: the method comprises the steps of starting a server integrally through remote connection of a program manager, wherein a conventional javaweb server starting mode is adopted, but the method is executed in a shell script command mode in a foolproof mode, starting a process for each server thread when the server is started for automatically iterating and realizing the file storage condition in a set folder, and automatically deleting a file when the file size or the file is wrong.
Request current server state: the cluster is requested to return the current state, the state is divided into a response state and a non-response state, a server without the response state is recorded by the Nginx, the server with the response state is divided into an executable request and a non-executable request, the condition that the server storage is full and the server request load is full is divided into a condition that the server storage is full, and the Nginx can automatically call the server to remove garbage by a shell script written by a technician in advance.
And returning the current server state: this is a measure for returning the current cluster situation as a whole, the server situations are classified according to the previous step and are recorded by the Nginx, such as clearing garbage, and are automatically processed by the Nginx, and the rest problem states are recorded and then delivered to a technician for viewing and processing accordingly.
Record server state, and return request to available servers: when the operation is completed, the request is delivered to the server which has no problem or no serious problem currently to execute the request. This is the completion of the single request.
In an extensible embodiment, a single server is added to collect interpretation and monitor cluster server information exclusively.
The invention aims to solve the problems of error reporting and garbage cleaning of the current state of a server and even semi-automatic cluster server management in a large environment of a load balancing multi-server cluster based on the Nginx technology. The method unifies the tasks of multiple servers and performs real-time transmission management. The method has more diversity, and can more conveniently configure the storage strategy on the original basis.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.

Claims (2)

1. A multi-server state monitoring method based on Nginx is characterized by comprising the following steps:
s1: deploying a cluster server;
s2: requesting a current server state;
s3: returning to the current server state;
s4: recording the server state and returning the request to the available server;
wherein, the step S1 specifically includes: the method comprises the steps that a program manager is remotely connected to start a server integrally, a process is started for each server thread when the server is started for automatically iterating to realize the file storage condition in a set folder, and the file is automatically deleted when the file size or the file is in error;
the step S2 specifically includes: making a request for the cluster, requiring to return the current state of the cluster, wherein the states are divided into a response state and a non-response state, and the non-response server is recorded by Nginx; in the server with response, dividing the server into an executable request and a non-executable request, wherein the condition of the non-executable request includes but is not limited to full storage of the server and full load of the request of the server;
in the step S1, a conventional javaweb server starting mode is adopted, and the step S is executed in a shell script command mode in a foolproof manner;
in the step S2, for the case that the server storage is full, Nginx will automatically call the server to remove the garbage by using the shell script;
further comprising the steps of: the interpretation is collected and cluster server information is monitored.
2. A multi-server state monitoring system based on Nginx is characterized by comprising the following modules:
the deployment module is used for deploying the cluster server;
the request module is used for requesting the current server state;
the return module is used for returning the current server state;
the execution module is used for recording the state of the server and returning the request to the available server;
the deployment module starts the server integrally through remote connection of a program manager, starts a process for each server thread when the server is started for automatically iterating to realize the file storage condition in the set folder, and automatically deletes the file when the file size or the file is wrong;
the request module makes a request for the cluster and requires to return the current state of the request module, the state is divided into a response state and a non-response state, and the non-response server is recorded by Nginx; in the server with response, dividing the server into an executable request and a non-executable request, wherein the condition of the non-executable request includes but is not limited to full storage of the server and full load of the request of the server;
the deployment module adopts a conventional javaweb server starting mode and is executed in a shell script command mode in a foolproof mode;
for the condition that the server storage is full in the request module, Nginx can automatically call the server to remove garbage by using a shell script;
the system also comprises a monitoring module used for collecting and explaining and monitoring cluster server information.
CN201711205581.2A 2017-11-27 2017-11-27 Multi-server state monitoring method and system based on Nginx Active CN107888453B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711205581.2A CN107888453B (en) 2017-11-27 2017-11-27 Multi-server state monitoring method and system based on Nginx

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711205581.2A CN107888453B (en) 2017-11-27 2017-11-27 Multi-server state monitoring method and system based on Nginx

Publications (2)

Publication Number Publication Date
CN107888453A CN107888453A (en) 2018-04-06
CN107888453B true CN107888453B (en) 2020-10-09

Family

ID=61775246

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711205581.2A Active CN107888453B (en) 2017-11-27 2017-11-27 Multi-server state monitoring method and system based on Nginx

Country Status (1)

Country Link
CN (1) CN107888453B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112187957B (en) * 2020-10-30 2023-06-06 杭州安恒信息技术股份有限公司 Server monitoring method, device, equipment and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106790289A (en) * 2017-03-07 2017-05-31 北京搜狐新媒体信息技术有限公司 A kind of dynamic load processing method and system based on Nginx servers

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6493749B2 (en) * 1998-08-17 2002-12-10 International Business Machines Corporation System and method for an administration server
US6567849B2 (en) * 1998-08-17 2003-05-20 International Business Machines Corporation System and method for configuring and administering multiple instances of web servers

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106790289A (en) * 2017-03-07 2017-05-31 北京搜狐新媒体信息技术有限公司 A kind of dynamic load processing method and system based on Nginx servers

Also Published As

Publication number Publication date
CN107888453A (en) 2018-04-06

Similar Documents

Publication Publication Date Title
US10248404B2 (en) Managing update deployment
US20180302335A1 (en) Orchestrating computing resources between different computing environments
US9389916B1 (en) Job scheduling management
EP3182678A1 (en) Method for upgrading network function virtualization application, and method and device for forwarding service
JP2019511054A (en) Distributed cluster training method and apparatus
US9684534B2 (en) Monitoring and modifying allocated computing resources
US20140068613A1 (en) Non-transitory computer-readable storage medium, information processing apparatus and scheduling method
CN102541460A (en) Multiple disc management method and equipment
US9594796B2 (en) Storage apparatus and data management method
US20140143768A1 (en) Monitoring updates on multiple computing platforms
CN104793981B (en) A kind of online snapshot management method and device of cluster virtual machine
CN107888453B (en) Multi-server state monitoring method and system based on Nginx
CN116450287A (en) Method, device, equipment and readable medium for managing storage capacity of service container
CN114610567A (en) Container monitoring method, network device and storage medium
CN112202909B (en) Online upgrading method and system for computer storage system
CN102546235A (en) Performance diagnosis method and system of web-oriented application under cloud computing environment
CN106021026B (en) Backup method and device
US8640139B2 (en) System deployment determination system, system deployment determination method, and program
CN111158956A (en) Data backup method and related device for cluster system
US20220229689A1 (en) Virtualization platform control device, virtualization platform control method, and virtualization platform control program
US9529880B2 (en) Synchronizing a disaster-recovery system of a database
CN108762688A (en) A kind of media stream storage method and device for video monitoring system
US20230236866A1 (en) Capacity reduction and capacity expansion method and system for cluster, capacity reduction and capacity expansion control terminal, and medium
CN106033211B (en) A kind of method and device of control gluing board rubber head cleaning
CN104239159A (en) Virtual machine maintenance system and method

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