The Network Watcher is only used when deploying soketi via Kubernetes.

If you run soketi standalone in a cluster at scale, you may run into capacity issues. For example, RAM usage might be near the limit supported by your server and even if you decide to horizontally scale the servers, new connections might still come to servers that are near their memory limit.

Running the soketi Network Watcher inside the same pod will solve these issues by continuously monitoring the soketi Server Usage API, labeling the pods that get over a specified threshold with ws.soketi.app/accepts-new-connections: "no", so that the services watching for the pods will ignore them.

The Network Watcher source code is available on GitHub (soketi/network-watcher).

Docker Container

The Network Watcher is available as a Docker container. It can either be installed manually by adding a container in your pods that also run soketi, or you can use the soketi/soketi Helm Chart, which includes an already-set Network Watcher container you can easily turn on and off.

When a new Network Watcher release is created on GitHub, a Docker image with the same tag is automatically pushed to the soketi/network-watcher registry where you may view the available tags.

Helm Chart

To deploy using Helm, please consult the documentation the soketi Helm chart GitHub repository.

Kubernetes YAML

The following configuration example demonstrates how you may configure the Network Watcher container in your pods that run soketi.

apiVersion: v1
kind: Service
  name: soketi-service
    app: soketi
    ws.soketi.app/accepts-new-connections: "yes" # required
    - protocol: TCP
      port: 6001
      targetPort: 6001
      name: ws

Last updated