CN108650337B - Server detection method, system and storage medium - Google Patents

Server detection method, system and storage medium Download PDF

Info

Publication number
CN108650337B
CN108650337B CN201810344956.1A CN201810344956A CN108650337B CN 108650337 B CN108650337 B CN 108650337B CN 201810344956 A CN201810344956 A CN 201810344956A CN 108650337 B CN108650337 B CN 108650337B
Authority
CN
China
Prior art keywords
server
detection
address
probe
target
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
CN201810344956.1A
Other languages
Chinese (zh)
Other versions
CN108650337A (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.)
Tencent Technology Shenzhen Co Ltd
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Tencent Cloud Computing Beijing 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 Tencent Technology Shenzhen Co Ltd, Tencent Cloud Computing Beijing Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810344956.1A priority Critical patent/CN108650337B/en
Publication of CN108650337A publication Critical patent/CN108650337A/en
Application granted granted Critical
Publication of CN108650337B publication Critical patent/CN108650337B/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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2521Translation architectures other than single NAT servers
    • H04L61/2528Translation at a proxy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • 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/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity

Abstract

The embodiment of the invention discloses a server detection method, a system and a storage medium, wherein the embodiment of the invention obtains a detection packet in a basic network, and the detection packet is used for detecting a target server; acquiring the address mapped by the target server in a basic network to obtain a first address; converting the first address to a second address of the target server in a private network; sending the probe packet to the target server located in a private network based on the second address; and receiving a detection result returned by the target server based on the detection packet. According to the scheme, the server detection system can be deployed in the basic network outside the private network, so that the server detection system can flexibly allocate resources of all servers to detect the target server, and convenience and flexibility in detection of the servers are improved.

Description

