1. Introduction

LeaseKeepAliveService manages lease to not disappear due to timeout. In invoker and scheduler components, each host writes health data to etcd with lease. When lease disappears by timeout, each host's health data disappear together, so it can be determined as an unhealthy host by the scheduler. Because it is the service that has the greatest influence on the health state of the component, a dedicated dispatcher is allocated.

2. Architecture Diagram




The LeaseKeepAlive is a finite state machine, which have 2 states: Ready, Active

  1. When a service is starts in Ready state
  2. Grant a lease in etcd and register a scheduler with the actorsystem that periodicaaly send keep-alive messages to prevent the lease from being deleted due to timeout
  3. When the above operation is completed, the state transitions to Active.
  4. In the Active state, if lease is deleted or a lease that is no longer needed occurs, it returns to Ready state and updates lease and scheduler.


  • No labels