github.com/m-lab/locate@v0.17.6/cmd/heartbeat/README.md (about) 1 # Heartbeat Service 2 3 The Heartbeat Service is a sidecar service that performs health checks 4 for experiment instances running in the same Kubernetes pod and reports 5 them to the Locate API. 6 7 On start, it establishes a WebSocket connection with the Locate Service 8 and sends an initial registration message. Subsequently, it performs 9 periodic instance health checks and sends the results to the Locate API. 10 11 ## Local Development 12 13 To run the service locally, build the package and pass a test URL 14 in the `-heartbeat-url` flag. 15 16 ```sh 17 $ go build 18 $ ./heartbeat \ 19 -heartbeat-url=ws://locate-dot-mlab-sandbox.appspot.com/v2/platform/heartbeat?key=${API_KEY} \ 20 -registration-url=https://siteinfo.mlab-sandbox.measurementlab.net/v2/sites/registration.json \ 21 -hostname=ndt-mlab1-lga0t.mlab-sandbox.measurement-lab.org \ 22 -services=ndt/ndt7=ws:///ndt/v7/download,ws:///ndt/v7/upload \ 23 -services=ndt/ndt7=wss:///ndt/v7/download,wss:///ndt/v7/upload 24 ```