Server detection method, system and storage medium
Technical Field
The invention relates to the technical field of internet, in particular to a server detection method, a server detection system and a storage medium.
Background
In internet services, server states are often detected, so that the server can execute corresponding services according to the server states, and security and reliability of the server executing the services are guaranteed.
In the prior art, in the process of detecting a server in a Private network (VPC), a detection server needs to be deployed inside the VPC, and needs to be deployed to each VPC (every time a VPC is generated, a complete set of detection server deployment needs to be performed), and the detection server needs to occupy resources, devices and the like of the VPC, and then performs server detection based on a VPC internal network. For example, the VPC intranet may send an Internet Control Message Protocol (ICMP) packet to the server through a ping command, and determine whether the server is in a normal operation state or whether a connection link with the server is in a normal connection state based on whether a response Message returned by the server is received.
In the research and practice process of the prior art, the inventor of the present invention finds that deploying the probe server inside the VPC network occupies the deployment and construction of the probe server by the VPC network resources, which is not only limited by the resource management capability in the VPC network (for example, some resources in the VPC cannot be flexibly scheduled), but also needs to change the composition of the resources in the VPC network, and is very inconvenient.
Disclosure of Invention
The embodiment of the invention provides a server detection method, a server detection system and a storage medium, and aims to improve the convenience of detecting a server.
In order to solve the above technical problems, embodiments of the present invention provide the following technical solutions:
a server detection method is applied to a server detection system and comprises the following steps:
acquiring a detection packet in a basic network, wherein the detection packet is used for detecting a target server;
acquiring the address mapped by the target server in a basic network to obtain a first address;
converting the first address to a second address of the target server in a private network;
sending the probe packet to the target server located in a private network based on the second address;
and receiving a detection result returned by the target server based on the detection packet.
A server detection system comprises a management server, a detection server and a proxy server, wherein the management server, the detection server and the proxy server are mutually connected, the server detection system receives data transmitted to the inside of the system through the management server and is connected with a target server outside the system through the proxy server, and the proxy server is used for receiving the data transmitted to the inside of the system,
the detection server is used for acquiring a detection packet in a basic network, wherein the detection packet is used for detecting a target server and sending the detection packet to the proxy server;
the management server is used for acquiring an address mapped by the target server in a basic network, obtaining a first address and sending the first address to the proxy server, wherein the first address is contained in the data;
the proxy server is used for converting the first address into a second address of the target server in a private network;
the proxy server is used for sending the detection packet to the target server positioned in a private network based on the second address;
and the proxy server is used for receiving a detection result returned by the target server based on the detection packet.
A storage medium storing a plurality of instructions, the instructions being suitable for being loaded by a processor to perform the steps of any one of the server detection methods provided by the embodiments of the present invention.
The embodiment of the invention can acquire the detection packet for indicating the target server to be detected in the basic network and the address mapped by the target server in the basic network to obtain the first address; and then, converting the first address into a second address of the target server in the private network, sending a detection packet to the target server in the private network based on the second address, and receiving a detection result returned by the target server based on the detection packet. According to the scheme, the server detection system can be deployed in a basic network outside the private network, so that the server detection system can flexibly allocate resources of various servers (such as a detection server or a proxy server) to detect the target server, and the convenience and flexibility of detecting the server are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of a scenario of a server detection system according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a server detection method according to an embodiment of the present invention;
FIG. 3 is an architecture diagram of a server probe system provided by an embodiment of the present invention;
FIG. 4 is another architecture diagram of a server probe system provided by an embodiment of the present invention;
fig. 5 is another schematic flow chart of a server detection method according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a server detection system according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a server according to an embodiment of 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.
The embodiment of the invention provides a server detection method, a server detection system and a storage medium.
Referring to fig. 1, fig. 1 is a schematic view of a scenario of a server detection system according to an embodiment of the present invention, where the server detection system may include a management server, a detection server, a proxy server, and the like, and the management server, the detection server, and the proxy server may be connected to each other through a wired network or a wireless network.
The management server may be configured to manage each probe server, proxy service, and the like in the private network, provide an address mapping relationship, trigger a probe and receive a probe result, and the like, may receive data transmitted from outside of the system to inside of the system, for example, may receive probe configuration information sent by a user through a terminal (e.g., a mobile phone, a tablet computer, a notebook computer, a desktop computer, and the like), where the probe configuration information may include a probe period, a probe protocol, and the like, and the management server may include one or more probe servers. The detection server may be configured to detect a specified target server, the detection period and the detection mode are scheduled by the management server, and report a detection result to the management server, for example, a detection packet may be generated according to detection configuration information received from the management server, and the detection packet is sent to the proxy server, where the detection server may include one or more detection servers. The proxy server may be configured to convert an address and forward a probe packet or a probe result, and the proxy server may be connected to a target server outside the system, and the proxy server may include one or more proxy servers, for example, the proxy server may receive an address mapping relationship sent by the management server, and after receiving the probe packet sent by the probe server, convert an address of the target server to be probed in the base network into an address in the private network, and access the private network based on the converted address, and forward the probe packet to the target server in the private network; and after receiving the detection result returned by the target server, converting the address of the target server in the private network into the address in the basic network, and forwarding the detection result to the detection server based on the converted address.
The management server, the detection server and the proxy server are located in a basic network, the basic network is physical, such as an underlay network, a virtualized network, such as an overlay network, can be constructed on the basis of the basic network, and the virtualized network can be a public cloud virtualized network or a private cloud virtualized network (a more demanding virtualized network), and the like. The basic network can be a network of a basic forwarding architecture of the current data center network, and the basic network refers to a physical basic layer as long as any two routes on the data center network can be reached; the basic network can be completed by technical improvement, device quantity enlargement, bandwidth scale and the like of the physical network device, and the basic network comprises the traditional network technology.
The target server in fig. 1 is a detected server, and is located in a private network (i.e., VPC), where the private network may be a customizable network space (e.g., overlay network), and may deploy service resources such as a server, load balancing, a database, and a non-relational database (Not only sql, Nosql) block storage in the private network, and may freely divide a network segment or make a routing policy in the private network; the private network can be configured with a public network gateway to access the Internet (namely the Internet), and meanwhile, the public network or private line access is supported to be configured to build a hybrid cloud, the private networks are logically isolated from one another, and the like. The private network can be a virtualization technical mode superimposed on a network architecture, and the general framework of the private network is to realize the load bearing of the application on the network without large-scale modification of a basic network, and can be separated from other network services, that is, the private network can be a virtual network established on an underlay network, and the private network can be formed through logical nodes and logical links.
The server detection system can acquire a detection packet in a basic network, wherein the detection packet is used for detecting a target server and acquiring an address mapped by the target server in the basic network to obtain a first address; converting the first address into a second address of the target server in the private network, and sending a detection packet to the target server in the private network based on the second address; receiving a detection result returned by the target server based on the detection packet; and so on.
For example, the server probe system may receive probe configuration information sent by the terminal through the management server, send the probe configuration information to the probe server through the management server, then generate a probe packet according to the probe configuration information through the probe server, send the probe packet to the proxy server through the probe server, send an address mapping relationship between the base network and the private network to the proxy server through the management server, or obtain an address mapped by the target server in the base network, obtain a first address, and send the first address to the proxy server through the management server. At this time, the proxy server may convert the first address into a second address of the destination server in the private network according to the address mapping relationship, and send the probe packet to the destination server together with the second address. Finally, a detection result returned by the target server based on the detection packet can be received through the proxy server, and the detection result is sent to the management server through the proxy server; and so on.
It should be noted that the server detection system may also be a server, where the server has all functions of a management server, a detection server, a proxy server, and the like, and the server detection system may implement detection on a target server through the server, which is specifically described with reference to fig. 1 for the description of the management server, the detection server, the proxy server, and the like, and is not described herein again.
It should be noted that the scenario diagram of the server detection system shown in fig. 1 is only an example, and the server detection system and the scenario described in the embodiment of the present invention are for more clearly illustrating the technical solution of the embodiment of the present invention, and do not form a limitation on the technical solution provided in the embodiment of the present invention.
The following are detailed below.
In this embodiment, a description will be made from the perspective of a server probe system, which may be specifically integrated in a network device such as a server or a gateway.
A server probe method, comprising: acquiring a detection packet in a basic network, wherein the detection packet is used for detecting a target server; acquiring an address mapped by a target server in a basic network to obtain a first address; converting the first address to a second address of the destination server in the private network; sending a probe packet to a target server located in the private network based on the second address; and receiving a detection result returned by the target server based on the detection packet.
Referring to fig. 2, fig. 2 is a flowchart illustrating a server detection method according to an embodiment of the present invention. The server detection method may include:
in step S101, a probe packet is acquired in the infrastructure network, and the probe packet is used to probe the target server.
The server detection system may be deployed in a base network, and a target server to be detected is located in a private network, so that the server detection system may obtain a detection packet in the base network, where the detection packet may include an address (for example, the address may be an Internet Protocol (IP) Protocol for interconnection between networks) mapped in the base network by the target server to be detected, a detection period, a detection Protocol, and the like. The probe Protocol may include a Control Message Protocol (ICMP) or a Teletype Network (Telnet).
The server detection system may acquire the detection packet at a preset time interval or acquire the detection packet when the configuration update exists, and the specific acquisition time may be flexibly set according to actual needs, which is not limited here.
In some embodiments, the step of acquiring the probe packet in the infrastructure network may include: (1) acquiring detection configuration information in a basic network; (2) generating a probe packet based on the probe configuration information.
Specifically, the server detection system in the base network may obtain the detection configuration information from the information base, or receive the detection configuration information sent by the configuration terminal, and of course, the detection configuration information may also be obtained in other manners. The configuration terminal may be a terminal configured to detect configuration information, and the terminal may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, or the like. The probing configuration information may include an IP address, a probing period, a probing protocol, etc. mapped in the base network by the target server to be probed.
After the probe configuration information is obtained, a probe packet may be generated based on the probe configuration information, where the probe packet may include a five-tuple, such as a source address, a destination address, a source port number, a destination port number, and a transport layer protocol, in addition to a probe period and a probe protocol, and after the probe packet is obtained, a probe for the target server may be initiated.
When a plurality of target servers are provided, the detection configuration information corresponding to each target server can be respectively obtained, and the detection packets corresponding to each target server are respectively generated based on the detection configuration information corresponding to each target server.
In some embodiments, the step of obtaining the probe configuration information in the infrastructure network may include: receiving a configuration instruction in a basic network, and determining a target server to be detected, a detection period and a detection protocol according to the configuration instruction; and generating detection configuration information according to the target server, the detection period and the detection protocol.
The server detection system may obtain the detection configuration information by receiving a configuration instruction sent by a user through a configuration terminal in the infrastructure network, where the configuration instruction is used to set the detection configuration information. And then, determining information such as a target server to be detected, a detection period, a detection protocol and the like according to the configuration instruction, wherein the information is detection configuration information.
For example, the content examples contained in the probe configuration information may be: (1) IP address of target server a in the base network: UnderLayIP A; (2) detection period: 10 seconds; (3) the detection protocol comprises the following steps: an ICMP; IP address of target server B in the base network: UnderLayIP B, probe period: 20 seconds, probing protocol: telnet.
In some embodiments, the server probe system includes a plurality of probe servers, and the step of generating the probe packet based on the probe configuration information may include:
(a) acquiring state information of each detection server;
(b) determining the priority of each detection server according to the state information of each detection server;
(c) determining at least one detection server from a plurality of detection servers according to the priority of each detection server to obtain a target detection server;
(d) the control target probe server generates a probe packet based on the probe configuration information.
In particular, the server probe system may obtain the probe packets through the probe server, and when the server probe system includes one probe server, one or more probe packets may be obtained through the probe server. When the server probe system includes a plurality of probe servers, the priority of each probe server may be acquired, and one or more probe packets may be preferentially acquired by the probe server having the higher priority.
For example, status information of each probe server may be obtained, where the status information may include the capacity of the probe server, whether a probe is being launched or not launched, and then a priority of each probe server may be determined according to the status information of each probe server, for example, a weight value may be set for each type of information in the status information, where the higher the total weight value of the status information is, the higher the priority is, or the priority may be determined according to the capacity of each probe server, and the higher the priority is the larger the capacity is.
In this case, at least one probe server may be determined from the plurality of probe servers to obtain the target probe server according to the priority of each probe server, for example, the probe servers may be ranked from high to low according to the priority, one probe server with the highest priority may be determined from the plurality of probe servers to obtain one target probe server, or a plurality of probe servers with the highest priority may be determined from the plurality of probe servers to obtain a plurality of target probe servers. After determining the target server, one or more probe packets may be generated by the target probe server based on the probe configuration information.
In step S102, an address mapped by the target server in the base network is obtained, and a first address is obtained.
The server detection system may obtain an address mapped in the base network by the target server to be detected, to obtain the first address, for example, the first address may be extracted from the received detection configuration information, or an address setting instruction may be received, and the first address may be determined according to the address setting instruction. The first address may include an address corresponding to one, i.e., one, target server; or, the detection packet carries the first address, and the first address can be extracted from the detection packet; the first address may also include a plurality of addresses, that is, an address corresponding to each of the plurality of target servers, and a plurality of addresses are obtained.
In step S103, the first address is converted into a second address of the destination server in the private network.
Since the server detection system is deployed in the base network, the target server to be detected is located in the private network, and the first address obtained by the server detection system in the base network is an address mapped by the target server in the base network, the server detection system may convert the first address into an address of the target server in the private network to obtain the second address in order to perform data transmission with the target server.
In some embodiments, the step of converting the first address to a second address of the destination server in the private network may comprise:
(1) acquiring an address mapping relation between a basic network and a private network;
(2) and converting the first address into a second address of the target server in the private network according to the address mapping relation.
Specifically, the server detection system may obtain an address mapping relationship between the base network and the private network from a database storing the address mapping relationship, or the server detection system may receive the address mapping relationship between the base network and the private network sent by the terminal, or the server detection system may receive the establishment instruction, determine, based on the establishment instruction, an address of each target server corresponding to the base network and an address of each target server corresponding to the private network, and then establish the address mapping relationship between the base network and the private network according to the address of each target server corresponding to the base network and the address of each target server corresponding to the private network; and so on.
It should be noted that the obtaining manner of the address mapping relationship may be flexibly set according to actual needs, and specific contents are not limited herein.
The address mapping relationship may exist in a list form (e.g., an address mapping relationship table) or a text form (e.g., an address mapping relationship text), and after the address mapping relationship is obtained, the first address may be converted into a second address of the destination server in the private network according to the address mapping relationship, for example, the first address underway ip a may be searched from the address mapping relationship table, after the first address is obtained, a second address overlay ip B corresponding to the first address may be determined, and at this time, the first address may be replaced with the second address, and the like, so that the probe packet may be transmitted subsequently using the second address overlay ip B.
In some embodiments, the server probe system may include a plurality of proxy servers, and the step of converting the first address into the second address of the target server in the private network according to the address mapping relationship may include:
(a) acquiring state information of each proxy server;
(b) determining the priority of each proxy server according to the state information of each proxy server;
(c) determining at least one proxy server from a plurality of proxy servers according to the priority of each proxy server to obtain a target proxy server;
(d) and controlling the target proxy server to convert the first address into a second address of the target server in the private network according to the address mapping relation.
Specifically, the server probe system may perform address translation by using a proxy server, may perform address translation by using the proxy server when the server probe system includes one proxy server, and may acquire the priority of each proxy server and perform address translation by using a proxy server having a higher priority when the server probe system includes a plurality of proxy servers.
For example, status information of each proxy server may be obtained, where the status information may include the capacity of the proxy server, the agent being initiated, the agent not being initiated, and the like, and then the priority of each proxy server may be determined according to the status information of each proxy server, for example, a weight value may be set for each type of information in the status information, where the higher the total weight value of the status information is, the higher the priority is, or the priority may be determined according to the size of the capacity of each proxy server, and the higher the priority is the larger the capacity is.
In this case, at least one proxy server may be determined from the plurality of proxy servers to obtain a target proxy server according to the priority of each proxy server, for example, the proxy servers may be ranked from high to low in priority, one proxy server with the highest priority may be determined from the plurality of proxy servers to obtain one target proxy server, or a plurality of proxy servers with the highest priority may be determined from the plurality of proxy servers to obtain a plurality of target proxy servers. After the target server is determined, the first address can be converted into a second address of the target server in the private network through the target proxy server according to the address mapping relation, wherein the first address can comprise one or more addresses, and the second address can also comprise one or more addresses.
In step S104, a probe packet is transmitted to a destination server located in the private network based on the second address.
After the second address is obtained through conversion, the probe packet may be sent to a target server located in the private network based on the second address, for example, the second address may be added to the probe packet, and the second address may be used as a destination address indicating the target server to be probed, so that the probe packet may be sent to the target server based on the second address.
In some embodiments, when the second address includes a plurality of addresses, the step of sending the probe packet to the destination server located in the private network based on the second address may include:
and calling the multiple threads, and sending the detection packet to a target server in the private network in parallel through the multiple threads based on each second address.
Specifically, when the second address includes a plurality of addresses, it indicates that a plurality of target servers need to be probed, in this case, the probe packet may include a plurality of packets, and the server probe system may invoke a plurality of threads and respectively send each probe packet to a target server that needs to be probed in parallel based on each second address through the plurality of threads, or send each probe packet to a target server that needs to be probed in series based on each second address through the plurality of threads.
In step S105, a probe result returned by the target server based on the probe packet is received.
The target server may parse the probe packet after receiving the probe packet, and return a probe result to the server probe system based on the parsed probe packet, for example, may extract the second address from the probe packet, and then return the probe result based on the second address. After the detection result is obtained, the server detection system may perform detection again according to the detection period set in the detection configuration information. The detection of the servers in the VPC network is realized by each server in the basic network based on the VPC network environment; the detection of various network states of the server in the VPC network can be realized without changing the configuration of the VPC network, the network architecture and the like and expanding resources and adjusting the architecture.
In some embodiments, the server probe system may include a management server, and the step of receiving the probe result returned by the target server based on the probe packet may include:
(1) receiving a detection result returned by the target server based on the detection packet;
(2) extracting a second address from the detection result;
(3) converting the second address into the first address according to the address mapping relation;
(4) and sending the detection result to the management server based on the first address.
Specifically, the server probe system may include a management server, and manages the probe result through the management server, where the probe result may include a second address corresponding to the target server in the private network, and after receiving the probe result returned by the target server based on the probe packet, the server probe system may extract the second address from the probe result, and in order to enable data transmission with the base-capable management server, the server probe system may convert the second address into an address of the target server in the base network according to an address mapping relationship, to obtain a first address, and at this time, the probe result may be sent to the management server based on the first address.
In some embodiments, the step of receiving the probe result returned by the target server based on the probe packet may include:
when the target server generates a detection response packet within the preset time of receiving the detection packet, receiving a first detection result which is returned by the target server and is normal for the target server, wherein the first detection result is generated based on the detection response packet; and when the target server does not generate the detection response packet within the preset time of receiving the detection packet, receiving a second detection result of the target server abnormity returned by the target server.
The detection result may include that the target server is normal or the target server is abnormal, and the target server may be normal, that the target server is in a normal operation state, that a connection link between the target server and the target server is in a normal connection state, or that the target server is available; the target server exception may be that the target server is in a non-operational state, or that a connection link with the target server is in a disconnected state, or that the target server denies access, or that the target service is unavailable, etc.
Specifically, after receiving the probe packet, the target server may generate the probe response packet within a preset time, where the preset time may be flexibly set according to actual needs, and a specific value is not limited here. When the target server generates the probe response packet within the preset time of receiving the probe packet, it indicates that the target server is normal, at this time, the server probe system may receive a first probe result that the target server returns that the target server is normal, where the first probe result may be generated by the target server based on the probe response packet. When the target server does not generate the probe response packet within the preset time of receiving the probe packet, it indicates that the target server is abnormal, at this time, the server probe system may receive a second probe result of the target server being abnormal, where the second probe result may be that the probe response packet is not generated at the target server.
As can be seen from the above, in the embodiment of the present invention, the detection packet for indicating the target server to be detected can be obtained in the basic network, and the address mapped by the target server in the basic network is obtained, so as to obtain the first address; and then, converting the first address into a second address of the target server in the private network, sending a detection packet to the target server in the private network based on the second address, and receiving a detection result returned by the target server based on the detection packet. According to the scheme, the server detection system can be deployed in a basic network outside the private network, so that the server detection system can flexibly allocate resources of various servers (such as a detection server or a proxy server) to detect the target server, and the convenience and flexibility of detecting the server are improved.
The method described in the above embodiments is further illustrated in detail by way of example.
In this embodiment, a server detection system is deployed in a basic network, and a server to be detected is located in a private network (i.e., VPC), and the server detection system includes a management server, a detection server, and a proxy server, where the management server, the detection server, and the proxy server may be connected to each other through a wired network or a wireless network.
For example, as shown in fig. 3, the server detection system may include a management server, a plurality of detection servers (for example, the number of detection servers a to B may be flexibly set according to actual needs), and a plurality of proxy servers (for example, the number of proxy servers a to B may be flexibly set according to actual needs), where a plurality of servers (for example, the values of servers 1 to n, n may be flexibly set according to actual needs) may be detected by one proxy server, the servers to be detected may be in the same private network (for example, the server 1 and the server 2 are in the same VPC-a), or may be in different private networks (for example, the server 5 and the server 6 are in different VPCs).
For another example, as shown in fig. 4, the server probe system may include a management server, a probe server and a proxy server, and a plurality of servers (i.e. target servers) may be probed by the proxy server, where the plurality of servers to be probed may be in the same private network or different private networks. For convenience of explanation, the server probing process will be described in detail below by taking the architecture of fig. 4 as an example.
It should be noted that, a server probe system may include not only a management server, a probe server, a proxy server, etc., but this embodiment is only an example given for convenience of description, and should not be construed as a limitation on the types and numbers of servers in the server probe system, and the server probe process is similar regardless of how many and how many types of servers exist, and can be understood according to this example.
Referring to fig. 5, fig. 5 is a schematic flowchart illustrating a server detection method according to an embodiment of the present invention. The method flow can comprise the following steps:
201. the management server sends the address mapping relationship to the proxy server.
The management server may obtain the address mapping relationship between the base network and the private network from a database storing the address mapping relationship, or the management server may receive the address mapping relationship between the base network and the private network sent by the terminal, and the like. The address mapping relationship may exist in a list form (e.g., an address mapping relationship table) or a text form (e.g., an address mapping relationship text), and the specific content is not limited herein.
After the address mapping relationship is obtained, the management server may send the address mapping relationship to the proxy server at preset intervals based on the identifier, address, or the like of the proxy server, or send the address mapping relationship to the proxy server when the address mapping relationship is updated, and the like, and the management server may be flexibly set according to actual needs, and specific contents are not limited here.
202. The proxy server stores the address mapping relationship.
After receiving the address mapping relationship sent by the management server, the proxy server may store the address mapping relationship.
203. The management server sends the probe configuration information to the probe server.
The management server may obtain the probe configuration information from the information base, or receive the probe configuration information sent by the configuration terminal (e.g., a computer), but the probe configuration information may also be obtained in other manners. The probing configuration information may include an IP address, a probing period, a probing protocol, etc. mapped in the base network by the target server to be probed.
When the number of the target servers is multiple, the management server may respectively obtain the detection configuration information corresponding to each target server.
After the probe configuration information is obtained, the management server may send the probe configuration information to the probe server at preset time intervals based on the identifier, address, or the like of the probe server, or send the probe configuration information to the probe server when the probe configuration information is updated, and the like, and the probe configuration information may be flexibly set according to actual needs, and specific contents are not limited here.
It should be noted that, when there are multiple probe servers, the management server may obtain the priority of each probe server, and send probe configuration information to the probe server with the higher priority.
204. And the detection server generates a detection packet according to the detection configuration information.
After receiving the probe configuration information sent by the management server, the probe server may generate a probe packet according to the probe configuration information, where the probe packet may include an address (e.g., an IP address), a probe period (e.g., 10 seconds), a probe protocol (e.g., ICMP and Telnet), and the like, which are mapped in the infrastructure network by the target server to be probed.
For example, the probe packet of the ICMP may include an address of the target server in the infrastructure network, a packet size, and the like, and for the probe packet of the Telnet, the probe packet may include an address, port information, a key, and the like of the target server in the infrastructure network.
When a plurality of target servers are provided, the detection packets corresponding to the target servers can be respectively generated according to the detection configuration information corresponding to the target servers.
205. The probe server sends a probe packet to the proxy server.
After obtaining the probe packets, the probe server may send one or more probe packets to the proxy server based on the identity or address of the proxy server, etc.
It should be noted that, when there are multiple proxy servers, the management server may obtain the priority of each proxy server, determine one or more proxy servers with higher priority to obtain a target proxy server, and then send an identifier or an address of the target proxy server to the probe server, where the probe server may send a probe packet to the proxy server with higher priority.
206. The proxy server converts the first address of the target server in the basic network into the second address in the private network according to the address mapping relation.
The detection packet may carry a first address, and the proxy server may extract the first address from the detection packet after receiving the detection packet sent by the detection server. Since the server detection system is deployed in the base network, the target server to be detected is located in the private network, and the first address obtained by the proxy server in the base network is the address mapped by the target server in the base network, in order to perform data transmission with the target server, the proxy server may convert the first address into the address of the target server in the private network according to the stored address mapping relationship, so as to obtain the second address.
207. The proxy server sends the probe packet to the target server based on the second address.
After the second address is obtained by the conversion, the proxy server may send the probe packet to a target server located in the private network based on the second address, for example, the second address may be added to the probe packet, and the second address is used as a destination address indicating the target server to be probed, so that the probe packet may be sent to the target server based on the second address.
When a plurality of target servers need to be probed, the proxy server can call a plurality of threads and send the probe packets to the target servers in the private network in parallel through the plurality of threads based on each second address.
208. The target server generates a probe result.
The target server may parse the probe packet and generate a probe result based on the parsed probe packet after receiving the probe packet, for example, may extract the second address from the probe packet and then generate the probe result based on the second address.
For example, for an ICMP probe packet, the destination server may extract information such as the second address and the packet size from the probe packet, and generate a probe result; for a probe packet of Telnet, the target server may extract information such as the second address, the port information, and the key from the probe packet, and generate a probe result.
209. The target server returns the detection result to the proxy server.
After generating the probe result, the target server may return the probe result to the proxy server along a path along which the probe packet is transmitted, for example, may extract the second address from the probe packet, and then return the probe result to the proxy server based on the second address.
210. The proxy server converts the second address into the first address according to the address mapping relation.
The detection result may include a second address corresponding to the target server in the private network, and after receiving the detection result returned by the target server based on the detection packet, the proxy server may extract the second address from the detection result, and then may convert the second address into an address mapped by the target server in the base network according to the stored address mapping relationship, to obtain the first address.
211. And the proxy server returns a detection result to the detection server based on the first address.
After obtaining the first address, the proxy server may send the probe result to the probe server based on the first address.
212. The detection server returns a detection result to the management server.
And after the detection result is obtained, the detection server returns the detection result to the management server, and after the management server receives the detection result, the management server can perform detection again according to the detection period set in the detection configuration information.
The detection result may include that the target server is normal or the target server is abnormal, and the target server may be normal, that the target server is in a normal operation state, that a connection link between the target server and the target server is in a normal connection state, or that the target server is available; the target server exception may be that the target server is in a non-operational state, or that a connection link with the target server is in a disconnected state, or that the target server denies access, or that the target service is unavailable, etc.
The embodiment of the invention can detect the servers in the VPC network by each server in the basic network based on the VPC network environment, and can realize the detection function without occupying or expanding the existing VPC network resources (such as resources of server hardware or IP addresses) and adjusting the architecture on the premise of not changing the existing VPC network configuration, network architecture and the like; the network architecture has strong adaptability, and can adapt to various VPC network architectures, such as General Routing Encapsulation (GRE) or Virtual Extensible LAN (VXLAN) and the like; the operation deployment is flexible and high in reliability, detection services can be performed online and offline at any time, various network states of a server in the VPC network are detected, and operation management of various services can be assisted; in addition, the problem of communication between a basic network and a VPC network is solved by adding the proxy, resources such as a detection server or a proxy server can be flexibly allocated to detect a target server, and convenience and flexibility of detection of the server are improved.
In order to better implement the server detection method provided by the embodiment of the invention, the embodiment of the invention also provides a system based on the server detection method. The terms are the same as those in the above-mentioned server detection method, and details of implementation may refer to the description in the method embodiment.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a server probe system according to an embodiment of the present invention, where the server probe system may include a management server 301, a probe server 302, a proxy server 303, and the like.
The probe server 302 is configured to obtain a probe packet in the infrastructure network, where the probe packet is used to probe a target server, and send the probe packet to the proxy server 303.
The management server 301, the probe server 302, the proxy server 303, and the like may be deployed in a base network, and a target server to be probed is located in a private network, so that the probe server 302 may obtain a probe packet in the base network, where the probe packet may include an address (for example, the address may be an IP address) mapped in the base network by the target server to be probed, a probe cycle, a probe protocol, and the like. The probe protocol may include ICMP protocol or Telnet protocol, etc.
The probe server 302 may acquire the probe packet at a preset time interval or acquire the probe packet when there is configuration update, and the specific acquisition time may be flexibly set according to actual needs, which is not limited herein.
In some embodiments, the management server 301 is configured to obtain the probe configuration information in the infrastructure network and send the probe configuration information to the probe server 302; a probe server 302 for generating a probe packet based on the probe configuration information.
Specifically, the management server 301 in the infrastructure network may obtain the probe configuration information from the information base, or receive the probe configuration information sent by the configuration terminal, and of course, the probe configuration information may also be obtained in other manners. The configuration terminal may be a terminal configured to detect configuration information, and the terminal may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, or the like. The probing configuration information may include an IP address, a probing period, a probing protocol, etc. mapped in the base network by the target server to be probed.
After obtaining the probe configuration information, the management server 301 may send the probe configuration information to the probe server 302, at this time, the probe server 302 may generate a probe packet based on the probe configuration information, where the probe packet may include a five-tuple, such as a source address, a destination address, a source port number, a destination port number, and a transport layer protocol, in addition to a probe period and a probe protocol, and after obtaining the probe packet, the probe server 302 may initiate probing of the target server.
When there are a plurality of target servers, the management server 301 may respectively obtain the detection configuration information corresponding to each target server, and send the detection configuration information corresponding to each target server to the detection server 302, and the detection server 302 may respectively generate the detection packet corresponding to each target server based on the detection configuration information corresponding to each target server.
In some embodiments, the management server 301 is configured to receive a configuration instruction in the infrastructure network, and determine a target server to be probed, a probing period, and a probing protocol according to the configuration instruction; the management server 301 is configured to generate probe configuration information according to the target server, the probe period, and the probe protocol.
The management server 301 may obtain the probe configuration information by receiving a configuration instruction sent by a user through a configuration terminal in the infrastructure network, where the configuration instruction is used to set the probe configuration information. And then, determining information such as a target server to be detected, a detection period, a detection protocol and the like according to the configuration instruction, wherein the information is detection configuration information.
For example, the content examples contained in the probe configuration information may be: (1) IP address of target server a in the base network: UnderLayIP A; (2) detection period: 10 seconds; (3) the detection protocol comprises the following steps: an ICMP; IP address of target server B in the base network: UnderLayIP B, probe period: 20 seconds, probing protocol: telnet.
In some embodiments, the probe server 302 includes a plurality of, management servers 301, configured to obtain status information of each probe server 302;
a management server 301 for determining the priority of each probe server 302 according to the status information of each probe server 302;
a management server 301, configured to determine at least one probe server 302 from the plurality of probe servers 302 according to the priority of each probe server 302, and obtain a target probe server 302;
and a management server 301 for controlling the target probe server 302 to generate the probe packet based on the probe configuration information.
In particular, when the server probe system includes one probe server 302, the probe server 302 may generate one or more probe packets. When the server probe system includes a plurality of probe servers 302, the management server 301 may acquire the priority of each probe server 302 and preferentially generate one or more probe packets by the probe server 302 having the higher priority.
For example, the management server 301 may obtain status information of each probe server 302, where the status information may include the capacity of the probe server 302, whether a probe is being initiated or not being initiated, and the like, and then the management server 301 may determine the priority of each probe server 302 according to the status information of each probe server 302, for example, a weight value may be set for each type of information in the status information, and the higher the total weight value of the status information is, the higher the priority is, or the determination of the priority according to the size of the capacity of each probe server 302 is performed, and the higher the priority is the larger the capacity is.
In this case, the management server 301 may determine at least one probe server 302 from the plurality of probe servers 302 to obtain the target probe server 302 according to the priority of each probe server 302, for example, may rank the probe servers 302 from high to low according to the priority, determine one probe server 302 with the highest priority from the plurality of probe servers 302 to obtain one target probe server 302, or determine a plurality of probe servers 302 with the highest priority from the plurality of probe servers 302 to obtain a plurality of target probe servers 302. After determining the target server 302, the management server 301 may control the target probe server 302 to generate probe packets based on the probe configuration information, for example, the management server 301 may send the probe configuration information to the target probe server 302, so that the target probe server 302 may generate one or more probe packets based on the probe configuration information.
The management server 301 is configured to obtain an address mapped by the target server in the base network, obtain a first address, and send the first address to the proxy server 303.
The management server 301 may obtain an address mapped in the base network by the target server to be detected, to obtain the first address, for example, the first address may be extracted from the received detection configuration information, or an address setting instruction may be received, and the first address may be determined according to the address setting instruction. The first address may include an address corresponding to one, i.e., one, target server; or, the detection packet carries the first address, and the first address can be extracted from the detection packet; the first address may also include a plurality of addresses, that is, an address corresponding to each of the plurality of target servers, and a plurality of addresses are obtained.
A proxy server 303 for translating the first address to a second address of the destination server in the private network.
Since the proxy server 303 is deployed in the base network, and the target server to be detected is located in the private network, the first address obtained in the base network is an address mapped by the target server in the base network, so for data transmission with the target server, the proxy server 303 may convert the first address into an address of the target server in the private network, and obtain the second address.
In some embodiments, the management server 301 is configured to obtain an address mapping relationship between the basic network and the private network, and send the address mapping relationship to the proxy server 303;
the proxy server 303 is configured to convert the first address into a second address of the destination server in the private network according to the address mapping relationship.
Specifically, the management server 301 may obtain an address mapping relationship between the base network and the private network from a database storing the address mapping relationship, or the management server 301 may receive the address mapping relationship between the base network and the private network sent by the terminal, or the management server 301 may receive the establishment instruction, determine, based on the establishment instruction, an address of each target server in the base network and an address of each target server in the private network, and then establish the address mapping relationship between the base network and the private network according to the address of each target server in the base network and the address of each target server in the private network; and so on.
It should be noted that the obtaining manner of the address mapping relationship may be flexibly set according to actual needs, and specific contents are not limited herein.
The address mapping relationship may exist in a form of a list (e.g., an address mapping relationship table), or exist in a form of text (e.g., an address mapping relationship text), and after obtaining the address mapping relationship, the management server 301 may send the address mapping relationship to the proxy server 303. At this time, the proxy server 303 may convert the first address into a second address of the destination server in the private network according to the address mapping relationship, for example, the first address underway ip a may be searched from the address mapping relationship table, after the first address is obtained, the second address overlaay ip B corresponding to the first address may be determined, at this time, the first address may be replaced by the second address, and the like, so that the probe packet may be transmitted using the second address overlaay ip B subsequently.
In some embodiments, the proxy servers 303 include a plurality of, the management server 301, configured to obtain status information of each of the proxy servers 303;
a management server 301 for determining the priority of each proxy server 303 according to the status information of each proxy server 303;
the management server 301 is configured to determine at least one proxy server 303 from the plurality of proxy servers 303 according to the priority of each proxy server 303, and obtain a target proxy server 303;
and the management server 301 is used for controlling the target proxy server 303 to convert the first address into a second address of the target server in the private network according to the address mapping relation.
Specifically, when the server probe system includes one proxy server 303, address translation may be performed by the proxy server 303, and when the server probe system includes a plurality of proxy servers 303, the management server 301 may acquire the priority of each proxy server 303 and perform address translation preferentially by the proxy server 303 having a high priority.
For example, the management server 301 may obtain status information of each proxy server 303, where the status information may include the capacity of the proxy server 303, the agent being initiated, the agent not being initiated, and the like, and then the management server 301 may determine the priority of each proxy server 303 according to the status information of each proxy server 303, for example, a weight value may be set for each type of information in the status information, the higher the total weight value of the status information is, the higher the priority is, or determination of the priority according to the size of the capacity of each proxy server 303 is performed, the higher the priority is for the larger the capacity is, and the like.
In this case, the management server 301 may obtain the target proxy server 303 by specifying at least one proxy server 303 from the plurality of proxy servers 303 according to the priority of each proxy server 303, for example, may obtain one target proxy server 303 by sorting the proxy servers 303 from high to low in priority, specify one proxy server 303 with the highest priority from the plurality of proxy servers 303, or obtain a plurality of target proxy servers 303 by specifying a plurality of proxy servers 303 with the highest priority from the plurality of proxy servers 303. After determining the destination server 303, the management server 301 may control the destination proxy server 303 to convert a first address into a second address of the destination server in the private network according to an address mapping relationship, where the first address may include one or more addresses, and the second address may also include one or more addresses.
And the proxy server 303 is used for sending the detection packet to a target server positioned in the private network based on the second address.
After converting the second address, the proxy server 303 may send the probe packet to the destination server located in the private network based on the second address, for example, the second address may be added to the probe packet, and the second address is used as a destination address indicating the destination server to be probed, so that the probe packet may be sent to the destination server based on the second address.
In some embodiments, when the second address includes a plurality of addresses, the proxy server 303 is configured to invoke a plurality of threads and send the probe packet in parallel to the target server located in the private network through the plurality of threads based on each second address.
Specifically, when the second address includes a plurality of addresses, it indicates that a plurality of target servers need to be probed, in this case, the probe packet may include a plurality of packets, and the proxy server 303 may invoke a plurality of threads and send each probe packet to the target server to be probed in parallel based on each second address through the plurality of threads, or send each probe packet to the target server to be probed in series based on each second address through the plurality of threads.
And the proxy server 303 is configured to receive a probe result returned by the target server based on the probe packet.
The target server may parse the probe packet after receiving the probe packet, and return a probe result to the proxy server 303 based on the parsed probe packet, for example, may extract the second address from the probe packet, and then return the probe result based on the second address. After the detection result is obtained, the server detection system may perform detection again according to the detection period set in the detection configuration information. The detection of the servers in the VPC network is realized by each server in the basic network based on the VPC network environment; the detection of various network states of the server in the VPC network can be realized without changing the configuration of the VPC network, the network architecture and the like and expanding resources and adjusting the architecture.
In some embodiments, the proxy server 303 is configured to receive a probe result returned by the target server based on the probe packet;
a proxy server 303, configured to extract a second address from the probe result;
the proxy server 303 is configured to convert the second address into the first address according to the address mapping relationship;
and the proxy server 303 is used for sending the detection result to the management server 301 through the detection server 302 based on the first address.
Specifically, the management server 301 may manage the probe result, where the probe result may include a second address corresponding to the target server in the private network, and after receiving the probe result returned by the target server based on the probe packet, the proxy server 303 may extract the second address from the probe result, and in order to enable data transmission with the base management server, the proxy server 303 may convert the second address into an address of the target server in the base network according to an address mapping relationship to obtain a first address, at this time, the probe result may be sent to the probe server 302 based on the first address, and then the probe server 302 sends the probe result to the management server 301.
In some embodiments, the proxy server 303 is configured to receive a first probe result returned by the target server and normal to the target server when the target server generates the probe response packet within a preset time of receiving the probe packet, where the first probe result is generated based on the probe response packet;
and the proxy server 303 is configured to receive a second detection result of the target server being abnormal, where the second detection result is returned by the target server when the target server does not generate the probe response packet within the preset time of receiving the probe packet.
The detection result may include that the target server is normal or the target server is abnormal, and the target server may be normal, that the target server is in a normal operation state, that a connection link between the target server and the target server is in a normal connection state, or that the target server is available; the target server exception may be that the target server is in a non-operational state, or that a connection link with the target server is in a disconnected state, or that the target server denies access, or that the target service is unavailable, etc.
Specifically, after receiving the probe packet, the target server may generate the probe response packet within a preset time, where the preset time may be flexibly set according to actual needs, and a specific value is not limited here. When the target server generates the probe response packet within the preset time of receiving the probe packet, it indicates that the target server is normal, at this time, the proxy server 303 may receive a first probe result that the target server returns that the target server is normal, where the first probe result may be generated by the target server based on the probe response packet. When the target server does not generate the probe response packet within the preset time of receiving the probe packet, it indicates that the target server is abnormal, at this time, the proxy server 303 may receive a second probe result of the target server being abnormal, where the second probe result may be that the probe response packet is not generated at the target server.
As can be seen from the above, in the embodiment of the present invention, the probe server 302 may obtain, in the basic network, the probe packet for indicating the target server that needs to be probed, and the management server 301 obtains the address mapped by the target server in the basic network, obtains the first address, and sends the first address to the proxy server 303; then, the proxy server 303 converts the first address into a second address of the target server in the private network, sends a probe packet to the target server in the private network based on the second address, and receives a probe result returned by the target server based on the probe packet. According to the scheme, the server detection system can be deployed in the basic network outside the private network, so that the server detection system can flexibly allocate resources of all servers to detect the target server, and convenience and flexibility in detection of the servers are improved.
Embodiments of the present invention further provide a server, which may be a server in a server probe system, for example, a structure of a server such as a management server, a probe server, or a proxy server in the server probe system may be similar to that of the server, as shown in fig. 7, which shows a schematic structural diagram of the server according to an embodiment of the present invention, specifically:
the server may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the server architecture shown in FIG. 7 is not meant to be limiting, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the server, connects various parts of the entire server using various interfaces and lines, and performs various functions of the server and processes data by running or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the server. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the server, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The server further includes a power supply 403 for supplying power to each component, and preferably, the power supply 403 may be logically connected to the processor 401 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The server may also include an input unit 404, the input unit 404 being operable to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the server may further include a display unit and the like, which will not be described in detail herein. Specifically, in this embodiment, the processor 401 in the server loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application program stored in the memory 402, thereby implementing various functions as follows:
acquiring a detection packet in a basic network, wherein the detection packet is used for detecting a target server; acquiring an address mapped by a target server in a basic network to obtain a first address; converting the first address to a second address of the destination server in the private network; sending a probe packet to a target server located in the private network based on the second address; and receiving a detection result returned by the target server based on the detection packet.
As can be seen from the above, in the embodiment of the present invention, the detection packet for indicating the target server to be detected can be obtained in the basic network, and the address mapped by the target server in the basic network is obtained, so as to obtain the first address; and then, converting the first address into a second address of the target server in the private network, sending a detection packet to the target server in the private network based on the second address, and receiving a detection result returned by the target server based on the detection packet. According to the scheme, the server detection system can be deployed in the basic network outside the private network, so that the server detection system can flexibly allocate resources of all servers to detect the target server, and convenience and flexibility in detection of the servers are improved.
In the above embodiments, the descriptions of the embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed description of the server detection method, and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present invention provides a storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps in any one of the server detection methods provided by the embodiments of the present invention. For example, the instructions may perform the steps of:
acquiring a detection packet in a basic network, wherein the detection packet is used for detecting a target server; acquiring an address mapped by a target server in a basic network to obtain a first address; converting the first address to a second address of the destination server in the private network; sending a probe packet to a target server located in the private network based on the second address; and receiving a detection result returned by the target server based on the detection packet.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium may execute the steps in any server detection method provided in the embodiments of the present invention, beneficial effects that can be achieved by any server detection method provided in the embodiments of the present invention may be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The server detection method, system and storage medium provided by the embodiments of the present invention are described in detail above, and the principles and embodiments of the present invention are explained herein by applying specific examples, and the descriptions of the above embodiments are only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (19)

