What role do heartbeats play in distributed systems?
They inform the system of the services that are available and healthy.
Describe how heartbeats are used within a system workflow.
In systems with a central server, other servers will randomly send heartbeats to it (otherwise they will randomly send them to each other).
If no heartbeat is received from a server for a period of time, the system will consider it dead and no longer route requests to it (or take actions to replace that instance).