CN102932485B - The querying method of server connection state and device - Google Patents

The querying method of server connection state and device Download PDF

Info

Publication number
CN102932485B
CN102932485B CN201210473648.1A CN201210473648A CN102932485B CN 102932485 B CN102932485 B CN 102932485B CN 201210473648 A CN201210473648 A CN 201210473648A CN 102932485 B CN102932485 B CN 102932485B
Authority
CN
China
Prior art keywords
server
connection
information node
list item
newly
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
CN201210473648.1A
Other languages
Chinese (zh)
Other versions
CN102932485A (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.)
WUXI CITY CLOUD COMPUTER CENTER CO Ltd
Original Assignee
WUXI CITY CLOUD COMPUTER CENTER 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 WUXI CITY CLOUD COMPUTER CENTER CO Ltd filed Critical WUXI CITY CLOUD COMPUTER CENTER CO Ltd
Priority to CN201210473648.1A priority Critical patent/CN102932485B/en
Publication of CN102932485A publication Critical patent/CN102932485A/en
Application granted granted Critical
Publication of CN102932485B publication Critical patent/CN102932485B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses a kind of querying method and device of server connection state, comprising: receive Connection inquiring request, determine the server identification in described inquiry request; Corresponding information node is searched according to described server identification, and the connection corresponding according to the described information node determination server found, wherein, this server corresponds to described server identification, further, described information node is for representing described server and the described corresponding relation be connected.In addition, by the function of each configuration module of the present invention, corresponding connection can be inquired exactly on the server, and when connection closed, the connection list item and corresponding information node that need to close can be deleted, save storage resources, improve search efficiency, strengthen manageability when application delivery equipment is safeguarded a large amount of server connection state.

Description

