CN106713503A - Method and device for acquiring information of business server in real time - Google Patents

Method and device for acquiring information of business server in real time Download PDF

Info

Publication number
CN106713503A
CN106713503A CN201710086789.0A CN201710086789A CN106713503A CN 106713503 A CN106713503 A CN 106713503A CN 201710086789 A CN201710086789 A CN 201710086789A CN 106713503 A CN106713503 A CN 106713503A
Authority
CN
China
Prior art keywords
server
service server
domain name
service
list
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710086789.0A
Other languages
Chinese (zh)
Other versions
CN106713503B (en
Inventor
刘泽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qunar Software Technology Co Ltd
Original Assignee
Beijing Qunar Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qunar Software Technology Co Ltd filed Critical Beijing Qunar Software Technology Co Ltd
Priority to CN201710086789.0A priority Critical patent/CN106713503B/en
Publication of CN106713503A publication Critical patent/CN106713503A/en
Application granted granted Critical
Publication of CN106713503B publication Critical patent/CN106713503B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method and a device for acquiring the information of a business server in real time. The method comprises the following steps: a domain name server sends a query command to a directory server; the domain name server receives the address and state information of the business server returned by the directory server; the domain name server filters the business server state information meeting a predetermined condition according to the configured predetermined condition; and the domain name server returns the filtered business server address information back to a client terminal. According to the method and the device provided by the invention, the technical problem that the performance of the business server is continuously reduced due to a large number of continuous requests is solved.

Description

The method and device of business server information are obtained in real time
Technical field
The present invention relates to server field, in particular to a kind of real-time method for obtaining business server information with And device.
Background technology
At present, server DNS (Domain Name Server, name server) is to carry out domain name (domain name) The server changed with corresponding IP address (IP address);A domain name (domain name) is saved in DNS With the table of corresponding IP address (IP address), to parse the domain name of message;Domain name is a certain on Internet The title of computer or calculating unit, electronic bearing (the sometimes referred to as geographical position for identifying computer in data transfer Put);Domain name is made up of the name that a string are separated with point, generally comprises organization name, and includes two to three letters all the time Suffix, with indicate tissue type or the domain where country.
DNS is the abbreviation of computer domain name system (Domain Name System or Domain Name Service), it It is made up of Domain Name Resolver and name server;Name server refer to preserve All hosts in the network domain name and Correspondence IP address, and with domain name to be converted to the server of IP address function;Wherein domain name must correspond to an IP address, one Individual IP address can have multiple domain names, and IP address not necessarily has domain name;Domain name system is using the hierarchical organization for being similar to directory tree; Name server is usually the server side in Client/Server pattern, and it mainly has two kinds of forms:Master server and forwarding Server.The process that domain name is mapped as IP address is known as " domain name mapping " appreciable dns server, can be with real-time perception Service server state, real-time update A is recorded and is provided the load balancing dns resolution service of reliable customization.
At present, for the burst access of service server, service server load rise can be caused, the response time increases, The problems such as hydraulic performance decline, now name server be unable to the change of perception service server, still parse client's request so far industry Business server, causes server stress to raise.
For above-mentioned problem, effective solution is not yet proposed at present.
The content of the invention
A kind of real-time method and device for obtaining business server information is the embodiment of the invention provides, is solved due to even Continuous a large amount of requests cause the technical problem of service server performance continuous decrease.
One side according to embodiments of the present invention, there is provided a kind of real-time method for obtaining business server information, bag Include:Name server sends query statement to LIST SERVER, wherein, at least one business service is registered with LIST SERVER Device;Name server receives address and the status information of the service server that LIST SERVER is returned;Name server is according to matching somebody with somebody Put the service server status information that predetermined condition filtering meets predetermined condition;Name server is by the service server after filtering Address information return to client terminal.
Further, the status information of service server, including:The processor utilization rate of service server, internal memory can use The communications status in space, disk free space and network interface.
Further, name server meets the service server state letter of predetermined condition according to configuration predetermined condition filtering Breath, including:Whether processor utilization rate is more than or equal to predetermined efficiency value;Whether internal memory free space is more than or equal to the first predetermined sky Between be worth;Whether disk free space is more than or equal to the second predetermined space value;Whether the communications status of network interface are idle condition.
Further, before name server sends query statement to LIST SERVER, method also includes:Start at least One service server;Service server creates agreement node on LIST SERVER;Wherein, agreement node refers to business service The business memory space that device is created under LIST SERVER, agreement node is corresponded with the domain-name information of service server;Industry Business server preserves Self address and status information to arranging node.
Further, after service server creates agreement node on LIST SERVER, method also includes:Domain name takes Business device accesses LIST SERVER, and subscribes to agreement node, wherein, agreement node is used to receive the logical of service server state change Know information.
Further, the address information that the service server of predetermined condition will be met in name server returns to client's end After end, method also includes:In the case where the service server for meeting predetermined condition breaks down, LIST SERVER is perceived Service server failure;LIST SERVER deletes the status information of service server under agreement node according to fault message;Catalogue Server notifies that name server, name server pull the last state letter of the currently available service server of LIST SERVER Breath.
Further, before name server sends query statement to LIST SERVER, method also includes:Start domain name Server;Name server subscribes to the corresponding agreement node of domain name to LIST SERVER.
A kind of other side according to embodiments of the present invention, there is provided real-time device for obtaining business server information, Including:Module is sent, query statement to LIST SERVER is sent for name server, wherein, registered with LIST SERVER At least one service server;Receiver module, the ground of the service server that LIST SERVER is returned is received for name server Location and status information;Filtering module, the business clothes of predetermined condition are met for name server according to configuration predetermined condition filtering Business device status information;Module is returned, the address information of the service server after filtering is returned into client for name server Terminal.
Further, receiver module includes:The status information of service server includes:The processor of service server is used The communications status of rate, internal memory free space, disk free space and network interface.
Further, filtering module, including:First judge module, for processor utilization rate whether more than or equal to predetermined Efficiency value;Whether the second judge module, the first predetermined space value is more than or equal to for internal memory free space;3rd judge module, Whether it is more than or equal to the second predetermined space value for disk free space;4th judge module, for the communication shape of network interface Whether state is idle condition.
Further, sending module also includes:First starting module, for starting at least one service server;Create Module, agreement node is created for service server on LIST SERVER;Wherein, agreement node refers to service server in mesh The business memory space created under record server, agreement node is corresponded with the domain-name information of service server;Preserving module, The agreement node of Self address and status information into is preserved for service server.
Further, creation module also includes:Access modules, access LIST SERVER, and subscribe to for name server Agreement node, wherein, agreement node is used to receive the announcement information of service server state change.
Further, returning to module also includes:Sensing module, for there is event in the service server for meeting predetermined condition In the case of barrier, LIST SERVER perceives service server failure and deletes the state letter of service server under agreement node Breath;Module is pulled, name server is notified for LIST SERVER, name server pulls the current of LIST SERVER registration can With the up-to-date information of service server.
Further, sending module also includes:Second starting module, for starting name server;Subscribing module, is used for Name server subscribes to the corresponding agreement node of domain name to LIST SERVER.
In embodiments of the present invention, by the way of name server sends query statement to LIST SERVER, by domain Name server receives address and the status information of the service server that LIST SERVER is returned, and name server is predetermined according to configuration Condition filter meets the service server status information of predetermined condition, and name server is by the address of the service server after filtering Information returns to client terminal, and having reached name server can be with real-time perception service server state and more new record, there is provided The purpose that load balancing dns resolution that is reliable and customizing is serviced, it is achieved thereby that improving the concurrently visit of service server cluster The technique effect of the amount of asking, and then solve because continuous a large amount of requests cause the technology of service server performance continuous decrease to ask Topic.
Brief description of the drawings
Accompanying drawing described herein is used for providing a further understanding of the present invention, constitutes the part of the application, this hair Bright schematic description and description does not constitute inappropriate limitation of the present invention for explaining the present invention.In the accompanying drawings:
Fig. 1 is a kind of method flow diagram of acquisition business server information according to embodiments of the present invention;
Fig. 2 is the method flow diagram of domain name mapping under a kind of optional normal scene according to embodiments of the present invention;
Fig. 3 is the too high method flow diagram of a kind of optional processing business server load according to embodiments of the present invention;
Fig. 4 is the method flow diagram of a kind of optional acquisition business server information according to embodiments of the present invention;
Fig. 5 is the method flow diagram of a kind of optional acquisition business server information according to embodiments of the present invention;
Fig. 6 is the method flow diagram of a kind of optional service server failure according to embodiments of the present invention;
Fig. 7 is the method flow diagram of a kind of optional acquisition business server information according to embodiments of the present invention;
Fig. 8 is the method flow diagram of a kind of optional acquisition business server information according to embodiments of the present invention;And
Fig. 9 is the schematic device of a kind of optional acquisition business server information according to embodiments of the present invention.
Specific embodiment
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the embodiment of the present invention Accompanying drawing, is clearly and completely described to the technical scheme in the embodiment of the present invention, it is clear that described embodiment is only The embodiment of a part of the invention, rather than whole embodiments.Based on the embodiment in the present invention, ordinary skill people The every other embodiment that member is obtained under the premise of creative work is not made, should all belong to the model of present invention protection Enclose.
It should be noted that term " first ", " in description and claims of this specification and above-mentioned accompanying drawing Two " it is etc. for distinguishing similar object, without for describing specific order or precedence.It should be appreciated that so using Data can exchange in the appropriate case, so as to embodiments of the invention described herein can with except illustrating herein or Order beyond those of description is implemented.Additionally, term " comprising " and " having " and their any deformation, it is intended that cover Lid is non-exclusive to be included, for example, the process, method, system, product or the equipment that contain series of steps or unit are not necessarily limited to Those steps or unit clearly listed, but may include not list clearly or for these processes, method, product Or other intrinsic steps of equipment or unit.
Embodiment 1
According to embodiments of the present invention, there is provided a kind of real-time embodiment of the method for obtaining business server information is, it is necessary to say It is bright, can be held in the such as one group computer system of computer executable instructions the step of the flow of accompanying drawing is illustrated OK, and, although show logical order in flow charts, but in some cases, can be with different from order herein Perform shown or described step.
Fig. 1 is the method for a kind of real-time acquisition business server information according to embodiments of the present invention, as shown in figure 1, should Method comprises the following steps:
Step S102, name server sends query statement to LIST SERVER, wherein, registered with LIST SERVER to A few service server.
Specifically, in above-mentioned steps, name server can be that finger is to carry out domain name and corresponding IP address The server of conversion;LIST SERVER can be the server for registering service server and name server;Service server is File-sharing and managed operation, data backup memory and the integrated server of business procedure can be carried out;Above-mentioned query statement Including request time, requesting node address, requested service server number.
In a kind of optional embodiment, name server A sends the instruction of query directory server B, wherein, inquiry refers to Order includes:Request time is on December 25th, 2016, requested service server number is 1, and nslookup is name server A Configured domain name;Meanwhile, name server A subscribes to corresponding domain name node.
By above-mentioned steps S102, LIST SERVER can realize name server according to the subscription information of name server The purpose of real-time informing LIST SERVER state change.
Step S104, name server receives address and the status information of the service server that LIST SERVER is returned;
Specifically, in above-mentioned steps, name server receives LIST SERVER and returns to whole service server IP ground Location and status information;Wherein, the processor utilization rate of status information including service server, internal memory free space, disk can With space and the communications status of network interface.
In a kind of optional embodiment, domain names of the LIST SERVER B in query statement, under returns to field name node The address of all service servers and status information, including:Service server 1 and service server 2 and service server 3, its In, the IP address information 192.168.1.2 of service server 1, the processor utilization rate of service server 1 can for 10%, it is interior Free space is deposited for 300MB, disk free space can be able to be the free time for the communications status of 500MB and network interface;Business The IP address information 192.168.1.3 of server 2, the processor utilization rate of service server 2 can use sky for 5%, internal memory Between for the communications status that 200MB, disk free space can be 200MB and network interface can be the free time;Service server 3 IP address information 192.168.1.4, service server 3 processor utilization rate can for 9%, internal memory free space be 250B, Disk free space can be able to be space for the communications status of 400MB and network interface.
By step S104 can realize name server receive LIST SERVER return service server address and The purpose of status information.
Step S106, name server meets the service server state letter of predetermined condition according to configuration predetermined condition filtering Breath.
Specifically, in above-mentioned steps, name server meets processor utilization rate according to configuration predetermined condition filtering is It is no more than or equal to predetermined efficiency value;Whether internal memory free space is more than or equal to the first predetermined space value;Whether disk free space More than or equal to the second predetermined space value;The communications status of network interface whether be idle condition service server status information;
In a kind of optional embodiment, processor utilization rate is by name server A more than or equal to predetermined efficiency value 10%th, it is predetermined empty that internal memory free space is 200MB more than or equal to the first predetermined space value, disk free space is more than or equal to second Between value be the communications status of 200MB, network interface for the service server status information of service server of idle condition is carried out Filtering.
Can realize that name server filters the business for meeting predetermined condition according to configuration predetermined condition by step S106 The purpose of server state information.
The address information of the service server after filtering is returned to client terminal by step S108, name server.
Specifically, in above-mentioned steps, the address information of the service server after filtering is returned to visitor by name server Family terminal.
In a kind of optional embodiment, name server A by the address information 192.168.1.3 of service server 2 and The address information of the address information 192.168.1.4 of service server 3 returns to client terminal.
Above-mentioned steps S102 of the present invention in the scheme disclosed in step S108, in embodiments of the present invention, using domain name Server sends the mode of query statement to LIST SERVER, and the business clothes that LIST SERVER is returned are received by name server The address of business device and status information, name server meet the service server shape of predetermined condition according to configuration predetermined condition filtering The address information of the service server after filtering is returned to client terminal by state information, name server, has reached domain name service Device can provide load balancing dns resolution service that is reliable and customizing with real-time perception service server state and more new record Purpose, it is achieved thereby that improving the technique effect of the concurrent visit capacity of service server cluster, and then solve due to continuous A large amount of requests cause the technical problem of service server performance continuous decrease.
The embodiment of a kind of real-time acquisition business server information with reference to shown in Fig. 2 is come to domain name mapping under normal scene Scheme is described in detail as follows:
Step S202, service server starts, and log-on message is registered to/server/www.qunar.com/ itself ip ground Under the path of location, wherein, log-on message also includes service server status information.
Specifically, service server 1 is registered to/server/www.qunar.com/192.168.1.2 paths;Business takes Business device 2 be registered to/server/www.qunar.com/192.168.1.3 paths under;Service server 3 is registered to/server/ Www.qunar.com/192.168.1.4 paths.
Step S204, client sends parsing address instruction to name server, and name server receives analysis request Query statement is sent after instruction to LIST SERVER, LIST SERVER is to name server return/server/ The log-on message of all service servers under www.qunar.com/ nodes.
Specifically, client sends the instruction of parsing www.qunar.com addresses to name server, name server connects Query statement is sent to LIST SERVER after receiving analysis request instruction, and LIST SERVER is to name server return/server/ The log-on message of service server 1, service server 2 and service server 3 under www.qunar.com/ nodes, wherein, registration Information includes:The IP address information of service server, the processor utilization rate of service server, internal memory free space, disk can With space and the communications status of network interface.
Step S206, name server returns to the log-on message of service server, and calculates pre-conditioned, calculates Result is the corresponding IP address of www.qunar.com.
Specifically, whether pre-conditioned can will meet processor utilization rate more than or equal to predetermined effect including name server Rate value;Whether internal memory free space is more than or equal to the first predetermined space value;Whether disk free space makes a reservation for more than or equal to second Spatial value;Whether the communications status of network interface are idle condition.
Result of calculation is returned step S208, name server the IP address 192.168.1.3 and business of service server 2 The IP address 192.168.1.4 of server 3 is to client.
The purpose of domain name mapping can be realized under conventional scenario by above-mentioned steps S202 to step S208.
In a kind of optional embodiment, the status information of service server, including:The processor of service server is used The communications status of rate, internal memory free space, disk free space and network interface.
Specifically, processor utilization rate can refer to that service server CPU can refer to using operational efficiency, internal memory free space Service server internal memory free space, disk free space can refer to service server disk slack space.
In a kind of optional embodiment, name server meets the business of predetermined condition according to configuration predetermined condition filtering Server state information, including:Whether processor utilization rate is more than or equal to predetermined efficiency value;Internal memory free space whether more than etc. In the first predetermined space value;Whether disk free space is more than or equal to the second predetermined space value;The communications status of network interface are No is idle condition, wherein, predetermined efficiency value is processor utilization rate average value in all service servers;First predetermined space It is internal memory free space average value in service server to be worth;Second predetermined space value be service server in disk slack space put down Average.
Specifically, under the first scene, predetermined condition is whether processor utilization rate is more than or equal to predetermined efficiency value; Under second scene, predetermined condition is whether internal memory free space is more than or equal to the first predetermined space value;Under the third scene, Predetermined condition is whether disk free space is more than or equal to the second predetermined space value;Under the 4th kind of scene, predetermined condition is net Whether the communications status of network interface are idle condition.
Herein it should be noted that under the first scene, whether predetermined condition is processor utilization rate more than or equal to pre- Determine efficiency value 3%;In a second possible scenario, whether predetermined condition is the free space of internal memory more than or equal to the first predetermined space value 200MB;Under the third scene, whether predetermined condition is more than or equal to the second predetermined space value 200MB for the free space of disk; Under the 4th kind of scene, whether predetermined condition is idle condition for the communications status of network interface.
Can realize that name server is filtered according to configuration predetermined condition by above-described embodiment step and meet predetermined condition Service server status information purpose.
The embodiment of a kind of real-time acquisition business server information with reference to shown in Fig. 3 is come to service server load too high Scheme is described in detail as follows:
Step S302, user A send parsing www.qunar.com and instruct to name server, and name server returns to industry The IP address 192.168.1.2 of business server 1 is to client;
Step S304, the request amount of service server 1 is excessive, and cpu load is raised;LIST SERVER more new business services 1 Information simultaneously notifies that name server pulls the up-to-date information of currently available service server from LIST SERVER;
Step S306, name server according to the mapping relations of the local domain name of predefined logical renewal, when user B is to domain Name server sends parsing www.qunar.com instructions again, and name server returns to the service server 2 for meeting predetermined condition IP address 192.168.1.3 give user B.
By above-mentioned steps S302 to step S306 service server load too high can be realized the business of upstate Server returns to the purpose of user.
In a kind of optional embodiment, predetermined efficiency value is the average of processor utilization rate in all service servers Value;First predetermined space value is the average value of internal memory free space in service server;Second predetermined space value is business service The average value of disk free space in device.
Can realize that name server is filtered according to configuration predetermined condition by above-described embodiment step and meet predetermined condition Service server status information purpose.
In a kind of optional embodiment, as shown in figure 4, name server send query statement to LIST SERVER it Before, method also includes:
Step S402, starts at least one service server;
Step S404, at least one service server creates agreement node on LIST SERVER;Wherein, agreement node is Refer to the business memory space that service server is created under LIST SERVER;The domain-name information one of agreement node and service server One correspondence;
Step S406, service server preserves Self address and status information to arranging node.
Specifically, service server is in the specific form for Making Path of LIST SERVER:Name server configuration The status information of domain name a/ service servers IP address+service server, the agreement node of storage refers to/name server configuration The service server of domain name a, all service same domain name a all preserve Self address and status information under/domain name a nodes, The mapping relations of service server Self address and status information are preserved in business memory space, wherein, mapping relations refer to The domain name of name server configuration preserves the relation of node domain name a with LIST SERVER.
Herein it should be noted that the domain name that name server is responsible for parsing is /server/www.qunar.com/, industry The node that business server is created on LIST SERVER is also/domain name a/server/www.qunar.com/;It is same for serving The service server of one domain name, it is necessary to be registered under LIST SERVER corresponding domain name node, such as:Service server 1 is registered to/ Under server/www.qunar.com/192.168.1.2 node paths, service server state is available;The note of service server 2 To under/server/www.qunar.com/192.168.1.3 node paths, service server state is available to volume;Business service Device 3 is registered to/server/www.qunar.com/192.168.1.4 node paths under.
Can realize that service server creates agreement node, business clothes on LIST SERVER by above-described embodiment step Business device preserves Self address and status information to the purpose for arranging node.
In a kind of optional embodiment, after establishment agreement node on LIST SERVER, method is also for service server Including:Name server accesses LIST SERVER, and subscribes to agreement node, wherein, agreement node is used to receive service server The announcement information of state change.
Herein it should be noted that name server A accesses LIST SERVER B by query statement, and subscribe to agreement section Point/server/www.qunar.com/;Name server obtains service server 1, the and of service server 2 under agreement node The node of service server 3 is respectively/server/www.qunar.com/192.168.1.2 ,/server/ Www.qunar.com/192.168.1.3 and/server/www.qunar.com/192.168.1.4.
Can realize that name server accesses LIST SERVER and subscribes to the purpose of agreement node by above-mentioned steps.
In a kind of optional embodiment, as shown in figure 5, the service server of predetermined condition will be met in name server Address information return to client terminal after, method also includes:
Step S502, in the case where the service server for meeting predetermined condition breaks down, LIST SERVER is perceived Service server failure and he deletes agreement node under service server status information;
Step S504, LIST SERVER notifies that name server, name server pull the currently available industry of LIST SERVER The latest state information of business server.
If specifically, service server break down can under deletion of node service server status information so that mesh Record server and obtain the malfunction of service server in real time, and be resolved to other and can use and meet pre-conditioned business service The status information of device;LIST SERVER notifies after name server that name server repeats to collect LIST SERVER and currently may be used With the latest state information of service server.
If herein it should be noted that service server 1 breaks down, after LIST SERVER receives failure notification message The node that service server 1 is deleted in business memory space is /server/www.qunar.com/192.168.1.2, so that LIST SERVER gets the malfunction of service server 1 and parses other states for upstate and meet default bar in real time The status information of part service server.
In the case of can realizing that service server breaks down by above-described embodiment step, LIST SERVER is according to event The purpose of the status information of service server under barrier information deletion agreement node.
The embodiment of a kind of real-time acquisition business server information with reference to shown in Fig. 6 is come to service server malfunction approach It is described in detail as follows:
Step S602, service server 1 breaks down, and LIST SERVER detects the connection signal with service server 1 Interrupt, in the server that deltrees under www.qunar.com nodes LIST SERVER 1 log-on message;
Step S604, LIST SERVER notifies that name server takes from catalogue according to the subscription information of www.qunar.com Business device pulls the up-to-date information of the currently available service server of LIST SERVER registration;
Step S606, name server pulls the up-to-date information under www.qunar.com and updates home domain name and business The mapping relations of server address, and the note of the service server for meeting predetermined condition is obtained from currently available service server Volume information;
Step S608, client sends parsing www.qunar.com addresses, and acquisition meets predetermined in returning to service server The ip addresses 192.168.1.3 of the service server 2 of condition is to client.
When can realize that service server breaks down by above-mentioned steps S602 to step S608, name server passes through The service server that LIST SERVER will meet condition is sent to the purpose of client.
In a kind of optional embodiment, as shown in fig. 7, name server send query statement to LIST SERVER it Before, method also includes:
Step S702, starts name server;
Step S704, name server subscribes to the corresponding agreement node of domain name to LIST SERVER.
Specifically, name server subscribes to agreement node to LIST SERVER, agreement node is used to receive service server The announcement information of state change.
Can realize that name server subscribes to the corresponding agreement section of domain name to LIST SERVER by above-described embodiment step The purpose of point.
Understood based on the scheme that above-described embodiment is provided, service server performance is caused for due to continuous a large amount of requests The technical problem of continuous decrease, the optional or preferred embodiment that the present invention is provided can be realized improving service server cluster The technique effect of concurrent visit capacity.Thus, the embodiment of a kind of real-time acquisition business server information with reference to shown in Fig. 8 comes right Achievable scheme of the invention is described in detail as follows:
Step S802, service server starts, in LIST SERVER register node.
Specifically, the IP address of service server I is that 192.168.1.2, the IP address of service server II are 192.168.1.3, the node that service server I is registered on LIST SERVER is /server/www.qunar.com/ 192.168.1.2, the node that service server II is registered on LIST SERVER is /server/www.qunar.com/ 192.168.1.3, name server subscription/server/www.qunar.com nodes, so as to obtain in real time service available Service server is 192.168.1.2 and 192.168.1.3.
Step S804, if service server I breaks down, LIST SERVER deletes the node of service server I registrations.
Specifically, LIST SERVER keeps communicating with service server I by heart-beat protocol, confirm service server I's Whether state can use;Service server I sends failure notification to LIST SERVER, and LIST SERVER deletes service server I notes The node of volume, so that name server obtains current business server state and makes in real time parses other available service services Device IP address.
Step S806, service server can write oneself state data simultaneously in LIST SERVER register node.
Specifically, oneself state data have service server state, service server CPU idleness, in service server The free space and service server network I/O speed deposited, so that for name server can parse more data;For example, domain Name server parses following data, and the analysis service of corresponding personalization is carried out according to these data;
/server/www.qunar.com/192.168.1.3Cpuload=40&memory=50&netio=20, its In, the CPU idleness of name server parsing service server II is 40%, and the free space of internal memory is 50MB, network I/O speed It is 20bps to spend.
Embodiment 2
According to embodiments of the present invention, a kind of real-time device embodiment for obtaining business server information is additionally provided.This hair The method of the real-time acquisition business server information in bright embodiment 1 can be performed in the device of the embodiment of the present invention 2.
Fig. 9 is the structural representation of the device of a kind of real-time acquisition business server information according to embodiments of the present invention, The device includes:Send module 90, receiver module 92, filtering module 94 and return to module 96.
Wherein, module is sent, query statement to LIST SERVER is sent for name server, wherein, LIST SERVER In register with least one service server;Receiver module, the business clothes that LIST SERVER is returned are received for name server The address of business device and status information;Filtering module, predetermined condition is met for name server according to configuration predetermined condition filtering Service server status information;Module is returned, the address information of the service server after filtering is returned for name server Back to client terminal.
In scheme disclosed in the above embodiment of the present invention, query statement to LIST SERVER is sent using module 90 is sent Mode, by receiver module 92 receive LIST SERVER return service server address and status information, filtering module 94 filterings meet the service server status information of predetermined condition, return to the address information of the service server after module 96 is filtered Client terminal is returned to, having reached name server can be with real-time perception service server state and more new record, there is provided reliable The purpose serviced with the load balancing dns resolution for customizing, it is achieved thereby that improving the concurrent visit capacity of service server cluster Technique effect, and then solve the technical problems that service server performance continuous decrease is caused due to continuous a large amount of request.
Optionally, receiver module 92 includes:The status information of service server includes:The processor of service server is used The communications status of rate, internal memory free space, disk free space and network interface.
Optionally, filtering module 94, including:First judge module, for processor utilization rate whether more than or equal to predetermined Efficiency value;Whether the second judge module, the first predetermined space value is more than or equal to for internal memory free space;3rd judge module, Whether it is more than or equal to the second predetermined space value for disk free space;4th judge module, for the communication shape of network interface Whether state is idle condition.
Optionally, sending module 90 also includes:First starting module, for starting at least one service server;Create Module, agreement node is created for service server on LIST SERVER;Wherein, agreement node refers to service server in mesh The business memory space created under record server, agreement node is corresponded with the domain-name information of service server;Preserving module, The agreement node of Self address and status information into is preserved for service server.
Optionally, creation module also includes:Access modules, access LIST SERVER, and subscribe to about for name server Determine node, wherein, agreement node is used to receive the announcement information of service server state change.
Optionally, returning to module 96 also includes:Sensing module, for there is event in the service server for meeting predetermined condition In the case of barrier, LIST SERVER perceives service server failure and deletes the state letter of service server under agreement node Breath;Module is pulled, name server is notified for LIST SERVER, name server pulls the current of LIST SERVER registration can With the up-to-date information of service server.
Optionally, sending module 90 also includes:Second starting module, for starting name server;Subscribing module, is used for Name server subscribes to the corresponding agreement node of domain name to LIST SERVER.
The embodiments of the present invention are for illustration only, and the quality of embodiment is not represented.
In the above embodiment of the present invention, the description to each embodiment all emphasizes particularly on different fields, and does not have in certain embodiment The part of detailed description, may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed technology contents, can be by other Mode is realized.Wherein, device embodiment described above is only schematical, such as division of described unit, Ke Yiwei A kind of division of logic function, can there is other dividing mode when actually realizing, such as multiple units or component can combine or Person is desirably integrated into another system, or some features can be ignored, or does not perform.Another, shown or discussed is mutual Between coupling or direct-coupling or communication connection can be the INDIRECT COUPLING or communication link of unit or module by some interfaces Connect, can be electrical or other forms.
The unit that is illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit The part for showing can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On unit.Some or all of unit therein can be according to the actual needs selected to realize the purpose of this embodiment scheme.
In addition, during each functional unit in each embodiment of the invention can be integrated in a processing unit, it is also possible to It is that unit is individually physically present, it is also possible to which two or more units are integrated in a unit.Above-mentioned integrated list Unit can both be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If the integrated unit is to realize in the form of SFU software functional unit and as independent production marketing or use When, can store in a computer read/write memory medium.Based on such understanding, technical scheme is substantially The part for being contributed to prior art in other words or all or part of the technical scheme can be in the form of software products Embody, the computer software product is stored in a storage medium, including some instructions are used to so that a computer Equipment (can be personal computer, server or network equipment etc.) perform each embodiment methods described of the invention whole or Part steps.And foregoing storage medium includes:USB flash disk, read-only storage (ROM, Read-Only Memory), arbitrary access are deposited Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic disc or CD etc. are various can be with store program codes Medium.
The above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should It is considered as protection scope of the present invention.

Claims (14)

1. it is a kind of it is real-time obtain business server information method, it is characterised in that including:
Name server sends query statement to LIST SERVER, wherein, at least one industry is registered with the LIST SERVER Business server;
Domain name server receives address and the status information of the service server that the LIST SERVER is returned;
Domain name server meets the service server status information of predetermined condition according to configuration predetermined condition filtering;
Domain name server by the filtering after the address information of the service server return to client terminal.
2. method according to claim 1, it is characterised in that the status information of the service server, including:Business takes It is engaged in the communications status of the processor utilization rate of device, internal memory free space, disk free space and network interface.
3. method according to claim 1, it is characterised in that domain name server is full according to configuration predetermined condition filtering The service server status information of sufficient predetermined condition, including:
Whether processor utilization rate is more than or equal to predetermined efficiency value;Whether internal memory free space is more than or equal to the first predetermined space Value;Whether disk free space is more than or equal to the second predetermined space value;Whether the communications status of network interface are idle condition.
4. method according to claim 1, it is characterised in that send query statement to the mesh in domain name server Before record server, methods described also includes:
Start service server described at least one;
The service server creates agreement node on the LIST SERVER;Wherein, the agreement node refers to business clothes The business memory space that business device is created under the LIST SERVER, the agreement node is believed with the domain name of the service server Breath is corresponded;
The service server is preserved under Self address and status information to the agreement node.
5. method according to claim 4, it is characterised in that created on the LIST SERVER in the service server Build after the agreement node, methods described also includes:
LIST SERVER described in domain name server access, and the agreement node is subscribed to, wherein, the agreement node is used for Receive the announcement information of service server state change.
6. method according to claim 4, it is characterised in that meet predetermined condition by described in domain name server The address information of service server is returned to after client terminal, and methods described also includes:
In the case where the service server for meeting predetermined condition breaks down, the LIST SERVER perceives the industry Business server failure;
The LIST SERVER deletes the status information of the service server under the agreement node according to fault message;
The LIST SERVER notifies name server, the currently available business of LIST SERVER described in domain name server pull The up-to-date information of server.
7. method as claimed in any of claims 1 to 6, it is characterised in that sent in domain name server and looked into Before asking instruction to LIST SERVER, methods described also includes:
Start domain name server;
Domain name server subscribes to the corresponding agreement node of domain name to LIST SERVER.
8. it is a kind of it is real-time obtain business server information device, it is characterised in that including:
Module is sent, query statement to LIST SERVER is sent for name server, wherein, registered in the LIST SERVER There is at least one service server;
Receiver module, for domain name server receive the service server that the LIST SERVER is returned address and Status information;
Filtering module, the business service of predetermined condition is met for domain name server according to configuration predetermined condition filtering Device status information;
Return to module, for domain name server by the filtering after the address information of the service server return to visitor Family terminal.
9. device according to claim 8, it is characterised in that the receiver module includes:The shape of the service server State information includes:The communication of the processor utilization rate of service server, internal memory free space, disk free space and network interface State.
10. device according to claim 8, it is characterised in that the filtering module, including:
Whether the first judge module, predetermined efficiency value is more than or equal to for processor utilization rate;
Whether the second judge module, the first predetermined space value is more than or equal to for internal memory free space;
Whether the 3rd judge module, the second predetermined space value is more than or equal to for disk free space;
4th judge module, whether the communications status for network interface are idle condition.
11. devices according to claim 8, it is characterised in that the module that sends also includes:
First starting module, for starting service server described at least one;
Creation module, agreement node is created for the service server on the LIST SERVER;Wherein, the agreement section Point refers to the business memory space that service server is created under the LIST SERVER, and the agreement node takes with the business The domain-name information of business device is corresponded;
Preserving module, Self address and status information to the agreement node are preserved for the service server.
12. devices according to claim 11, it is characterised in that the creation module also includes:
Access modules, for LIST SERVER described in domain name server access, and subscribe to the agreement node, wherein, institute Stating agreement node is used to receive the announcement information of service server state change.
13. devices according to claim 11, it is characterised in that the return module also includes:
Sensing module, in the case of being broken down in the service server for meeting predetermined condition, the directory service Device perceives service server failure and deletes the status information of the service server under the agreement node;
Module is pulled, name server, directory service described in domain name server pull are notified for the LIST SERVER The up-to-date information of the currently available service server of device registration.
14. device according to any one in claim 8 to 13, it is characterised in that described to send module and also include:
Second starting module, for starting domain name server;
Subscribing module, the corresponding agreement node of domain name is subscribed to for domain name server to LIST SERVER.
CN201710086789.0A 2017-02-17 2017-02-17 Method and device for acquiring service server information in real time Active CN106713503B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710086789.0A CN106713503B (en) 2017-02-17 2017-02-17 Method and device for acquiring service server information in real time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710086789.0A CN106713503B (en) 2017-02-17 2017-02-17 Method and device for acquiring service server information in real time

Publications (2)

Publication Number Publication Date
CN106713503A true CN106713503A (en) 2017-05-24
CN106713503B CN106713503B (en) 2020-05-12

Family

ID=58911846

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710086789.0A Active CN106713503B (en) 2017-02-17 2017-02-17 Method and device for acquiring service server information in real time

Country Status (1)

Country Link
CN (1) CN106713503B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109391678A (en) * 2017-08-04 2019-02-26 慧与发展有限责任合伙企业 Filter the response to discovery request
CN109451090A (en) * 2018-11-13 2019-03-08 郑州云海信息技术有限公司 A kind of domain name analytic method and device
CN112689027A (en) * 2020-12-11 2021-04-20 北京北信源软件股份有限公司 Addressing method and device for accessing dynamic address server by APP user

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030078937A1 (en) * 2001-05-29 2003-04-24 David Boreham Method and system for nesting roles in a directory system
US7188094B2 (en) * 2002-07-08 2007-03-06 Sun Microsystems, Inc. Indexing virtual attributes in a directory server system
CN102045411A (en) * 2009-10-13 2011-05-04 中国移动通信集团公司 Method, server and system for domain name resolution
CN105323290A (en) * 2014-08-04 2016-02-10 中国移动通信集团公司 Content scheduling method and device based on user flow distribution feature
CN105721552A (en) * 2016-01-22 2016-06-29 深圳市瑞驰信息技术有限公司 Method for implementing dynamic load balancing based on domain name system (DNS) and DNS

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030078937A1 (en) * 2001-05-29 2003-04-24 David Boreham Method and system for nesting roles in a directory system
US7188094B2 (en) * 2002-07-08 2007-03-06 Sun Microsystems, Inc. Indexing virtual attributes in a directory server system
CN102045411A (en) * 2009-10-13 2011-05-04 中国移动通信集团公司 Method, server and system for domain name resolution
CN105323290A (en) * 2014-08-04 2016-02-10 中国移动通信集团公司 Content scheduling method and device based on user flow distribution feature
CN105721552A (en) * 2016-01-22 2016-06-29 深圳市瑞驰信息技术有限公司 Method for implementing dynamic load balancing based on domain name system (DNS) and DNS

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109391678A (en) * 2017-08-04 2019-02-26 慧与发展有限责任合伙企业 Filter the response to discovery request
CN109451090A (en) * 2018-11-13 2019-03-08 郑州云海信息技术有限公司 A kind of domain name analytic method and device
CN109451090B (en) * 2018-11-13 2021-08-10 郑州云海信息技术有限公司 Domain name resolution method and device
CN112689027A (en) * 2020-12-11 2021-04-20 北京北信源软件股份有限公司 Addressing method and device for accessing dynamic address server by APP user

Also Published As

Publication number Publication date
CN106713503B (en) 2020-05-12

Similar Documents

Publication Publication Date Title
CN106210147B (en) Load balancing method and device based on polling
CN106534328B (en) Node connection method and distributed computing system
CN100407627C (en) Method and system for realizing end-to-end data sharing
CN102523111B (en) Support the network management system of customizable group
CN101442566A (en) Method and apparatus for implementing dynamic domain name update
KR100649108B1 (en) Contents management apparatus and contents management method
CN106713503A (en) Method and device for acquiring information of business server in real time
CN107317830A (en) A kind of processing method and processing device of service discovery
CN111327668B (en) Network management method, device, equipment and storage medium
CN101860493A (en) Method, server and system for distributing application server address for clients
US20060168060A1 (en) Instant message filtering method
CN101364952A (en) Transaction subscribing method, filtering rule configuring method and related equipment
CN109474710B (en) Method and device for acquiring information
CN106897421B (en) Memory database read and write abruption system and method based on sentry's mode
CN102340421B (en) Gateway management method, address allocation method, device and system
CN112671554A (en) Node fault processing method and related device
CN107707689A (en) A kind of DHCP message processing method, Dynamic Host Configuration Protocol server and gateway device
CN103607333A (en) Local area network port proxy method for port proxy server
CN104714923B (en) A kind of method and apparatus for realizing collaborative share
CN104284297B (en) A kind of method, apparatus of resource migration
CN116112569B (en) Micro-service scheduling method and management system
US10194002B2 (en) VBN server clustering system, method of VBN server clustering, and VBN server for clustering
CN103188323B (en) The system and method for Web service is provided based on subscriber's main station buffer memory device
CN114615321A (en) Traffic processing method and device
CN107395766A (en) Decentralization communication system and implementation method based on HazelCast

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant