---
title: "Discussion on \"Pattern 2 Master server making heartbeat requests to the slave servers to check if they are alive\" | Hashnode"
description: "Discussion on \"Pattern 2 Master server making heartbeat requests to the slave servers to check if they are alive\". package main\n\nimport (\n    \"fmt\"\n    \"sync\"\n    \"time\"\n)\n\ntype Master struct {\n    slaves   []*Slave\n    shutdown bool\n    mu       sync.Mutex\n}\n\ntype Slave struct {\n    ID    string\n    Alive bool\n}\n\nfunc (m *Master) checkSlaveHealth(slave *Slave) {..."
url: "https://hashnode.com/posts/pattern-2-master-server-making-heartbeat-requests-to-the-slave-servers-to-check-if-they-are-alive/6906832f33cb43708aea70cc"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Pattern 2 Master server making heartbeat requests to the slave servers to check if they are alive](https://hey-there.hashnode.dev/pattern-2-master-server-making-heartbeat-requests-to-the-slave-servers-to-check-if-they-are-alive?utm_source=hashnode&utm_medium=feed)

package main import ( "fmt" "sync" "time" ) type Master struct { slaves \[\]\*Slave shutdown bool mu sync.Mutex } type Slave struct { ID string Alive bool } func (m \*Master) checkSlaveHealth(slave \*Slave) {...

Nov 1, 2025 · 2 min read · hey-there.hashnode.dev  
Read the article

## Written by

[20DIT021 BHASHKAR DHRUV](https://hashnode.com/@dhruv1812)

@dhruv1812

  
[View profile](https://hashnode.com/@dhruv1812)

embrace the imposter syndrome

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