The querying method of server connection state and device
Technical field
The present invention relates to computer realm, particularly, relate to a kind of querying method and device of server connection state.
Background technology
The numerous network service of the Internet bank, online working, network inquiry, shopping online etc. has become a part inseparable in people's life day by day, these internet, applications bring very big help all to the live and work of people, and for the data center providing these to apply, increasing rapidly of the incident user's of being flowing of access and number of servers, so data center needs load-balancing device to be reasonably allocated on every station server by flowing of access, ensure the operational efficiency of whole data center.
Along with general data center is constantly towards the future development of cloud computation data center, in large-scale cloud computing environment, userbase is also in continuous expansion, and user also has higher requirement to application service, comprises requirement access speed, higher access security and stability etc. faster.
But the load-balancing function of current network layer can not meet the needs that higher level application service provides, and is therefore added among load-balancing device gradually to the application layer process of flow, finally defines application delivery equipment.Application delivery equipment can carry out load balancing according to the state of applied business on server to the flow entering cloud computation data center, thus improves the performance of cloud computing center applied business.
If need the application layer data of application delivery device for flow amount to process, just need the connection status of the network traffics safeguarding each application of each user and data center in a device, a large number of users is being provided to the data center of service, application delivery equipment safeguards the connection status of nearly millions of even several ten million bars possibly.
Under normal circumstances, when application delivery plant maintenance connection status, can set up a session table, each connects as a list item, for preserve flow in this connection transmission state, belong to which kind of application type, need to distribute to the information such as any station server.
In the cloud computing environment of complexity, need to carry out comprehensive monitoring management to all devices of cloud computation data center, when the running status of application delivery equipment is managed, because cloud computation data center not only comprises physical server, also comprise a large amount of virtual servers, and the establishment of virtual server, destruction, state switch very flexible, so there is the demand to connection status and virtual server inquiry, such as, inquire about certain assignment of traffic connected and give any station server, or inquire about the flow certain station server being assigned with which connection.But the session table in general application delivery equipment, can only realizing the unidirectional inquiry from being connected to server, can only find certain connection and being allocated to which station server, and can not inquire about and every station server is assigned with which and connects, it is convenient not to manage.
Scheme for Connection inquiring in correlation technique cannot bidirectional inquiry and then cause the problem being not easy to management equipment, not yet proposes effective solution at present.
Summary of the invention
Scheme for Connection inquiring in correlation technique cannot bidirectional inquiry and then cause the problem being not easy to management equipment, the present invention proposes a kind of querying method and device of server connection state, can according to Connection inquiring request determination server identification again according to the connection that the information node of its correspondence finds server corresponding, achieve and can, from connection corresponding to server lookup, be convenient to manage the running status of application delivery equipment.
Technical scheme of the present invention is achieved in that
According to an aspect of the present invention, a kind of querying method of server connection state is provided.
The querying method of this server connection state comprises:
Receive Connection inquiring request, determine the server identification in inquiry request;
Corresponding information node is searched according to server identification, and the connection corresponding according to the information node determination server found, wherein, this server corresponds to server identification, and information node is for representing server and the corresponding relation be connected.
Wherein, search corresponding information node according to server identification to comprise:
In server table, search the server that server identification is corresponding, and search the information node pointed by pointer corresponding to server.
Further, corresponding according to the information node determination server found connection comprises:
The connection that pointer corresponding to comformed information node is pointed in session table.
In addition, the querying method of this server connection state comprises further:
When receiving new connection request, in session table, increase the connection list item corresponding to newly-built connection;
Structure corresponds to the information node of newly-built connection, and is configured to by the pointer corresponding to this information node point to the list item corresponding to this newly-built connection in session table;
According to the server that this newly-built connection is assigned to, pointer corresponding for this server in server table is configured to point to the information node corresponding to newly-built connecting structure.
In addition, the querying method of this server connection state comprises further:
When receiving connection closed request, in session table, delete the connection list item corresponding to connection needing to close;
Delete the information node corresponding to connection list item that this is deleted.
According to another aspect of the present invention, a kind of inquiry unit of server connection state is provided.
The inquiry unit of this server connection state comprises:
Determination module, for receiving Connection inquiring request, determines the server identification in inquiry request;
Search module, for searching corresponding information node according to server identification, and the connection corresponding according to the information node determination server found, wherein, this server corresponds to server identification, and information node is for representing server and the corresponding relation be connected.
Wherein, search module for searching server corresponding to server identification in server table, and search the information node pointed by pointer corresponding to server.
In addition, module is searched also for connection that the pointer corresponding to comformed information node is pointed in session table.
Further, the inquiry unit of this server connection state comprises further:
First configuration module, for when receiving new connection request, increases the connection list item corresponding to newly-built connection in session table;
Second configuration module, for constructing the information node corresponding to newly-built connection, and is configured to the pointer corresponding to this information node point to the list item corresponding to this newly-built connection in session table;
3rd configuration module, for the server be assigned to according to this newly-built connection, is configured to pointer corresponding for this server in server table point to the information node corresponding to newly-built connecting structure.
In addition, the inquiry unit of this server connection state comprises further:
First removing module, for when receiving connection closed request, deletes the connection list item corresponding to connection needing to close in session table;
Second removing module, for deleting the information node corresponding to this deleted connection list item.
The present invention is by configuration information node and represent server and the corresponding relation be connected by information node, the bidirectional inquiry of corresponding relation between can effectively realizing server and be connected, the server belonging to each connection can not only be inquired about, the connection that each server has can also be inquired, be convenient to manage the running status of application delivery equipment.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the flow chart of the querying method of server connection state according to the embodiment of the present invention;
Fig. 2 is the block diagram of the inquiry unit of server connection state according to the embodiment of the present invention;
Fig. 3 is the block diagram of the concrete structure example of the inquiry unit of server connection state according to the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain, all belongs to the scope of protection of the invention.
According to embodiments of the invention, provide a kind of querying method of server connection state.
As shown in Figure 1, the querying method of this server connection state comprises:
Step S101, receives Connection inquiring request, determines the server identification in inquiry request;
Step S103, searches corresponding information node according to server identification, and the connection corresponding according to the information node determination server found, wherein, this server corresponds to server identification, and information node is for representing server and the corresponding relation be connected.
Pass through such scheme, because information node represents server and the corresponding relation be connected, the connection that therefore can not only have according to this server of server lookup, this information node can also be utilized to inquire about server belonging to each connection, the bidirectional inquiry of corresponding relation between realizing server and being connected.
Wherein, search corresponding information node according to server identification to comprise:
In server table, search the server that server identification is corresponding, and search the information node pointed by pointer corresponding to server.
Further, corresponding according to the information node determination server found connection comprises:
The connection that pointer corresponding to comformed information node is pointed in session table.
Alternatively, the mode of searching list item in corresponding information node and connection table above by the mode of pointer is only realize server and a kind of concrete scheme corresponding between connecting.Except the program, can also pass through other various ways (such as, by set expression, by array representation, by modes such as matrix notations) preserve server and be connected between corresponding relation.
In addition, in the solution of the present invention, not only can configure from the pointer of server table directional information node and the pointer from information node sensing session table, information node may be configured with the pointer pointing to list item in server table too, session table is configured with the pointer of directional information node equally, by from the pointer of the list item directional information node in session table and the pointer pointing to list item server table from information node, the server belonging to each connection can be inquired about.
In addition, the querying method of this server connection state comprises further:
When receiving new connection request, in session table, increase the connection list item corresponding to newly-built connection;
Structure corresponds to the information node of newly-built connection, and is configured to by the pointer corresponding to this information node point to the list item corresponding to this newly-built connection in session table;
According to the server that this newly-built connection is assigned to, pointer corresponding for this server in server table is configured to point to the information node corresponding to newly-built connecting structure.
In addition, the querying method of this server connection state comprises further:
When receiving connection closed request, in session table, delete the connection list item corresponding to connection needing to close;
Delete the information node corresponding to connection list item that this is deleted.
According to another embodiment of the present invention, a kind of inquiry unit of server connection state is provided.
As shown in Figure 2, comprise according to the inquiry unit of the server connection state of the embodiment of the present invention:
Determination module 21, for receiving Connection inquiring request, determines the server identification in inquiry request;
Search module 22, for searching corresponding information node according to server identification, and the connection corresponding according to the information node determination server found, wherein, this server corresponds to server identification, and information node is for representing server and the corresponding relation be connected.
Wherein, search module 22 for searching server corresponding to server identification in server table, and search the information node pointed by pointer corresponding to server.
In addition, module 22 is searched also for connection that the pointer corresponding to comformed information node is pointed in session table.
Further, the inquiry unit of this server connection state comprises further:
First configuration module (not shown), for when receiving new connection request, increases the connection list item corresponding to newly-built connection in session table;
Second configuration module (not shown), for constructing the information node corresponding to newly-built connection, and is configured to the pointer corresponding to this information node point to the list item corresponding to this newly-built connection in session table;
3rd configuration module (not shown), for the server be assigned to according to this newly-built connection, is configured to pointer corresponding for this server in server table point to the information node corresponding to newly-built connecting structure.
In addition, the inquiry unit of this server connection state comprises further:
First removing module (not shown), for when receiving connection closed request, deletes the connection list item corresponding to connection needing to close in session table;
Second removing module (not shown), for deleting the information node corresponding to this deleted connection list item.
According to query scheme and the device of server connection state of the present invention, can realize according to the functional module shown in Fig. 3.
The present invention is directed to the demand of the session table bidirectional inquiry of application delivery equipment, devise the connection status maintaining method that one can support a large amount of server (in practice, this server can be virtual/physical server).
The inquiry unit (the application delivery equipment connection state-maintenance module such as, shown in Fig. 3) of server connection state of the present invention can preserve server by means of multiple form and be connected between corresponding relation.
These forms can be made up of three parts:
(1) Part I is session table, comprises and such as connects a, connects b, connects c, connect d and be connected the list items such as e;
(2) Part II is server list, comprises the list item of all servers 0, server 1, server 2 and server 3;
(3) Part III is orthogonal list, is made up of information node, the corresponding each connection list item of this information node and every station server.
When a new connection establishment, the inquiry unit of server connection state of the present invention (namely, connection status maintenance module in Fig. 3) not only in session table, increase a list item, and to should the server list item that distributes of connection table item and this connection, construct an information node, be inserted in orthogonal list.When a connection closed, the inquiry unit of server connection state of the present invention (namely, connection status maintenance module in Fig. 3) from session table, not only delete the list item of this connection, and according to the pointer of orthogonal list, delete the information node of this connection correspondence.The orthogonal list that information node is formed achieves associating of connection state information and server, thus can realize the bidirectional inquiry between connection status and server.
The first configuration module in the inquiry unit of above-mentioned server connection state can be used for the function realizing increasing a list item in Fig. 3 in session table; Second configuration module can construct in the orthogonal list that new information node is inserted in Fig. 3; First removing module and the second removing module to realize when connection closed the list item deleting this connection from session table that in Fig. 3, module realizes, and delete the function of information node of this connection correspondence according to the pointer of orthogonal list.
Can be applied in multiple network equipment according to the inquiry unit of the server connection state of the embodiment of the present invention, such as, can be applied to payment equipment, now, the work disposal process of this device is as follows:
One, after application delivery device start, connect state table and server table, and these two the general Hash table structures that adopt of table, to improve search efficiency, can be distributed according to configuring static or dynamically apply for.
Two, when a new connection establishment, connection status maintenance module increases a list item in session table.
Three, connection status maintenance module constructs an information node, the pointed information node of connection status list item, search in server table and connect corresponding server list item, obtain the information node chained list that this list item points to, information node is inserted the gauge outfit of chained list.
Four, when a connection closed, connection status maintenance module deletes the list item of this connection from session table, deletes before connecting list item and obtains server list item corresponding to this connection list item and information node.
Five, in server table, find the server list item that deleted connection list item is corresponding, from the information node list of server list item pointed, delete the information node that deleted connection list item is corresponding.
Six, during bidirectional inquiry, according to session table, the server that a connection status list item is corresponding can be inquired about.According to server table and orthogonal list, all connection status list items that a station server is corresponding can be inquired about.
Alternatively, when server is less, the organizational form of information node can replace orthogonal list structure with matrix structure, process one newly-built or close connection time, also can correspondingly adjust to some extent the operating sequence of data structure in the present invention.
In sum, by means of technique scheme of the present invention, the present invention is by configuration information node and represent server and the corresponding relation be connected by information node, the bidirectional inquiry of corresponding relation between can effectively realizing server and be connected, the server belonging to each connection can not only be inquired about, can also inquire the connection that each server has, the running status being convenient to application delivery equipment manages.In addition, by the function of each configuration module of the present invention, corresponding connection can be inquired exactly on the server, and when connection closed, the connection list item and corresponding information node that need to close can be deleted, save storage resources, improve search efficiency, strengthen manageability when application delivery equipment is safeguarded a large amount of server connection state.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a querying method for server connection state, is characterized in that, described querying method comprises:
Receive Connection inquiring request, determine the server identification in described inquiry request;
Corresponding information node is searched according to described server identification, and the connection corresponding according to the described information node determination server found, wherein, this server corresponds to described server identification, and, described information node is for representing described server and the described corresponding relation be connected, and wherein, described information node is for forming orthogonal list.
2. querying method according to claim 1, is characterized in that, searches corresponding information node comprise according to described server identification:
In server table, search the described server that described server identification is corresponding, and search the information node pointed by pointer corresponding to described server.
3. querying method according to claim 2, is characterized in that, the connection corresponding according to the described information node determination server found comprises:
Determine the connection of pointer pointed by session table corresponding to described information node.
4. querying method according to claim 3, is characterized in that, comprises further:
When receiving new connection request, in described session table, increase the connection list item corresponding to newly-built connection;
Structure corresponds to the information node of described newly-built connection, and is configured to the pointer corresponding to this information node to point to the list item corresponding to this newly-built connection in described session table;
According to the server that this newly-built connection is assigned to, pointer corresponding for this server in described server table is configured to point to the information node corresponding to described newly-built connecting structure.
5. querying method according to claim 3, is characterized in that, comprises further:
When receiving connection closed request, in described session table, delete the connection list item corresponding to connection needing to close;
Delete the information node corresponding to connection list item that this is deleted.
6. an inquiry unit for server connection state, is characterized in that, described inquiry unit comprises:
Determination module, for receiving Connection inquiring request, determines the server identification in described inquiry request;
Search module, for searching corresponding information node according to described server identification, and the connection corresponding according to the described information node determination server found, wherein, this server corresponds to described server identification, and described information node is for representing described server and the described corresponding relation be connected, wherein, described information node is for forming orthogonal list.
7. inquiry unit according to claim 6, is characterized in that, described in search module for searching described server corresponding to described server identification in server table, and search the information node pointed by pointer corresponding to described server.
8. inquiry unit according to claim 7, is characterized in that, described in search module also for determining the connection that pointer corresponding to described information node is pointed in session table.
9. inquiry unit according to claim 8, is characterized in that, comprises further:
First configuration module, for when receiving new connection request, increases the connection list item corresponding to newly-built connection in described session table;
Second configuration module, for constructing the information node corresponding to described newly-built connection, and is configured to point to the list item corresponding to this newly-built connection in described session table by the pointer corresponding to this information node;
3rd configuration module, for the server be assigned to according to this newly-built connection, is configured to pointer corresponding for this server in described server table point to the information node corresponding to described newly-built connecting structure.
10. inquiry unit according to claim 8, is characterized in that, comprises further:
First removing module, for when receiving connection closed request, deletes the connection list item corresponding to connection needing to close in described session table;
Second removing module, for deleting the information node corresponding to this deleted connection list item.
CN201210473648.1A 2012-11-20 2012-11-20 The querying method of server connection state and device Active CN102932485B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210473648.1A CN102932485B (en) 2012-11-20 2012-11-20 The querying method of server connection state and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210473648.1A CN102932485B (en) 2012-11-20 2012-11-20 The querying method of server connection state and device

