docker / engine-api

DEPRECATED: Please see https://github.com/docker/docker/tree/master/client
Apache License 2.0
264 stars 163 forks source link

swarm: clarify meaning of time related fields #369

Closed stevvooe closed 8 years ago

stevvooe commented 8 years ago

Several fields in the RaftConfig and DispatcherConfig structures lack clarification about their meaning in relation to time. While all these fields describe a time-period, they have subtle yet important differences in their meanings.

HeartbeatPeriod is an open time period, meaning the amount of time between heartbeats for nodes communicating with the dispatcher. This field has always been specified in nanoseconds and has been converted directly to a time.Duration field. This will have impact except for a slightly different type. The values used via the API will be identical, so there is no impact.

HeartbeatTick and ElectionTick specify the period in units of ticks, which are configured as one second in the manager. The role of these fields is clarified and their relation with time is described accordingly.

Signed-off-by: Stephen J Day stephen.day@docker.com

Thanks to @aaronlehmann for the descriptions.

vdemeester commented 8 years ago

LGTM :cat2: /cc @aaronlehmann @thaJeztah

thaJeztah commented 8 years ago

LGTM, but ping @aaronlehmann for double checking the recommendations / technical side