[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN107888453A - A kind of multiserver method for monitoring state and system based under Nginx - Google Patents

A kind of multiserver method for monitoring state and system based under Nginx Download PDF

Info

Publication number
CN107888453A
CN107888453A CN201711205581.2A CN201711205581A CN107888453A CN 107888453 A CN107888453 A CN 107888453A CN 201711205581 A CN201711205581 A CN 201711205581A CN 107888453 A CN107888453 A CN 107888453A
Authority
CN
China
Prior art keywords
server
state
nginx
request
multiserver
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
CN201711205581.2A
Other languages
Chinese (zh)
Other versions
CN107888453B (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 Lelin Wireless Information Technology Co Ltd
Original Assignee
Suzhou Lelin 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 Lelin Wireless Information Technology Co Ltd filed Critical Suzhou Lelin 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

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)
  • Automation & Control Theory (AREA)
  • Environmental & Geological Engineering (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of multiserver method for monitoring state based under Nginx, it comprises the following steps:S1:Cluster server is disposed;S2:Ask current server state;S3:Return to current server state;S4:Server state is recorded, and request is returned into available server.The invention also discloses a kind of multiserver condition monitoring system based under Nginx.Using under the overall situation of the load balancing multiserver cluster based on Nginx technologies, to server current state, report an error the present invention situation, garbage-cleaning, does efficient regular, even semi-automatic execution cluster server management.

Description

A kind of multiserver method for monitoring state and system based under Nginx
Technical field
The present invention relates to server state monitoring technical field, particularly relates to a kind of more services based under Nginx Device method for monitoring state and system, suitable for payment platform/electric business platform/net purchase platform/carrier service system.
Background technology
For current server, what the income recompense of single high-performance server was much come not as good as more service clusters Positive effect, the cost of single server is high to be concentrated, and mistake interference is serious, and when server occurs wrong, whole system can collapse Burst, and multiserver cluster has then been obviously improved the flexibility of server cluster, under wider, is collected with multiserver Group, even single server failure, overall business will not also delay machine, be selected from cost to the optimum quality of erroneous packets capacitive.
In the case where multiserver cluster has very big advantage, select multiserver to carry out system operation and undoubtedly providing Most correctly selection on source and serious forgiveness, but due to the characteristic of multiserver, at present most multiserver on the market Cluster, not strict to the condition monitoring of server, there is server load state, (for example the internal memory of current individual server makes With situation, hard disk loading condition, network fluctuation situation) monitor situation about postponing.It is more to occur delivering rubbish level to server Can not clear up automatically can only manual administration many drawbacks.And using multiserver there is also some intrinsic drawbacks, than in full According to scattered, including server present load, the error rate of server process data, server garbage files, these all will be Increase after carrying out multiserver cluster into multiple.
Therefore, the present inventor needs a kind of new technology of design badly to improve its problem.
The content of the invention
The present invention is intended to provide a kind of multiserver method for monitoring state and system based under Nginx, using based on Under the overall situation of the load balancing multiserver cluster of Nginx technologies, to server current state, report an error situation, garbage-cleaning, Do efficient regular, even semi-automatic execution cluster server management.
In order to solve the above technical problems, the technical scheme is that:
A kind of multiserver method for monitoring state based under Nginx, comprises the following steps:
S1:Cluster server is disposed;
S2:Ask current server state;
S3:Return to current server state;
S4:Server state is recorded, and request is returned into available server.
Preferably, the step S1 is specifically included:By the long-range connection of manager, entirety is carried out to server Start, and start a process for each server thread when server is started and set for automatic Iterative realization File in file storage condition, be automatically deleted this document when file size or document lending.
Preferably, the step S2 is specifically included:Request is made to cluster, it is desirable to return to the current state of itself, state Being divided into has response and will be recorded without response, the server of no response by Nginx;Have in the server of response, be divided into executable ask Summation not can perform and ask, wherein the situation of not executable request includes but is not limited to, server storage is fully loaded with, server is asked Load is full.
Preferably, using conventional javaweb startup of server modes in the step S1, with shell script commands The foolproof execution of mode.
Preferably, in the step S2 in the case of server storage is fully loaded, Nginx can call the server to use automatically Shell scripts remove rubbish.
A kind of multiserver condition monitoring system based under Nginx, including following module:
Deployment module, disposed for cluster server;
Request module, for asking current server state;
Module is returned to, for returning to current server state;
Execution module, available server is returned to for recording server state, and by request.
Preferably, the deployment module is by the long-range connection of manager, the startup to server progress entirety, and And start a process for each server thread when server is started and realize the file set for automatic Iterative File storage condition in folder, this document is automatically deleted when file size or document lending.
Preferably, the request module makes request to cluster, it is desirable to returns to the current state of itself, state, which is divided into, sound It will should be recorded with the server without response, no response by Nginx;Have in the server of response, be divided into executable request and can not Request is performed, server storage is fully loaded, server request load is full wherein the situation of not executable request includes but is not limited to.
Preferably, the deployment module is using conventional javaweb startup of server modes, with shell script commands The foolproof execution of mode.
Preferably, in the request module in the case of server storage is fully loaded, Nginx can call the server automatically Removed rubbish with shell scripts.
Using above-mentioned technical proposal, the present invention comprises at least following beneficial effect:
Multiserver method for monitoring state and system of the present invention based under Nginx, using based on Nginx technologies Load balancing multiserver cluster overall situation under, to server current state, report an error situation, garbage-cleaning, does high efficiency Regular, even semi-automatic execution cluster server management.
Brief description of the drawings
Fig. 1 is the flow chart of the multiserver method for monitoring state of the present invention based under Nginx;
Fig. 2 is the structural representation of the multiserver condition monitoring system of the present invention based under Nginx.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of protection of the invention.
Embodiment 1
As shown in figure 1, to meet a kind of multiserver method for monitoring state based under Nginx of the present embodiment, including Following steps:
S1:Cluster server is disposed;
S2:Ask current server state;
S3:Return to current server state;
S4:Server state is recorded, and request is returned into available server.
Preferably, the step S1 is specifically included:By the long-range connection of manager, entirety is carried out to server Start, and start a process for each server thread when server is started and set for automatic Iterative realization File in file storage condition, be automatically deleted this document when file size or document lending.
Preferably, the step S2 is specifically included:Request is made to cluster, it is desirable to return to the current state of itself, state Being divided into has response and will be recorded without response, the server of no response by Nginx;Have in the server of response, be divided into executable ask Summation not can perform and ask, wherein the situation of not executable request includes but is not limited to, server storage is fully loaded with, server is asked Load is full.
Preferably, using conventional javaweb startup of server modes in the step S1, with shell script commands The foolproof execution of mode.
Preferably, in the step S2 in the case of server storage is fully loaded, Nginx can call the server to use automatically Shell scripts remove rubbish.
Embodiment 2
As shown in Fig. 2 to meet a kind of multiserver condition monitoring system based under Nginx of the present embodiment, including Following module:
Deployment module, disposed for cluster server;
Request module, for asking current server state;
Module is returned to, for returning to current server state;
Execution module, available server is returned to for recording server state, and by request.
Preferably, the deployment module is by the long-range connection of manager, the startup to server progress entirety, and And start a process for each server thread when server is started and realize the file set for automatic Iterative File storage condition in folder, this document is automatically deleted when file size or document lending.
Preferably, the request module makes request to cluster, it is desirable to returns to the current state of itself, state, which is divided into, sound It will should be recorded with the server without response, no response by Nginx;Have in the server of response, be divided into executable request and can not Request is performed, server storage is fully loaded, server request load is full wherein the situation of not executable request includes but is not limited to.
Preferably, the deployment module is using conventional javaweb startup of server modes, with shell script commands The foolproof execution of mode.
Preferably, in the request module in the case of server storage is fully loaded, Nginx can call the server automatically Removed rubbish with shell scripts.
The lower present invention is specifically described below:
Cluster server is disposed:By the long-range connection of manager, overall startup is carried out to server, is adopted here With the javaweb startup of server modes of routine, but the foolproof execution in a manner of shell script commands, and starting Text in the file set when server for one process of each server thread startup for automatic Iterative realization Part storage condition, this document is automatically deleted when file size or document lending.
Ask current server state:Request is made to cluster, it is desirable to return to the current state of itself, state, which is divided into, sound Should, no response, the server of no response will be recorded by Nginx, have in the server of response, be divided into executable request, can not hold Row request, the situation of not executable request are divided into that (server storage is fully loaded, and server request load is full.) deposited for server The full situation of storage, the shell scripts that Nginx can call the server to be finished writing in advance by technical staff automatically remove rubbish.
Return to current server state:This is the measure for integrally returning to the situation of current cluster, the feelings of these servers Condition can be recorded according to the classification of previous step by Nginx, such as remove rubbish, and Nginx can be transferred to automatically process, remaining the problem of shape State, which is said to be recorded then to consign to technical staff and check, makes respective handling.
Server state is recorded, and request is returned into available server:Operation will deliver after being finished more than Ask to perform request to the server of current no problem or not serious sex chromosome mosaicism.So far single request is completed.
In an expansible embodiment, one single server of increase, which is specially collected, explains and monitors cluster server letter Breath.
The purpose of the present invention is intended under the overall situation using the load balancing multiserver cluster based on Nginx technologies, right Server current state, report an error situation, garbage-cleaning, does efficient regular, even semi-automatic execution cluster server Management.It unites the task of multiserver, transmits management in real time.More there is diversity, can be in original base Storage strategy is more easily configured on plinth.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program Product.Therefore, the present invention can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Apply the form of example.Moreover, the present invention can use the computer for wherein including computer usable program code in one or more The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided The processors of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
Although preferred embodiments of the present invention have been described, but those skilled in the art once know basic creation Property concept, then can make other change and modification to these embodiments.So appended claims be intended to be construed to include it is excellent Select embodiment and fall into having altered and changing for the scope of the invention.

Claims (10)

1. a kind of multiserver method for monitoring state based under Nginx, it is characterised in that comprise the following steps:
S1:Cluster server is disposed;
S2:Ask current server state;
S3:Return to current server state;
S4:Server state is recorded, and request is returned into available server.
2. as claimed in claim 1 based on the multiserver method for monitoring state under Nginx, it is characterised in that the step S1 is specifically included:By the long-range connection of manager, overall startup is carried out to server, and starting server When for each server thread start process and be used for automatic Iterative and realize that the file in the file set stores feelings Condition, this document is automatically deleted when file size or document lending.
3. as claimed in claim 1 or 2 based on the multiserver method for monitoring state under Nginx, it is characterised in that the step Rapid S2 is specifically included:Request is made to cluster, it is desirable to return to the current state of itself, state, which is divided into, has response and without response, nothing The server of response will be recorded by Nginx;Have in the server of response, be divided into executable request and not executable request, wherein Not executable situation about asking includes but is not limited to server and has stored fully loaded, server request load completely.
4. as claimed in claim 2 based on the multiserver method for monitoring state under Nginx, it is characterised in that the step Using conventional javaweb startup of server modes in S1, the foolproof execution in a manner of shell script commands.
5. as claimed in claim 3 based on the multiserver method for monitoring state under Nginx, it is characterised in that:The step In S2 in the case of server storage is fully loaded, Nginx can call the server to be removed rubbish with shell scripts automatically.
6. a kind of multiserver condition monitoring system based under Nginx, it is characterised in that including following module:
Deployment module, disposed for cluster server;
Request module, for asking current server state;
Module is returned to, for returning to current server state;
Execution module, available server is returned to for recording server state, and by request.
7. as claimed in claim 6 based on the multiserver condition monitoring system under Nginx, it is characterised in that:The deployment Module carries out overall startup to server, and be when server is started by the long-range connection of manager Each server thread starts the file storage condition that a process is used in the file that automatic Iterative realization is set, and works as text This document is automatically deleted when part size or document lending.
8. as claimed in claims 6 or 7 based on the multiserver condition monitoring system under Nginx, it is characterised in that:It is described to ask Modulus block makes request to cluster, it is desirable to returns to the current state of itself, state, which is divided into, has response and without response, the clothes of no response Business device will be recorded by Nginx;Have in the server of response, be divided into executable request and not executable request, wherein not can perform The situation of request includes but is not limited to server and has stored fully loaded, server request load completely.
9. as claimed in claim 7 based on the multiserver condition monitoring system under Nginx, it is characterised in that:The deployment Module is using conventional javaweb startup of server modes, the foolproof execution in a manner of shell script commands.
10. as claimed in claim 8 based on the multiserver condition monitoring system under Nginx, it is characterised in that:The request In module in the case of server storage is fully loaded, Nginx can call the server to be removed rubbish with shell scripts automatically.
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 true CN107888453A (en) 2018-04-06
CN107888453B 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)

Cited By (1)

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

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020002607A1 (en) * 1998-08-17 2002-01-03 David S. Ludovici System and method for configuring and administering multiple instances of web servers
US20020052935A1 (en) * 1998-08-17 2002-05-02 Frank V. Paxhia System and method for an administration server
CN106790289A (en) * 2017-03-07 2017-05-31 北京搜狐新媒体信息技术有限公司 A kind of dynamic load processing method and system based on Nginx servers

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020002607A1 (en) * 1998-08-17 2002-01-03 David S. Ludovici System and method for configuring and administering multiple instances of web servers
US20020052935A1 (en) * 1998-08-17 2002-05-02 Frank V. Paxhia System and method for an administration server
CN106790289A (en) * 2017-03-07 2017-05-31 北京搜狐新媒体信息技术有限公司 A kind of dynamic load processing method and system based on Nginx servers

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
QIPENG: "《系统之家》", 8 January 2015 *

Cited By (1)

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

Also Published As

Publication number Publication date
CN107888453B (en) 2020-10-09

Similar Documents

Publication Publication Date Title
CN106528224B (en) Content updating method, server and system for Docker container
EP3182678A1 (en) Method for upgrading network function virtualization application, and method and device for forwarding service
EP2614436B1 (en) Controlled automatic healing of data-center services
US10601682B2 (en) Service availability management method, service availability management apparatus, and network function virtualization architecture thereof
CN109145051A (en) The data summarization method and device and electronic equipment of distributed data base
CN104360952B (en) A kind of software testing system and method
JP2010250854A (en) System, method, and software for distributed loading of database
CN110580195B (en) Memory allocation method and device based on memory hot plug
CN105138371A (en) Software upgrading method and device
US20210096981A1 (en) Identifying differences in resource usage across different versions of a software application
CN106383764A (en) Data acquisition method and device
CN109992273A (en) A kind of gray scale dissemination method and gray scale delivery system
CN110674008B (en) Problem disk log information collection method, device, equipment and medium of SSD
CN107888453A (en) A kind of multiserver method for monitoring state and system based under Nginx
CN116301568A (en) Data access method, device and equipment
CN103973465A (en) Distributed cross-platform managing method and system for virtualization capacity
CN115454576B (en) Virtual machine process management method and system and electronic equipment
CN110209550A (en) Fault handling method, device, electronic equipment and the storage medium of storage medium
CN111737351A (en) Transaction management method and device for distributed management system
CN109324925A (en) The transaction methods and device of Distributed Architecture
CN113032141B (en) AI platform resource switching method, system and medium
US10311032B2 (en) Recording medium, log management method, and log management apparatus
CN105303050B (en) The fault message storage method and system of a kind of Medical Devices
CN115794538A (en) Full link monitoring method and system for stateful application in cloud native scene
CN106484523B (en) A kind of managing hardware device method and device thereof

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