CN105389371A - Method and system for establishing connection with high availability for database cluster - Google Patents

Method and system for establishing connection with high availability for database cluster Download PDF

Info

Publication number
CN105389371A
CN105389371A CN201510786229.7A CN201510786229A CN105389371A CN 105389371 A CN105389371 A CN 105389371A CN 201510786229 A CN201510786229 A CN 201510786229A CN 105389371 A CN105389371 A CN 105389371A
Authority
CN
China
Prior art keywords
data
address
base cluster
request
database interface
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.)
Pending
Application number
CN201510786229.7A
Other languages
Chinese (zh)
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.)
TIANJIN NANKAI UNIVERSITY GENERAL DATA TECHNOLOGIES Co Ltd
Original Assignee
TIANJIN NANKAI UNIVERSITY GENERAL DATA TECHNOLOGIES Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TIANJIN NANKAI UNIVERSITY GENERAL DATA TECHNOLOGIES Co Ltd filed Critical TIANJIN NANKAI UNIVERSITY GENERAL DATA TECHNOLOGIES Co Ltd
Priority to CN201510786229.7A priority Critical patent/CN105389371A/en
Publication of CN105389371A publication Critical patent/CN105389371A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems

Abstract

The present invention provides a method and a system for establishing a connection with high availability for a database cluster. The method comprises: an application system calls a database interface driver, and initiates a connection establishment request to the database cluster; according to the connection establishment request, the database interface driver acquires an IP address of one cluster node in the database cluster, and initiates the connection establishment request to the IP address; if the connection establishment is successful, the connection establishment between the application system and the database cluster is completed at this time; and if the connection establishment is unsuccessfully, the database interface driver acquires an IP address of another cluster node in the database cluster, and initiates the connection establishment request to the IP address. According to the method and the system for establishing the connection with high availability for the database cluster, which are provided by the present invention, the problem that in the case that a certain cluster node in the database cluster does not provide a service, the application system can still access the cluster by other cluster nodes can be solved, and the high availability of the database cluster is ensured.

Description

A kind of data-base cluster connects the method and system of High Availabitity
Technical field
The present invention relates to the access technique of data-base cluster, particularly relate to a kind of data-base cluster and to connect the method and system of High Availabitity.
Background technology
Along with the fast development of informationization technology, number of users, the data volume of an enterprise all present explosive growth, while portfolio improves, the visit capacity of database and data volume increase fast to database processing power and calculating strength also corresponding increase, and single node database cannot be born at all.Under such background, large-scale distributed data-base cluster creates, so-called data-base cluster, refer to and utilize two or multiple stage database service, form a virtual centralized database logical image, as single database, provide transparent data, services to client.
At present, there is the data-base cluster framework of two kinds of main flows, the band aggregated structure of Centroid and the MPP framework not with Centroid.With the aggregated structure of Centroid, all application systems from Centroid access data storehouse cluster, and obtain the service that data-base cluster provides; MPP framework not with Centroid, each clustered node all can provide access service, and application system can from Arbitrary Sets group node access data storehouse cluster, and obtains consistent with storehouse cluster service.For the data-base cluster of the MPP framework not with Centroid, although application system can from Arbitrary Sets group node access data storehouse cluster, but when application system connects with certain clustered node based on existing database interface driving, if this clustered node machine of delaying can not provide service, so just other clustered node and application system must be selected to connect by operator.In this case, if unmanned, although so data-base cluster is available, application system cannot can not provide the clustered node accessing database cluster of service by one, cause the inconvenience in use.
Summary of the invention
A kind of data-base cluster provided by the invention connects the method and system of High Availabitity, application system when having clustered node not provide service can be solved in data-base cluster and still by the problem of other clustered nodes access cluster, the high availability of data-base cluster can be guaranteed.
First aspect, this law embodiment provides a kind of data-base cluster and to connect the method for High Availabitity, comprising:
Application system calling data bank interface drives, and initiates to data-base cluster the request of connecting;
According to the request of connecting, database interface drives the IP address obtaining a clustered node in data-base cluster, and initiates to this IP address the request of connecting;
If connect successfully, then having connected of this application system and data-base cluster;
Unsuccessful if connected, then database interface drives the IP address obtaining another clustered node in data-base cluster, and initiates to this this IP address the request of connecting.
Second aspect, the embodiment of the present invention additionally provides a kind of data-base cluster and to connect the system of High Availabitity, comprising:
Data-base cluster, this data-base cluster at least comprises two clustered nodes;
Application system, drives for calling data bank interface, initiates to data-base cluster the request of connecting;
Database interface drives, and for obtaining and select the IP address of clustered node in data-base cluster, and initiates to the IP address selected the request of connecting, and judges whether this connects successful simultaneously.
The invention provides a kind of data-base cluster to connect the method and system of High Availabitity, by reconstructed database interface driver in data-base cluster, increase in interface driver and connect high availability mechanism, realization connects High Availabitity, ensure when data-base cluster can be used, guarantee that application system can be driven by the database interface of reconstruct and be connected to data-base cluster.Ensure that data-base cluster high availability, enhance the ease for use of application system access cluster, achieve dynamic multipoint access.
Accompanying drawing explanation
Fig. 1 is that a kind of data-base cluster that embodiments of the invention one provide connects the process flow diagram of method of High Availabitity;
Fig. 2 is that a kind of data-base cluster that embodiments of the invention two provide connects the structured flowchart of system of High Availabitity.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in further detail.Be understandable that, specific embodiment described herein is only for explaining the present invention, but not limitation of the invention.It also should be noted that, for convenience of description, illustrate only part related to the present invention in accompanying drawing but not entire infrastructure.
Embodiment one
Fig. 1 to connect the process flow diagram of method of High Availabitity for data-base cluster that the embodiment of the present invention one provides, described method is performed by the connect system of High Availabitity of data-base cluster, wherein this device is realized by software and/or hardware, the part that can be used as server is placed in server, as shown in Figure 1, described method comprises:
S101: application system calling data bank interface drives, initiates to data-base cluster the request of connecting;
S102: according to the request of connecting, database interface is driven through the IP addressed nodes list that configuration file obtains database clustered node;
S103: database interface drives the IP address obtaining one of them clustered node according to strategy;
S104: the validity of the IP address of this clustered node that database interface drives checking to obtain, judges that it is an effective IP address;
S105: whether judgement connects successful.If if connect successfully, then perform S106, if if connect unsuccessful, then perform S107.
S106: having connected of this application system and data-base cluster;
S107: database interface drives the IP address obtaining another clustered node in data-base cluster, and initiate to this this IP address the request of connecting, database interface drives and judges to connect successfully with this clustered node, and the connection that this application system is established to data-base cluster completes.
Present embodiments provide a kind of data-base cluster to connect the method for High Availabitity, connect High Availabitity: when application system sets up the connection with data-base cluster, multiple clustered node IP address can be specified, as long as guarantee have an IP address to provide Connection Service, namely can be established to the connection of cluster, the service that cluster provides can be had access to; Connect load-balancing function: strategy can be used in database interface drives, balanced for the request of connecting of application system is assigned on multiple clustered node, thus avoid application system and concentrate and be connected on certain clustered node, play and connect the effect of load balancing; Improve the ease for use of DataBase combining: only need to write multiple clustered node IP and strategy accordingly in the configuration of interface driver, the data-base cluster that application system just can be made easily to access multiple clustered node form.
Embodiment two
Fig. 2 is that a kind of data-base cluster of the present embodiment two confession connects the structured flowchart of system of High Availabitity, this device may be used for performing a kind of data-base cluster of providing of the above embodiment of the present invention one connect High Availabitity method, possess corresponding function and beneficial effect, described system comprises:
Data-base cluster, this data-base cluster at least comprises two clustered nodes;
Application system, drives for calling data bank interface, initiates to data-base cluster the request of connecting;
Database interface drives, and for obtaining and select the IP address of clustered node in data-base cluster, and initiates to the IP address selected the request of connecting, and judges whether this connects successful simultaneously.
Further, database interface drive specifically for:
According to the request of connecting, database interface drives the IP address obtaining a clustered node in data-base cluster, and initiates to this IP address the request of connecting;
If connect successfully, then having connected of this application system and data-base cluster;
Unsuccessful if connected, then database interface drives the IP address obtaining another clustered node in data-base cluster, and initiates to this this IP address the request of connecting.
Further, according to the request of connecting, database interface drives the IP address obtaining a clustered node in data-base cluster, and initiates to this IP address the request of connecting, and comprising:
Database interface drives the IP address obtaining one of them clustered node according to strategy;
The validity of the IP address of this clustered node that database interface drives checking to obtain, judges that it is an effective IP address.
Further, unsuccessful if connected, then database interface drives the IP address obtaining another clustered node in data-base cluster, and initiate to this this IP address the request of connecting, also comprise following process further, database interface drives and judges to connect successfully with this clustered node, and the connection that this application system is established to data-base cluster completes.
Note, above are only preferred embodiment of the present invention and institute's application technology principle.Skilled person in the art will appreciate that and the invention is not restricted to specific embodiment described here, various obvious change can be carried out for a person skilled in the art, readjust and substitute and can not protection scope of the present invention be departed from.Therefore, although be described in further detail invention has been by above embodiment, the present invention is not limited only to above embodiment, when not departing from the present invention's design, can also comprise other Equivalent embodiments more, and scope of the present invention is determined by appended right.

