liveBook · Manning

Tick message

As explained in Elixir in Action, Third Edition

A tick message is a periodic liveness probe sent between nodes to check whether a peer responds.

A tick message is a periodic liveness probe exchanged between connected nodes. Each node uses these probes to check whether its peers still respond. section 12.1.1

Tick messages establish practical failure behavior in a distributed cluster:

  • A peer that fails to respond to four consecutive ticks is considered disconnected and removed from the connected-node list. section 12.1.1
  • A lost connection can indicate a network partition, including a split-brain situation where separate clusters continue serving clients. section 12.2.5
  • Tick failure does not automatically reconnect the node; applications can observe connection changes with Node.monitor/2 or :net_kernel.monitor_nodes/1. section 12.1.1 section 12.2.5
$ iex --sname node1@localhost
iex(node1@localhost)1> :net_kernel.monitor_nodes(true)

Subscribe a process to node-connection notifications, then observe nodeup and nodedown messages as peers connect or disappear. section 12.2.5

How Elixir in Action, Third Edition covers it

How deep it goes
Defines periodic probing and the four-failure threshold, but does not descend into tick-message implementation internals.
Examples
Uses connected Elixir nodes and observed nodeup or nodedown notifications as operational examples.
What you can do after
Operate/configure node monitoring with Node.monitor/2 or :net_kernel.monitor_nodes/1 after detecting lost peer connections.
How it connects
Connects node monitoring, network partitions, split-brain behavior, and remote process monitors or links.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Elixir in Action, Third Edition. The section links point to the parts of the book it draws on.