Publications (2)

Publication Number Publication Date
CN102932485A CN102932485A (en) 2013-02-13
CN102932485B true CN102932485B (en) 2016-03-30

Family

ID=47647181

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210473648.1A Active CN102932485B (en) 2012-11-20 2012-11-20 The querying method of server connection state and device

Country Status (1)

Country Link
CN (1) CN102932485B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095908B (en) * 2016-06-08 2019-07-05 北京金山安全管理系统技术有限公司 Method and apparatus for association process and connection
CN112333297B (en) * 2017-02-15 2023-03-24 金钱猫科技股份有限公司 Method and system for obtaining terminal attributes in batch
CN112749015B (en) * 2021-01-25 2023-07-25 杭州迪普科技股份有限公司 Load balancing method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047511A (en) * 2006-03-27 2007-10-03 腾讯科技(深圳)有限公司 File transmission method and system
CN102685209A (en) * 2012-04-01 2012-09-19 百度在线网络技术(北京)有限公司 Method, device and facility for assisting user equipment to receive and dispatch instant message

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5918017A (en) * 1996-08-23 1999-06-29 Internatioinal Business Machines Corp. System and method for providing dynamically alterable computer clusters for message routing
EP1744498A1 (en) * 2004-05-06 2007-01-17 Matsushita Electric Industries Co. Ltd. Internet connection terminal apparatus and internet connection status determining method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047511A (en) * 2006-03-27 2007-10-03 腾讯科技(深圳)有限公司 File transmission method and system
CN102685209A (en) * 2012-04-01 2012-09-19 百度在线网络技术(北京)有限公司 Method, device and facility for assisting user equipment to receive and dispatch instant message

