/lease

Generic lease implementation using DynamoDB

Primary LanguageGoMIT LicenseMIT

Lease Build status License GoDoc

A generic leasing implementation of the Amazon-KCL.lease package. ideal for manage and partition work across a fleet of workers.

Screenshot

What is a Lease ?

Lease type contains data pertianing to a lease.
Distributed systems may use leases to partition work across a fleet of workers.
Each unit of work (identified by a leaseKey) has a corresponding Lease.
Every worker will contend for all leases - only one worker will successfully take each one.
The worker should hold the lease until it is ready to stop processing the corresponding unit of work, or until it fails.
When the worker stops holding the lease, another worker will take and hold the lease.

To get started, see the examples

License

MIT