System and method for planned migration of service connections
First Claim
1. A system for a planned migration of service connections in a clustered database, comprising:
- one or more computers with one or more processors;
a clustered database including first and second database instances and a notification service associated therewith, wherein the notification service broadcasts notifications that describe state changes in the clustered database;
an application server that includes a data source and a connection pool associated therewith, wherein the connection pool provides a plurality of connections that an application uses to connect to the first database instance for a service thereon, and wherein the data source is associated with parameters including a delay-for-planned-draining parameter and a planned-draining-period parameter for rebalancing the plurality of connections;
wherein upon receiving a notification event that the service is stopped on the first database instance, the connection pool delays migrating the plurality of connections for up to a period of delay defined by the delay-for-planned-draining parameter, and during the period of delay, the connection pool continues allocating idle connections from the connection pool to the software application; and
wherein upon receiving a notification event indicating the service is up on the second database instance, the connection pool is operable to spread migrating the plurality of connections from the first to the second database instance over a time period defined by the planned-draining-period parameter.
1 Assignment
0 Petitions
Accused Products
Abstract
A system and method for a planned migration of service connections from a first database instance to a second database instance in a clustered database. In accordance with an embodiment, a data source and connection pool enable access by a software application to a service on the first database instance. The data source is associated with a parameter specifying a delay-for-planned-draining, and a parameter specifying a planned-draining-period, which are used to rebalance connections when relocating a service. When a service is stopped on the first database instance, the connection pool receives a “service down” event from a notification service, and maintains the connections up to a time corresponding to the delay-for-planned-draining. When a “service up” event is received, the connection pool spreads migration of the connections from the first to second database instance over the planned-draining-period.
-
Citations
20 Claims
-
1. A system for a planned migration of service connections in a clustered database, comprising:
-
one or more computers with one or more processors; a clustered database including first and second database instances and a notification service associated therewith, wherein the notification service broadcasts notifications that describe state changes in the clustered database; an application server that includes a data source and a connection pool associated therewith, wherein the connection pool provides a plurality of connections that an application uses to connect to the first database instance for a service thereon, and wherein the data source is associated with parameters including a delay-for-planned-draining parameter and a planned-draining-period parameter for rebalancing the plurality of connections; wherein upon receiving a notification event that the service is stopped on the first database instance, the connection pool delays migrating the plurality of connections for up to a period of delay defined by the delay-for-planned-draining parameter, and during the period of delay, the connection pool continues allocating idle connections from the connection pool to the software application; and wherein upon receiving a notification event indicating the service is up on the second database instance, the connection pool is operable to spread migrating the plurality of connections from the first to the second database instance over a time period defined by the planned-draining-period parameter. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A computer-implemented method for a planned migration of service connections in a database cluster, comprising:
-
providing a clustered database including first and second database instances and a notification service associated therewith, wherein the notification service broadcasts notifications that describe state changes in the clustered database; providing an application server executing on one or more microprocessors, wherein the application server includes a data source and a connection pool associated therewith, wherein the connection pool provides a plurality of connections that a software application uses to connect to the first database instance for a service thereon, and wherein the data source is associated with parameters including a delay-for-planned-draining parameter and a planned-draining-period parameter for rebalancing the plurality of connections; delaying, by the connection pool, migrating the plurality of connections for up to a period of delay defined by the delay-for-planned draining parameter in response to receiving a notification event that the service is stopped on the first database instance, wherein the connection pool continues allocating idle connections from the connection pool to the software application during the period of delay; receiving, from the notification service, a notification event indicating the service is up on the second database instance; and spreading migrating the plurality of connections from the first to the second database instance over a time period defined by the planned-draining-period parameter. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17)
-
-
18. A non-transitory computer readable 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:
-
configuring a clustered database including first and second database instances and a notification service associated therewith, wherein the notification service broadcasts notifications that describe state changes in the clustered database; configuring an application server executing on one or more microprocessors, wherein the application server includes a data source and a connection pool associated therewith, wherein the connection pool provides a plurality of connections that a software application uses to connect to the first database instance for a service thereon, and wherein the data source is associated with parameters including a delay-for-planned-draining parameter and a planned-draining-period parameter for rebalancing the plurality of connections; delaying, by the connection pool, migrating the plurality of connections for up to a period of delay defined by the delay-for-planned draining parameter in response to receiving a notification event that the service is stopped on the first database instance, wherein the connection pool continues allocating idle connections from the connection pool to the software application during the period of delay; receiving, from the notification service, a notification event indicating the service is up on the second database instance; and spreading migrating the plurality of connections from the first to the second database instance over a time period defined by the planned-draining-period parameter. - View Dependent Claims (19, 20)
-
Specification