On startup and shutdown, the service registers itself, or through third-party registration, a service registration client also sends constant heartbeats so that the client knows that the service is alive. A heartbeat is a message that is sent periodically to other services to say that the service is running and alive. They should be sent asynchronously or implemented as event-based, in order to avoid performance issues. Other approaches include polling the service constantly. The service registration stage is also responsible for setting the contract of the service, that is, service name, protocol, version, and so on.