[go: up one dir, main page]

CN105939228B - A kind of health detecting method and device - Google Patents

A kind of health detecting method and device Download PDF

Info

Publication number
CN105939228B
CN105939228B CN201510535755.6A CN201510535755A CN105939228B CN 105939228 B CN105939228 B CN 105939228B CN 201510535755 A CN201510535755 A CN 201510535755A CN 105939228 B CN105939228 B CN 105939228B
Authority
CN
China
Prior art keywords
service node
node
service
health detection
shared
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
CN201510535755.6A
Other languages
Chinese (zh)
Other versions
CN105939228A (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.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies 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 Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201510535755.6A priority Critical patent/CN105939228B/en
Publication of CN105939228A publication Critical patent/CN105939228A/en
Application granted granted Critical
Publication of CN105939228B publication Critical patent/CN105939228B/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a kind of health detecting method and device, applied in gateway, the gateway carries out health detection to multiple servers, multiple identical service nodes is configured on the server, this method comprises: obtaining the nodal information of each service node;Classify according to nodal information to service node;One service node of selection carries out health detection from every a kind of service node;By health detection result-sharing to other service nodes in same class service node.The system resources consumption of gateway and server can be reduced by the application.

Description

A kind of health detecting method and device
Technical field
This application involves network communication technology field more particularly to a kind of health detecting methods and device.
Background technique
Application delivery gateway is mainly responsible for the management of server cluster, by selected load-balancing algorithm by user Service request balancedly distribute to service server.But the server selected by load-balancing algorithm may be due to kind Kind reason can not handle the service request of user, cause the service request of user that cannot respond, can not carry out normal business Processing.
To solve the above-mentioned problems, health detection process is enabled usually in application delivery gateway on server Service node is detected, to ensure that server operates normally.Prior art is established for each service node and is corresponded to Socket (socket) connection, initiate to access by Socket connection, and the response of waiting for server, to obtain server Health status.But in practical applications, the multiple identical service nodes of same server possible configuration, if for every One service node, which all carries out health detection, will cause unnecessary system resource waste.
Summary of the invention
In view of this, the application provides a kind of health detecting method and device.
Specifically, the application is achieved by the following technical solution:
The application provides a kind of health detecting method, is applied in gateway, the gateway is to multiple servers Health detection is carried out, configures multiple identical service nodes on the server, this method comprises:
Obtain the nodal information of each service node;
Classify according to nodal information to service node;
One service node of selection carries out health detection from every a kind of service node;
By health detection result-sharing to other service nodes in same class service node.
The application also provides a kind of health test apparatus, is applied in gateway, and the gateway services more Device carries out health detection, configures multiple identical service nodes on the server, which includes:
Acquiring unit, for obtaining the nodal information of each service node;
Taxon, for classifying according to nodal information to service node;
Detection unit, for one service node progress health detection of selection from every a kind of service node;
Shared cell, for by health detection result-sharing to other service nodes in same class service node.
The application is selected from every a kind of service node by classifying to service node it can be seen from above description It selects a service node and carries out health detection, will test result-sharing to other service nodes in same classification, to reduce The quantity of Socket connection reduces system consumption, meanwhile, also mitigate the performance pressures of server end.
Detailed description of the invention
Fig. 1 is server set cluster management system schematic diagram;
Fig. 2 is a kind of health detecting method flow chart shown in one exemplary embodiment of the application;
Fig. 3 is a kind of underlying hardware structure of health test apparatus place equipment shown in one exemplary embodiment of the application Schematic diagram;
Fig. 4 is a kind of structural schematic diagram of health test apparatus shown in one exemplary embodiment of the application.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the application.
It is only to be not intended to be limiting the application merely for for the purpose of describing particular embodiments in term used in this application. It is also intended in the application and the "an" of singular used in the attached claims, " described " and "the" including majority Form, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein refers to and wraps It may be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application A little information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not departing from In the case where the application range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determination ".
Fig. 1 show server set cluster management system schematic diagram.Wherein, PC is subscriber's main station, for accessing server;GW For application delivery gateway (hereinafter referred to as gateway), it is mainly responsible for the management of server cluster;Server1 and Server 2 be server, and multiple identical service nodes are configured on each server.For example, 1 He of service node on Server1 Service node 2 is identical, and port numbers are 80, and subordinate server IP address is 1.1.1.1.Similarly, the service section on Server 2 Point 3, service node 4 and service node 5 are identical.
In server set cluster management system, gateway is responsible for the selected load-balancing algorithm of basis for the business of user Server is balancedly distributed in request.In order to guarantee that the server of distribution can operate normally, gateway will take each Business device carries out health detection.
Prior art is established Socket by gateway and each service node and is connected when carrying out health detection It connects, initiates to access by each Socket connection, obtain corresponding health detection result.But configuration side shown in Fig. 1 Under method, each server has multiple identical service nodes, if to each service node establish Socket connect into Row health detection will undoubtedly consume a large amount of system resource.
In view of the above-mentioned problems, the embodiment of the present application proposes a kind of health detecting method, this method by service node into Row classification, one service node of selection carries out health detection from every a kind of service node, will test result-sharing to same point Other service nodes in class reduce system consumption to reduce the quantity of Socket connection, meanwhile, also mitigate server The performance pressures at end.
It referring to fig. 2, is one embodiment flow chart of the application health detecting method, the embodiment is to health detection process It is described.
Step 201, the nodal information of each service node is obtained.
Gateway is that each service node configures corresponding health detection rule in advance, for example, the health detection is advised It then can be with are as follows: detected using TCP (Transmission Control Protocol, transmission control protocol) mode.Certainly There are also other detection modes, such as UDP (User Datagram Protocol, User Datagram Protocol) mode, SLP (Service Location Protocol, Service Location Protocol) mode etc., can according to actual needs, to different services Node configures different health detection rules.
It completes that the health detection rule of all service nodes is started health detection process, obtain each with postponing The nodal information of server node, the nodal information may include the IP of health detection rule, service node subordinate server Location and port numbers etc..Subsequent processing is carried out according to the nodal information of the service node of acquisition.
Step 202, classify according to nodal information to service node.
Service node with same node point information is classified as one kind, specifically:
Following sort operation: one unlabelled service node of sequential selection is executed, by the unlabelled service node mark It is denoted as the execution node of current class.
Execute following shared node marking operation: the next unlabelled service node of sequential selection judges that this is next Whether unlabelled service node is identical as the execution nodal information of node of current class, if they are the same, then this is next not The service node of label is labeled as the shared node of current class.
Judge whether that all unlabelled service nodes have executed shared node marking operation, if it is not, then returning to execution Shared node marking operation;If so, completing the classification to a kind of service node.
Judge whether that there are also unlabelled service nodes;If so, then returning to execution sort operation;If nothing, complete all The classification of service node.
Step 203, one service node of selection carries out health detection from every a kind of service node.
The service node with same node point information has been classified as one kind by step 202, i.e., will be configured with identical health The service node of detected rule, same server IP address and identical port numbers is classified as one kind, at this point, selection is wherein any one A service node carries out health monitoring, and the health status of server all can be obtained.In a preferred embodiment, gateway is set Execution node of the alternative after sorting out in every a kind of service node carries out health monitoring.
Step 204, by health detection result-sharing to other service nodes in same class service node.
After getting the health detection result for executing node by step 203, by the execution section in every a kind of service node The health detection result of point shares to other service nodes in same class service node respectively.In a kind of preferred embodiment In, gateway will execute the health detection result-sharing of node to the shared node in same class service node.
The application does not carry out health detection to each service node it can be seen from foregoing description, but first Sorted out according to nodal information, then is subordinated in multiple service nodes of same classification and a service node is selected to carry out health It detects, other service nodes in same classification share the testing result of detected service node.It is set to reduce gateway The standby Socket connection quantity that health detection is used between server, the system resource for reducing gateway and server disappear Consumption.
Now still by taking Fig. 1 as an example, health detection process is discussed in detail.
It is assumed that gateway GW is respectively that 1~service node of service node 5 configures health detection rule, wherein service section The health detection rule of point 1 and service node 2 is TCP detection;The health of service node 3, service node 4 and service node 5 Detected rule is SLP detection.
Gateway GW starts health detection process, obtains the nodal information of each service node, as shown in table 1.
Nodename Health detection rule IP address Port numbers
Service node 1 TCP detection 1.1.1.1 80
Service node 2 TCP detection 1.1.1.1 80
Service node 3 SLP detection 2.2.2.2 8080
Service node 4 SLP detection 2.2.2.2 8080
Service node 5 SLP detection 2.2.2.2 8080
Table 1
Gateway sorts out above-mentioned service node.Firstly, service node 1 is judged to take labeled as node is executed Whether business node 2 is identical as nodal information (the health detection rule, IP address, port numbers) of service node 1, as shown in Table 1, clothes Business node 2 is identical as the nodal information of service node 1, therefore, service node 2 is labeled as shared node.
Sequence judge whether service node 3 identical as the nodal information of service node 1, as shown in Table 1, service node 3 and The nodal information of service node 1 is not identical, and therefore, service node 3 cannot function as the shared node of service node 1, is not belonging to same A kind of service node.Similarly, service node 4, service node 5 are not the shared node of service node 1.
After the first subseries to above-mentioned service node, service node 1 and service node 2 are same class service section Point, and service node 1 is to execute node, service node 2 is shared node.
Start the second subseries, one unlabelled service node of sequential selection, i.e. service node 3, will service from table 1 Node 3 is labeled as the execution node of current class, selects next unlabelled service node, i.e. service node 4, judges to service Whether node 4 is identical as the nodal information of service node 3, as shown in Table 1, the nodal information phase of service node 4 and service node 3 Together, therefore, service node 4 is labeled as to the shared node of current class.Similarly, by service node 5 labeled as current class Shared node.
After completing above-mentioned double classification, all service nodes are marked, wherein service node 1 and service node 3 are Node is executed, gateway is only established Socket with execution node and is connect, and it sends healthprobe message and carries out health detection, if Server normal operation will respond the detection of gateway, so that gateway be made to confirm server normal operation.
Gateway is after obtaining the health detection result for executing node, by health detection result-sharing in same classification Shared node.For example, the health detection result-sharing of service node 1 is examined the health of service node 3 to service node 2 Result-sharing is surveyed to service node 4 and service node 5.
Corresponding with the embodiment of aforementioned health detecting method, present invention also provides the embodiments of health test apparatus.
The embodiment of the application health test apparatus can be applied in gateway.Installation practice can pass through software It realizes, can also be realized by way of hardware or software and hardware combining.Taking software implementation as an example, as on a logical meaning Device, be that corresponding computer program instructions are formed in the processor run memory by equipment where it.From hardware For level, as shown in figure 3, for a kind of hardware structure diagram of the application health test apparatus place equipment, in addition to shown in Fig. 3 Except processor, network interface and memory, the practical function of equipment in embodiment where device generally according to the equipment Can, it can also include other hardware, this is repeated no more.
Referring to FIG. 4, for the structural schematic diagram of the health test apparatus in the application one embodiment.Health detection dress It sets including acquiring unit 401, taxon 402, detection unit 403 and shared cell 404, in which:
Acquiring unit 401, for obtaining the nodal information of each service node;
Taxon 402, for classifying according to nodal information to service node;
Detection unit 403, for one service node progress health detection of selection from every a kind of service node;
Shared cell 404, for by health detection result-sharing to other service nodes in same class service node.
Further, the taxon 402, comprising:
Vertex ticks module is executed, one unlabelled service node of sequential selection is used for;By the unlabelled service Vertex ticks is the execution node of current class;
Shared node mark module is used for the next unlabelled service node of sequential selection;Judge it is described it is next not Whether the service node of label is identical as the execution nodal information of node of the current class;It if they are the same, then will be described next A unlabelled service node is labeled as the shared node of the current class;
Service node judgment module, for judging whether that all unlabelled service nodes have executed shared node label Operation, if it is not, then returning to shared node mark module;If so, completing the classification to a kind of service node;Judge whether also Unlabelled service node;Vertex ticks module is executed if so, then returning;If nothing, the classification of all service nodes is completed.
Further,
The detection unit 403, specifically for selecting the execution node in every a kind of service node to carry out health detection.
The shared cell 404, specifically for giving the health detection result-sharing for executing node to same class service Shared node in node.
Further,
The nodal information includes health detection rule, the IP address and port numbers of service node subordinate server.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual The purpose for needing to select some or all of the modules therein to realize application scheme.Those of ordinary skill in the art are not paying Out in the case where creative work, it can understand and implement.
The foregoing is merely the preferred embodiments of the application, not to limit the application, all essences in the application Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the application protection.

Claims (6)

1. a kind of health detecting method, be applied in gateway, which is characterized in that the gateway to multiple servers into Row health detection configures multiple identical service nodes on the server, this method comprises:
Obtain the nodal information of each service node;
Classify according to nodal information to service node;
A service node is selected from every a kind of service node, the service node is carried out according to default health detection rule Health detection;
By health detection result-sharing to other service nodes in same class service node;
It is wherein, described to classify according to nodal information to service node, comprising:
Execute following sort operation: one unlabelled service node of sequential selection;The unlabelled service node is marked For the execution node of current class;
Execute following shared node marking operation: the next unlabelled service node of sequential selection;Judge it is described it is next not Whether the service node of label is identical as the execution nodal information of node of the current class;It if they are the same, then will be described next A unlabelled service node is labeled as the shared node of the current class;
Judge whether that all unlabelled service nodes have executed shared node marking operation, if it is not, it is shared then to return to execution Vertex ticks operation;If so, completing the classification to a kind of service node;
Judge whether that there are also unlabelled service nodes;If so, then returning to execution sort operation;If nothing, all services are completed The classification of node.
2. the method as described in claim 1, it is characterised in that:
Described one service node of selection from every a kind of service node carries out health detection, comprising:
The execution node in every a kind of service node is selected to carry out health detection;
It is described by health detection result-sharing to other service nodes in same class service node, comprising:
By the health detection result-sharing for executing node to the shared node in same class service node.
3. method as described in claim 1 or 2 is any, it is characterised in that:
The nodal information includes health detection rule, the IP address and port numbers of service node subordinate server.
4. a kind of health test apparatus, be applied in gateway, which is characterized in that the gateway to multiple servers into Row health detection configures multiple identical service nodes on the server, which includes:
Acquiring unit, for obtaining the nodal information of each service node;
Taxon, for classifying according to nodal information to service node;
Detection unit, for selecting a service node from every a kind of service node, according to default health detection rule to institute It states service node and carries out health detection;
Shared cell, for by health detection result-sharing to other service nodes in same class service node;
Wherein, the taxon, comprising:
Vertex ticks module is executed, one unlabelled service node of sequential selection is used for;By the unlabelled service node Labeled as the execution node of current class;
Shared node mark module is used for the next unlabelled service node of sequential selection;Judge described next unmarked Service node it is whether identical as the execution nodal information of node of the current class;If they are the same, then by it is described it is next not The service node of label is labeled as the shared node of the current class;
Service node judgment module, for judging whether that all unlabelled service nodes have executed shared node label behaviour Make, if it is not, then returning to shared node mark module;If so, completing the classification to a kind of service node;Judge whether that there are also not The service node of label;Vertex ticks module is executed if so, then returning;If nothing, the classification of all service nodes is completed.
5. device as claimed in claim 4, it is characterised in that:
The detection unit, specifically for selecting the execution node in every a kind of service node to carry out health detection;
The shared cell, specifically for by it is described execute node health detection result-sharing in same class service node Shared node.
6. the device as described in claim 4 or 5 is any, it is characterised in that:
The nodal information includes health detection rule, the IP address and port numbers of service node subordinate server.
CN201510535755.6A 2015-08-27 2015-08-27 A kind of health detecting method and device Active CN105939228B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510535755.6A CN105939228B (en) 2015-08-27 2015-08-27 A kind of health detecting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510535755.6A CN105939228B (en) 2015-08-27 2015-08-27 A kind of health detecting method and device

Publications (2)

Publication Number Publication Date
CN105939228A CN105939228A (en) 2016-09-14
CN105939228B true CN105939228B (en) 2019-02-19

Family

ID=57152826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510535755.6A Active CN105939228B (en) 2015-08-27 2015-08-27 A kind of health detecting method and device

Country Status (1)

Country Link
CN (1) CN105939228B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106254542A (en) * 2016-09-27 2016-12-21 杭州迪普科技有限公司 The method and device that a kind of flowing of access controls
CN111835576B (en) * 2019-04-19 2022-03-04 厦门网宿有限公司 DPVS-based back-end server health detection method and server
CN111341445B (en) * 2020-02-05 2024-04-16 网宿科技股份有限公司 Health detection method and health detection system of microservice call chain

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101340327A (en) * 2008-08-21 2009-01-07 腾讯科技(深圳)有限公司 Method, system and domain name parsing server implementing load balance of network server
CN102088720A (en) * 2009-12-04 2011-06-08 中国移动通信集团公司 Method, system and equipment for monitoring network elements in IP multimedia subsystem (IMS) network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7716367B1 (en) * 2000-07-20 2010-05-11 Akamai Technologies, Inc. Network performance monitoring in a content delivery service

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101340327A (en) * 2008-08-21 2009-01-07 腾讯科技(深圳)有限公司 Method, system and domain name parsing server implementing load balance of network server
CN102088720A (en) * 2009-12-04 2011-06-08 中国移动通信集团公司 Method, system and equipment for monitoring network elements in IP multimedia subsystem (IMS) network

Also Published As

Publication number Publication date
CN105939228A (en) 2016-09-14

Similar Documents

Publication Publication Date Title
CN104184819B (en) Multi-layer load balancing cloud resource monitoring method
US7523454B2 (en) Apparatus and method for routing a transaction to a partitioned server
US7440415B2 (en) Virtual network addresses
CN103248535B (en) A kind of cloud system method of testing and device
CN113300877B (en) Network slice management method and equipment
EP3596600B1 (en) Systems and methods for compute node management protocols
US20120284408A1 (en) Workload-aware placement in private heterogeneous clouds
CN105653398B (en) A method for intelligently distributing operating system images
CN110178398B (en) Guarantee framework for CP and DP slices
CN108989151B (en) Flow collection method for network or application performance management
CN114666335B (en) Distributed system load balancing device based on data distribution service DDS
CN111625419A (en) Log acquisition method, system, equipment and computer readable storage medium
CN105939228B (en) A kind of health detecting method and device
CN104158675B (en) Calculate node dispositions method, processing node, controller and system
CN105791073B (en) A method and device for service deployment in a virtualized network
CN103384251A (en) Multi-class safety service combinable safety network construction method and device
CN109960508A (en) A kind of method and device that interface calls
CN105872082B (en) Fine granularity resource response system based on container cluster load-balancing algorithm
CN104702439B (en) The method and apparatus for monitoring network node
CN105939344A (en) TCP (Transmission Control Protocol) connection establishing method and device
CN113900791A (en) Job processing method and related equipment
CN106685708A (en) Method, device and system for determining service relationship
CN106453118B (en) Flow control method and flow control system
CN116132447A (en) A load balancing method and device based on Kubernetes
CN114900396A (en) Network security management method, device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Binjiang District and Hangzhou city in Zhejiang Province Road 310051 No. 68 in the 6 storey building

Applicant after: Hangzhou Dipu Polytron Technologies Inc

Address before: Binjiang District and Hangzhou city in Zhejiang Province Road 310051 No. 68 in the 6 storey building

Applicant before: Hangzhou Dipu Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant