System and method for improving application connectivity in a clustered database environment
First Claim
1. A system for supporting affinity in a clustered database environment, comprising:
- one or more computers, each including one or more processors;
a clustered database, which includes a plurality of database instances;
a notification service associated with the clustered database, which broadcasts notifications that describe state changes within the database instances;
an application server associated with a data source,wherein the data source includes a connection pool that manages a set of connections to the plurality of database instances, and is associated with an affinity policy that defines which, if any, type of affinity will be used by that data source and the connections therein at runtime, to access the clustered database, andwherein the data source uses the notifications of state changes received from the notification service to adaptively configure connections to the database instances, for use by applications at the application server; and
wherein, upon receiving a connection reserve request from an application to access a selected database instance, the data sourcedetermines the affinity policy associated with the data source,determines whether there is already an affinity context associated with the application context for the request, and if not then selects a connection for use with the selected database instance,stores the instance information with the application context for use on the next connection reserve request.
0 Assignments
0 Petitions
Accused Products
Abstract
A clustered database environment includes multiple database instances that appear as one server. An application server can use a data source and connection pools to connect with the clustered database. A notification service broadcasts notifications describing state changes in the database instances, which are then used by the data source and connection pools to control access to the database instances. A data source configuration allows for specification of a preferred affinity policy. A session affinity policy is used to provide database instance affinity for database access made under the context of a web session, whereby database operations are directed to a particular instance for a period of time when the application may be performing multiple, related updates to a specific data set. Directing such operations to a single database instance can be used to improve application performance due to increased local cache utilization.
65 Citations
15 Claims
-
1. A system for supporting affinity in a clustered database environment, comprising:
-
one or more computers, each including one or more processors; a clustered database, which includes a plurality of database instances; a notification service associated with the clustered database, which broadcasts notifications that describe state changes within the database instances; an application server associated with a data source, wherein the data source includes a connection pool that manages a set of connections to the plurality of database instances, and is associated with an affinity policy that defines which, if any, type of affinity will be used by that data source and the connections therein at runtime, to access the clustered database, and wherein the data source uses the notifications of state changes received from the notification service to adaptively configure connections to the database instances, for use by applications at the application server; and wherein, upon receiving a connection reserve request from an application to access a selected database instance, the data source determines the affinity policy associated with the data source, determines whether there is already an affinity context associated with the application context for the request, and if not then selects a connection for use with the selected database instance, stores the instance information with the application context for use on the next connection reserve request. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A method for supporting affinity in a clustered database environment, comprising:
-
providing a clustered database, which includes a plurality of database instances; providing a notification service associated with the clustered database, which broadcasts notifications that describe state changes within the database instances; providing an application server associated with a data source, wherein the data source includes a connection pool that manages a set of connections to the plurality of database instances, and is associated with an affinity policy that defines which, if any, type of affinity will be used by that data source and the connections therein at runtime, to access the clustered database, and wherein the data source uses the notifications of state changes received from the notification service to adaptively configure connections to the database instances, for use by applications at the application server; and upon receiving a connection reserve request from an application to access a selected database instance, the data source determining the affinity policy associated with the data source, determining whether there is already an affinity context associated with the application context for the request, and if not then selects a connection for use with the selected database instance, storing the instance information with the application context for use on the next connection reserve request. - View Dependent Claims (7, 8, 9, 10)
-
-
11. A non-transitory computer readable storage medium, including instructions stored thereon which when read and executed by one or more computers cause the one or more computers to perform the steps comprising:
-
providing a clustered database, which includes a plurality of database instances; providing a notification service associated with the clustered database, which broadcasts notifications that describe state changes within the database instances; providing an application server associated with a data source, wherein the data source includes a connection pool that manages a set of connections to the plurality of database instances, and is associated with an affinity policy that defines which, if any, type of affinity will be used by that data source and the connections therein at runtime, to access the clustered database, and wherein the data source uses the notifications of state changes received from the notification service to adaptively configure connections to the database instances, for use by applications at the application server; and upon receiving a connection reserve request from an application to access a selected database instance, the data source determining the affinity policy associated with the data source, determining whether there is already an affinity context associated with the application context for the request, and if not then selects a connection for use with the selected database instance, storing the instance information with the application context for use on the next connection reserve request. - View Dependent Claims (12, 13, 14, 15)
-
Specification