Also Published As

Publication number Publication date
CN102932485A (en) 2013-02-13

Similar Documents

Publication Publication Date Title
Mandal et al. Greening the cloud using renewable-energy-aware service migration
CN104050248B (en) A kind of document storage system and storage method
US20170070567A1 (en) Load balancing apparatus and load balancing method
CN108885554A (en) Specific dispersion computer system
CN102710419B (en) User authentication method and device
CN109040212A (en) Equipment access server cluster method, system, equipment and storage medium
CN103078965B (en) The IP address management method of virtual machine
CN103975571A (en) Highly available network filer with automatic load balancing and performance adjustment
Chen et al. Optimization model and algorithm for energy efficient virtual node embedding
CN105045762A (en) Management method and apparatus for configuration file
CN101753405A (en) Cluster server memory management method and system
Agarwal et al. An architecture for elastic resource allocation in fog computing
CN103886104A (en) Distributed real-time database management system and implementation method applicable to electric system
CN102982116A (en) Multi-media transfer method and system based on cloud
CN102447734A (en) Cloud service method for taxation cloud computing network billing IM (Instant Messaging) online customer system
CN103346910A (en) Method and device for managing available mode of servers
CN102932485B (en) The querying method of server connection state and device
CN108563697A (en) A kind of data processing method, device and storage medium
Latif et al. Resource discovery and scalability-aware routing in cloud federation using distributed meta-brokering paradigm
CN108259544A (en) URL querying methods and URL inquiry servers
Zheng et al. Energy-efficient virtual network embedding in networks for cloud computing
CN101141482A (en) Network resource management system and method
Hababeh et al. A method for fragment allocation design in the distributed database systems
CN103731454A (en) Method for responding to requests in point-to-point network and server system
Zhu et al. A hybrid reliable heuristic mapping method based on survivable virtual networks for network virtualization

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant