You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by "KeonHee (Confluence)" <no...@apache.org> on 2021/02/28 13:54:36 UTC
[CONF] OpenWhisk > LeaseKeepAliveService
|
[](https://cwiki.apache.org/confluence/display/~keonhee?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1614520476321&src.mail.notification=com.atlassian.confluence.plugins.confluence-
content-notifications-plugin%3Apage-created-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6) | KeonHee
**created** a page
---|---
|
---
| | [](https://cwiki.apache.org/confluence/display/OPENWHISK/LeaseKeepAliveService?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1614520476321&src.mail.notification=com.atlassian.confluence.plugins.confluence-
content-notifications-plugin%3Apage-created-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=view
"page icon")
---
[LeaseKeepAliveService](https://cwiki.apache.org/confluence/display/OPENWHISK/LeaseKeepAliveService?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1614520476321&src.mail.notification=com.atlassian.confluence.plugins.confluence-
content-notifications-plugin%3Apage-created-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=view
"LeaseKeepAliveService")
|
# **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.
---
| | [](https://cwiki.apache.org/confluence/display/OPENWHISK/LeaseKeepAliveService?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1614520476321&src.mail.notification=com.atlassian.confluence.plugins.confluence-
content-notifications-plugin%3Apage-created-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=view
"View page Icon") | [View
page](https://cwiki.apache.org/confluence/display/OPENWHISK/LeaseKeepAliveService?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1614520476321&src.mail.notification=com.atlassian.confluence.plugins.confluence-
content-notifications-plugin%3Apage-created-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=view
"View page") | •
---|---|---
[](https://cwiki.apache.org/confluence/plugins/likes/like.action?contentId=173087925&src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1614520476321&src.mail.notification=com.atlassian.confluence.plugins.confluence-
content-notifications-plugin%3Apage-created-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=like&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ4c3JmOjhhYTk4MDg3NWJmMjQ2MzUwMTVjOTI2N2JjOGUwMmY2IiwicXNoIjoiZjhlMjlmMGIxZmE1MTI1NGNmZTA2MmFjYzZlMmEzMTc2NGUwMTVlNThjYWI1OTk1ZDczZTg1ZmZhYjQ2MzhmMSIsImlzcyI6ImNvbmZsdWVuY2Vfbm90aWZpY2F0aW9uc0FSRUgtWFVEMS1QT1FHLUNTQU8iLCJleHAiOjE2MTUxMjUyNzYsImlhdCI6MTYxNDUyMDQ3Nn0.2SwKIIqCMahj39H9QODq2vaTx5cqIoYlizzoApoYzyM
"Like Icon") |
[Like](https://cwiki.apache.org/confluence/plugins/likes/like.action?contentId=173087925&src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1614520476321&src.mail.notification=com.atlassian.confluence.plugins.confluence-
content-notifications-plugin%3Apage-created-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=like&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ4c3JmOjhhYTk4MDg3NWJmMjQ2MzUwMTVjOTI2N2JjOGUwMmY2IiwicXNoIjoiZjhlMjlmMGIxZmE1MTI1NGNmZTA2MmFjYzZlMmEzMTc2NGUwMTVlNThjYWI1OTk1ZDczZTg1ZmZhYjQ2MzhmMSIsImlzcyI6ImNvbmZsdWVuY2Vfbm90aWZpY2F0aW9uc0FSRUgtWFVEMS1QT1FHLUNTQU8iLCJleHAiOjE2MTUxMjUyNzYsImlhdCI6MTYxNDUyMDQ3Nn0.2SwKIIqCMahj39H9QODq2vaTx5cqIoYlizzoApoYzyM
"Like")
---|---
| | [Stop watching
space](https://cwiki.apache.org/confluence/users/removespacenotification.action?spaceKey=OPENWHISK&src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1614520476321&src.mail.notification=com.atlassian.confluence.plugins.confluence-
content-notifications-plugin%3Apage-created-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=stop-
watching&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ4c3JmOjhhYTk4MDg3NWJmMjQ2MzUwMTVjOTI2N2JjOGUwMmY2IiwicXNoIjoiZWFhNWY5NjRhZDlmYWJjOGE5ODMzNTVhZDIzMTBmMTY3ZTNlNWNkZGU3NjcwNWNkZTc0YjhiYzBlNTA2NjZhNiIsImlzcyI6ImNvbmZsdWVuY2Vfbm90aWZpY2F0aW9uc0FSRUgtWFVEMS1QT1FHLUNTQU8iLCJleHAiOjE2MTUxMjUyNzYsImlhdCI6MTYxNDUyMDQ3Nn0.4tL9UekxtEqXEKvhVP4NkXRysE3TS6y3guHklqT23FM)
| •
---|---
[Manage
notifications](https://cwiki.apache.org/confluence/users/editmyemailsettings.action?src=mail&src.mail.product=confluence-
server&src.mail.timestamp=1614520476321&src.mail.notification=com.atlassian.confluence.plugins.confluence-
content-notifications-plugin%3Apage-created-
notification&src.mail.recipient=8aa980875bf24635015c9267bc8e02f6&src.mail.action=manage)
---
| 
---
This message was sent by Atlassian Confluence 7.5.0

---