Database-less leasing
First Claim
Patent Images
1. A computer implemented method for database-less leasing comprising:
- providing a plurality of application server instances executing on a plurality of nodes in a cluster;
determining, using consensus among the plurality of application server instances within the cluster, a first application server instance to be cluster leader;
creating a lease table at the first application server instance, wherein the first application server instance owns and hosts the lease table;
storing copies of the lease table at each of the application server instances in the cluster;
granting, by the first application server instance, ownership of a lease for a singleton service within the cluster to one application server instance, wherein for the duration of the lease, the singleton service is provided in the cluster by only the application server instance that owns the lease;
maintaining the lease for the singleton service in the lease table;
updating changes to the lease in the lease table wherein the lease table is used to allow automatic migration of the singleton service;
replicating the changes to the lease to each copy of the lease table at each application server instance in the cluster;
monitoring the lease table at the first application server instance by a migration master within the cluster; and
if the application server instance that owns the lease fails,reassigning the lease, by the migration master, to a different application server instance in the cluster selected by the migration master,updating the lease in the lease table, andreplicating the changes to the lease to each copy of the lease table.
2 Assignments
0 Petitions
Accused Products
Abstract
One embodiment of the present invention comprises determining a cluster leader and using the cluster leader to set up a lease table at an application server of a cluster of application servers. The lease table can be used to maintain at least one lease for a singleton service.
35 Citations
17 Claims
-
1. A computer implemented method for database-less leasing comprising:
-
providing a plurality of application server instances executing on a plurality of nodes in a cluster; determining, using consensus among the plurality of application server instances within the cluster, a first application server instance to be cluster leader; creating a lease table at the first application server instance, wherein the first application server instance owns and hosts the lease table; storing copies of the lease table at each of the application server instances in the cluster; granting, by the first application server instance, ownership of a lease for a singleton service within the cluster to one application server instance, wherein for the duration of the lease, the singleton service is provided in the cluster by only the application server instance that owns the lease; maintaining the lease for the singleton service in the lease table; updating changes to the lease in the lease table wherein the lease table is used to allow automatic migration of the singleton service; replicating the changes to the lease to each copy of the lease table at each application server instance in the cluster; monitoring the lease table at the first application server instance by a migration master within the cluster; and if the application server instance that owns the lease fails, reassigning the lease, by the migration master, to a different application server instance in the cluster selected by the migration master, updating the lease in the lease table, and replicating the changes to the lease to each copy of the lease table. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A computer implemented system for database-less leasing comprising:
-
a plurality of application server instances, executing on a plurality of nodes which comprises a cluster; a first application server instance, determined using consensus among the plurality of application server instances within the cluster to be a cluster leader; a lease table maintained at the first application server instance, wherein the first application server instance owns and hosts the lease table, wherein the lease table is used to maintain the lease for the singleton service and copies of the lease table are stored at each of the application server instances in the cluster, and wherein the lease table is used to allow automatic migration of the singleton service; a lease for a singleton service within the cluster, wherein ownership of the lease it granted by the first application server instance to one application server instance in the cluster, and wherein for the duration of the lease, the singleton service is provided in the cluster by only the application server instance that owns the lease, and wherein changes to the lease are replicated to each copy of the lease table at each application server instance in the cluster; a migration master within the cluster operable to monitor the lease table at the first application server instance, and if the application server instance that owns the lease fails, reassign the lease to a different application server instance in the cluster selected by the migration master, update the lease in the lease table, and replicate the changes to the lease to each copy of the lease table. - View Dependent Claims (8, 9, 10, 11)
-
-
12. A non-transitory computer readable storage medium, including instructions stored thereon which, when executed by a computer, cause the computer to perform the steps of:
-
providing a plurality of application server instances executing on a plurality of nodes in a cluster; determining, using consensus among the plurality of application server instances within the cluster, a first application server instance to be cluster leader; creating a lease table at the first application server instance, wherein the first application server instance owns and hosts the lease table; storing copies of the lease table at each of the application server instances in the cluster; granting, by the first application server instance, ownership of a lease for a singleton service within the cluster to one application server instance, wherein for the duration of the lease, the singleton service is provided in the cluster by only the application server instance that owns the lease; maintaining the lease for the singleton service in the lease table; updating changes to the lease in the lease table wherein the lease table is used to allow automatic migration of the singleton service; replicating the changes to the lease to each copy of the lease table at each application server instance in the cluster; monitoring the lease table at the first application server instance by a migration master within the cluster; and if the application server instance that owns the lease fails, reassigning the lease, by the migration master, to a different application server instance in the cluster selected by the migration master, updating the lease in the lease table, and replicating the changes to the lease to each copy of the lease table in the cluster. - View Dependent Claims (13, 14, 15, 16, 17)
-
Specification