b623af776b
The design of the session TTLs is based on the Google Chubby approach (http://research.google.com/archive/chubby-osdi06.pdf). The Session struct has an additional TTL field now. This attaches an implicit heartbeat based failure detector. Tracking of heartbeats is done by the current leader and not persisted via the Raft log. The implication of this is during a leader failover, we do not retain the last heartbeat times. Similar to Chubby, the TTL represents a lower-bound. Consul promises not to terminate a session before the TTL has expired, but is allowed to extend the expiration past it. This enables us to reset the TTL on a leader failover. The TTL is also extended when the client does a heartbeat. Like Chubby, this means a TTL is extended on creation, heartbeat or failover. Additionally, because we must account for time requests are in transit and the relative rates of clocks on the clients and servers, Consul will take the conservative approach of internally multiplying the TTL by 2x. This helps to compensate for network latency and clock skew without violating the contract. Reference: https://docs.google.com/document/d/1Y5-pahLkUaA7Kz4SBU_mehKiyt9yaaUGcBTMZR7lToY/edit?usp=sharing |
||
---|---|---|
.. | ||
agent | ||
event.go | ||
event_test.go | ||
exec.go | ||
exec_test.go | ||
force_leave.go | ||
force_leave_test.go | ||
info.go | ||
info_test.go | ||
join.go | ||
join_test.go | ||
keygen.go | ||
keygen_test.go | ||
keyring.go | ||
keyring_test.go | ||
leave.go | ||
leave_test.go | ||
members.go | ||
members_test.go | ||
monitor.go | ||
reload.go | ||
reload_test.go | ||
rpc.go | ||
util_test.go | ||
version.go | ||
version_test.go | ||
watch.go | ||
watch_test.go |