Claims (7)

1. data-base cluster connects a method for High Availabitity, it is characterized in that: comprising:
Application system calling data bank interface drives, and initiates to data-base cluster the request of connecting;
According to the request of connecting, database interface drives the IP address obtaining a clustered node in data-base cluster, and initiates to this IP address the request of connecting;
If connect successfully, then having connected of this application system and data-base cluster;
Unsuccessful if connected, then database interface drives the IP address obtaining another clustered node in data-base cluster, and initiates to this this IP address the request of connecting.
2. a kind of data-base cluster according to claim 1 connects the method for High Availabitity, it is characterized in that: according to the request of connecting, database interface drives the IP address obtaining a clustered node in data-base cluster, and initiates to this IP address the request of connecting, and comprising:
According to the request of connecting, database interface is driven through the IP addressed nodes list that configuration file obtains database clustered node;
Database interface drives the IP address obtaining one of them clustered node according to strategy;
The validity of the IP address of this clustered node that database interface drives checking to obtain, judges that it is an effective IP address.
3. a kind of data-base cluster according to claim 1 connects the method for High Availabitity, it is characterized in that: if it is unsuccessful to connect, then database interface drives the IP address obtaining another clustered node in data-base cluster, and initiate to this this IP address the request of connecting, also comprise following process further, database interface drives and judges to connect successfully with this clustered node, and the connection that this application system is established to data-base cluster completes.
4. data-base cluster connects a system for High Availabitity, it is characterized in that: comprising:
Data-base cluster, this data-base cluster at least comprises two clustered nodes;
Application system, drives for calling data bank interface, initiates to data-base cluster the request of connecting;
Database interface drives, and for obtaining and select the IP address of clustered node in data-base cluster, and initiates to the IP address selected the request of connecting, and judges whether this connects successful simultaneously.
5. a kind of data-base cluster according to claim 4 connects the system of High Availabitity, it is characterized in that: database interface drive specifically for:
According to the request of connecting, database interface drives the IP address obtaining a clustered node in data-base cluster, and initiates to this IP address the request of connecting;
If connect successfully, then having connected of this application system and data-base cluster;
Unsuccessful if connected, then database interface drives the IP address obtaining another clustered node in data-base cluster, and initiates to this this IP address the request of connecting.
6. a kind of data-base cluster according to claim 5 connects the system of High Availabitity, it is characterized in that: according to the request of connecting, database interface drives the IP address obtaining a clustered node in data-base cluster, and initiates to this IP address the request of connecting, and comprising:
Database interface drives the IP address obtaining one of them clustered node according to strategy;
The validity of the IP address of this clustered node that database interface drives checking to obtain, judges that it is an effective IP address.
7. a kind of data-base cluster according to claim 5 connects the system of High Availabitity, it is characterized in that: if it is unsuccessful to connect, then database interface drives the IP address obtaining another clustered node in data-base cluster, and initiate to this this IP address the request of connecting, also comprise following process further, database interface drives and judges to connect successfully with this clustered node, and the connection that this application system is established to data-base cluster completes.
CN201510786229.7A 2015-11-16 2015-11-16 Method and system for establishing connection with high availability for database cluster Pending CN105389371A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510786229.7A CN105389371A (en) 2015-11-16 2015-11-16 Method and system for establishing connection with high availability for database cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510786229.7A CN105389371A (en) 2015-11-16 2015-11-16 Method and system for establishing connection with high availability for database cluster