1. A server detection system, characterized in that the server detection system comprises a management server, a detection server and a proxy server, wherein the management server, the detection server and the proxy server are connected with each other, the server detection system receives data transmitted to the inside of the system through the management server and is connected with a target server outside the system through the proxy server, the management server, the detection server and the proxy server are located in a basic network, the target server is located in a private network,
the detection server is used for acquiring a detection packet in a basic network and sending the detection packet to the proxy server, wherein the detection packet is used for detecting a target server; the detection packet is generated based on detection configuration information, and the detection server is a detection server with the highest priority determined based on the state information of at least one detection server;
the management server is used for acquiring the address mapped by the target server in the basic network, acquiring a first address and sending the first address to the proxy server;
the proxy server is used for converting the first address into a second address of the target server in a private network; the proxy server is the proxy server with the highest priority determined based on the state information of at least one proxy server;
the proxy server is used for sending the detection packet to the target server positioned in a private network based on the second address;
the proxy server is configured to receive a detection result returned by the target server based on the detection packet, so as to implement detection of the target server in the private network based on the detection packet by the management server, the detection server, and the proxy server in the base network.
2. The server detection system according to claim 1, wherein the management server is configured to obtain an address mapping relationship between a base network and a private network, and send the address mapping relationship to the proxy server;
and the proxy server is used for converting the first address into a second address of the target server in a private network according to the address mapping relation.
3. The server detecting system according to claim 2, wherein the proxy server includes a plurality of proxy servers, the management server is configured to obtain status information of each of the proxy servers;
the management server is used for determining the priority of each proxy server according to the state information of each proxy server;
the management server is used for determining at least one proxy server from the plurality of proxy servers according to the priority of each proxy server to obtain a target proxy server;
and the management server is used for controlling the target proxy server to convert the first address into a second address of the target server in a private network according to the address mapping relation.
4. The server probe system of claim 2, wherein the proxy server is configured to receive a probe result returned by the target server based on the probe packet;
the proxy server is used for extracting the second address from the detection result;
the proxy server is used for converting the second address into the first address according to the address mapping relation;
and the proxy server is used for sending the detection result to the management server through the detection server based on the first address.
5. The server detection system according to claim 4, wherein the proxy server is configured to receive a first detection result returned by the target server and indicating that the target server is normal when the target server generates a probe response packet within a preset time period after receiving the probe packet, and the first detection result is generated based on the probe response packet;
and the proxy server is used for receiving a second detection result of the target server abnormity returned by the target server when the target server does not generate a detection response packet within the preset time of receiving the detection packet.
6. The server probe system according to any one of claims 1 to 5, wherein when the second address includes a plurality of addresses, the proxy server is configured to invoke a plurality of threads and send the probe packet in parallel to the target server located in a private network based on each second address through the plurality of threads.
7. The server detection system according to any one of claims 1 to 5, wherein the management server is configured to obtain the detection configuration information in the infrastructure network and send the detection configuration information to the detection server;
the detection server is used for generating a detection packet based on the detection configuration information.
8. The server detection system according to claim 7, wherein the management server is configured to receive a configuration instruction in the infrastructure network, and determine a target server to be detected, a detection period and a detection protocol according to the configuration instruction;
and the management server is used for generating detection configuration information according to the target server, the detection period and the detection protocol.
9. The server probe system according to claim 7, wherein the probe server includes a plurality of probe servers, and the management server is configured to acquire status information of each probe server;
the management server is used for determining the priority of each detection server according to the state information of each detection server;
the management server is used for determining at least one detection server from the plurality of detection servers according to the priority of each detection server to obtain a target detection server;
the management server is used for controlling the target detection server to generate a detection packet based on the detection configuration information.
10. A server detection method is applied to a server detection system, and comprises the following steps:
acquiring a detection packet in a basic network, wherein the detection packet is used for detecting a target server; the probe packet is generated based on probe configuration information;
acquiring the address mapped by the target server in a basic network to obtain a first address;
converting the first address to a second address of the target server in a private network;
sending the probe packet to the target server located in a private network based on the second address;
and receiving a detection result returned by the target server based on the detection packet so as to realize the detection of the target server in the private network based on the detection packet in the basic network.
11. The server probing method according to claim 10, wherein the step of translating the first address to the second address of the target server in a private network comprises:
acquiring an address mapping relation between a basic network and a private network;
and converting the first address into a second address of the target server in a private network according to the address mapping relation.
12. The server probe method according to claim 11, wherein the server probe system includes a plurality of proxy servers, and the step of converting the first address into the second address of the target server in the private network according to the address mapping relationship includes:
acquiring state information of each proxy server;
determining the priority of each proxy server according to the state information of each proxy server;
determining at least one proxy server from the plurality of proxy servers according to the priority of each proxy server to obtain a target proxy server;
and controlling the target proxy server to convert the first address into a second address of the target server in a private network according to the address mapping relation.
13. The server probe method according to claim 11, wherein the server probe system includes a management server, and the step of receiving the probe result returned by the target server based on the probe packet includes:
receiving a detection result returned by the target server based on the detection packet;
extracting the second address from the detection result;
converting the second address into the first address according to the address mapping relation;
and sending the detection result to the management server based on the first address.
14. The server probe method according to claim 13, wherein the step of receiving the probe result returned by the target server based on the probe packet comprises:
when the target server generates a detection response packet within a preset time of receiving the detection packet, receiving a first detection result returned by the target server and normal to the target server, wherein the first detection result is generated based on the detection response packet;
and when the target server does not generate the detection response packet within the preset time of receiving the detection packet, receiving a second detection result of the target server abnormality returned by the target server.
15. The server probe method according to any one of claims 10 to 14, wherein when the second address includes a plurality of addresses, the step of sending the probe packet to the target server located in a private network based on the second address includes:
and calling a plurality of threads, and sending the detection packet to the target server in the private network in parallel through the plurality of threads based on each second address.
16. The server probing method according to any one of claims 10 to 14 wherein the step of obtaining probe packets in the base network comprises:
acquiring detection configuration information in a basic network;
generating a probe packet based on the probe configuration information.
17. The server probing method according to claim 16, wherein the step of obtaining probing configuration information in the infrastructure network comprises:
receiving a configuration instruction in a basic network, and determining a target server to be detected, a detection period and a detection protocol according to the configuration instruction;
and generating detection configuration information according to the target server, the detection period and the detection protocol.
18. The server probe method according to claim 16, wherein the server probe system includes a plurality of probe servers, and the step of generating probe packets based on the probe configuration information includes:
acquiring state information of each detection server;
determining the priority of each detection server according to the state information of each detection server;
determining at least one detection server from the plurality of detection servers according to the priority of each detection server to obtain a target detection server;
controlling the target probe server to generate a probe packet based on the probe configuration information.
19. A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the server probe method according to any one of claims 10 to 18.
CN201810344956.1A 2018-04-17 2018-04-17 Server detection method, system and storage medium Active CN108650337B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810344956.1A CN108650337B (en) 2018-04-17 2018-04-17 Server detection method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810344956.1A CN108650337B (en) 2018-04-17 2018-04-17 Server detection method, system and storage medium

