<p>I 'm working on a project that has a WebSocket client connected all the time with an API, just a single connection running forever, and I was wondering what the best way to keep this process running only one a single instance of the worker, thoughts?</p>

Rodrigo
<p>One simple way of solving this problem is using Google Kubernetes Engine.</p>

<p>You will need to build a Docker container with your binary and create a short YAML manifest saying: this is my container, please always run one copy of it - this is called "Deployment" in Kubernetes terms.</p>

<p>Then you can forget about it - it will just run for you, surviving reboots, crashes, hardware malfunction and much more.</p>

<p><a href="https://cloud.google.com/kubernetes-engine/docs/quickstart" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/quickstart</a></p>