Publications (1)

Publication Number Publication Date
CN105389371A true CN105389371A (en) 2016-03-09

Family

ID=55421661

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510786229.7A Pending CN105389371A (en) 2015-11-16 2015-11-16 Method and system for establishing connection with high availability for database cluster

Country Status (1)

Country Link
CN (1) CN105389371A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107888696A (en) * 2017-11-24 2018-04-06 郑州云海信息技术有限公司 One kind storage laboratory equipment information acquisition method, system and relevant apparatus
CN111131361A (en) * 2018-10-31 2020-05-08 北京国双科技有限公司 Processing method and device for connection nodes in cluster query system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101183377A (en) * 2007-12-10 2008-05-21 华中科技大学 High availability data-base cluster based on message middleware
EP2131279A1 (en) * 2008-06-04 2009-12-09 Software AG System and method for a generic integration of a database into a high availability cluster
CN104503965A (en) * 2014-10-16 2015-04-08 杭州斯凯网络科技有限公司 High-elasticity high availability and load balancing realization method of PostgreSQL (Structured Query Language)

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101183377A (en) * 2007-12-10 2008-05-21 华中科技大学 High availability data-base cluster based on message middleware
EP2131279A1 (en) * 2008-06-04 2009-12-09 Software AG System and method for a generic integration of a database into a high availability cluster
CN104503965A (en) * 2014-10-16 2015-04-08 杭州斯凯网络科技有限公司 High-elasticity high availability and load balancing realization method of PostgreSQL (Structured Query Language)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107888696A (en) * 2017-11-24 2018-04-06 郑州云海信息技术有限公司 One kind storage laboratory equipment information acquisition method, system and relevant apparatus
CN111131361A (en) * 2018-10-31 2020-05-08 北京国双科技有限公司 Processing method and device for connection nodes in cluster query system
CN111131361B (en) * 2018-10-31 2023-03-24 北京国双科技有限公司 Processing method and device for connection nodes in cluster query system

Similar Documents

Publication Publication Date Title
US10581674B2 (en) Method and apparatus for expanding high-availability server cluster
US8756329B2 (en) System and method for parallel multiplexing between servers in a cluster
US8195743B2 (en) Extensible and programmable multi-tenant service architecture
CN101997854B (en) Processing system and method for providing data service
CN103744719B (en) Lock management method and system, the collocation method and device of lock administration system
JP2016514311A (en) Database system providing single tenant and multi-tenant environments
TW201426286A (en) Method, apparatus and computer program product for providing high availability in an active/active appliance cluster
CN103338252A (en) Distributed database concurrence storage virtual request mechanism
CN105447110A (en) Method for rapidly loading data in batches of database cluster and loading system
US20230308511A1 (en) Multichannel virtual internet protocol address affinity
CN107465616A (en) Client-based service routing method and device
CN101808051A (en) Application integration gateway and control method thereof
CN107612950A (en) A kind of method, apparatus, system, electronic equipment that service is provided
CN109783564A (en) Support the distributed caching method and equipment of multinode
CN105577710A (en) Service providing method, service acquiring method, devices and system
CN112866421A (en) Intelligent contract operation method and device based on distributed cache and NSQ
CN106210058A (en) A kind of reverse proxy method of multi-core parallel concurrent
CN101771703A (en) Information service system and method
US20220210086A1 (en) Managing network state for high flow availability within distributed network platform
CN105389371A (en) Method and system for establishing connection with high availability for database cluster
US10540366B2 (en) Transforming data structures and data objects for migrating data between databases having different schemas
CN112351106A (en) Service grid platform containing event grid and communication method thereof
CN102404351A (en) LDAP (Lightweight Directory Access Protocol) cloud storage service system
US11381665B2 (en) Tracking client sessions in publish and subscribe systems using a shared repository
CN111131367B (en) Distributed access service processing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160309