Publications (2)

Publication Number Publication Date
CN108650337A CN108650337A (en) 2018-10-12
CN108650337B true CN108650337B (en) 2021-10-08

Family

ID=63746356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810344956.1A Active CN108650337B (en) 2018-04-17 2018-04-17 Server detection method, system and storage medium

Country Status (1)

Country Link
CN (1) CN108650337B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112187584B (en) * 2020-09-30 2023-07-21 腾讯科技(深圳)有限公司 Path fault detection method, system, server and storage medium
CN112399226B (en) * 2020-10-19 2022-10-21 广州视源电子科技股份有限公司 Cross-screen playing method, device, equipment and storage medium
CN114499921A (en) * 2021-11-26 2022-05-13 中国南方电网有限责任公司 Data packet file playback method, data packet file acquisition method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102437931A (en) * 2011-12-29 2012-05-02 华为技术有限公司 Detection method and device of service path
CN102685262A (en) * 2012-04-16 2012-09-19 中兴通讯股份有限公司 Method, device and system for detecting network address translation (NAT) information
CN103532818A (en) * 2013-10-24 2014-01-22 福建师范大学 Quick test method of accessibility of VPN link
CN103944760A (en) * 2014-04-17 2014-07-23 杭州华三通信技术有限公司 NAT-traversal network managing method and device
CN107707377A (en) * 2017-06-12 2018-02-16 贵州白山云科技有限公司 A kind of method and system for analyzing network node availability

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7010608B2 (en) * 2001-09-28 2006-03-07 Intel Corporation System and method for remotely accessing a home server while preserving end-to-end security

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102437931A (en) * 2011-12-29 2012-05-02 华为技术有限公司 Detection method and device of service path
CN102685262A (en) * 2012-04-16 2012-09-19 中兴通讯股份有限公司 Method, device and system for detecting network address translation (NAT) information
CN103532818A (en) * 2013-10-24 2014-01-22 福建师范大学 Quick test method of accessibility of VPN link
CN103944760A (en) * 2014-04-17 2014-07-23 杭州华三通信技术有限公司 NAT-traversal network managing method and device
CN107707377A (en) * 2017-06-12 2018-02-16 贵州白山云科技有限公司 A kind of method and system for analyzing network node availability

Also Published As

Publication number Publication date
CN108650337A (en) 2018-10-12

Similar Documents

Publication Publication Date Title
CN110113441B (en) Computer equipment, system and method for realizing load balance
US11477097B2 (en) Hierarchichal sharding of flows from sensors to collectors
EP3355553B1 (en) Reliable load-balancer using segment routing and real-time application monitoring
US10250508B2 (en) Load balancing method and system
CN108777640B (en) Server detection method, device, system and storage medium
US11463511B2 (en) Model-based load balancing for network data plane
TWI598746B (en) Server systems and computer-implemented method for providing flexible hard-disk drive (hdd) and solid-state drive (ssd) support in a computing system
CN105610632B (en) Virtual network equipment and related method
CN102105865B (en) Method and system for power management in a virtual machine environment without disrupting network connectivity
US10091274B2 (en) Method, device, and system for controlling network device auto-provisioning
Qi et al. Assessing container network interface plugins: Functionality, performance, and scalability
US9733687B2 (en) Hybrid control methods for uninterruptible power supplies
US20190033938A1 (en) High efficient battery backup system
US20190036377A1 (en) Oring fet control method for battery backup system
TWI598822B (en) Computer-implemented method for powering down a plurality of active components of system, and server system
CN111193773B (en) Load balancing method, device, equipment and storage medium
US8984114B2 (en) Dynamic session migration between network security gateways
JP2019032818A (en) Multiple-node system fan control switch
CN109728962B (en) Method and equipment for sending message
US11671401B2 (en) Providing persistent external internet protocol address for extra-cluster services
EP3934206B1 (en) Scalable control plane for telemetry data collection within a distributed computing system
TW201832092A (en) Virtual dedicated network and rule table generation method and apparatus, and routing method
CN108650337B (en) Server detection method, system and storage medium
US20190026168A1 (en) Geographical Redundancy and Dynamic Scaling for Virtual Network Functions
CN112953982B (en) Service processing method, service configuration method and related 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