📡
Soketi
0.x
0.x
  • 📡soketi
  • 🏆Benchmarks
  • 🎉Support
  • 🤝Contributing
  • 😢Known Limitations
  • Getting started
    • 🚀Installation
      • CLI Installation
      • Docker
      • Helm Charts
      • Laravel Sail (Docker)
    • 💿Configuring the server
    • 🔐SSL Configuration
    • 🎨Client Configuration
      • Pusher SDK
      • Laravel Echo
    • 💻Backend Configuration
      • Pusher SDK
      • Laravel Broadcasting
      • Nginx Configuration
    • 🧠Redis Configuration
  • App Management
    • 🎟️Introduction
    • 🧬Array Driver
    • 🛢️SQL Drivers
      • 🐬MySQL
      • 🐘PostgreSQL
      • ⛲Database Pooling
    • 👾DynamoDB
  • Rate Limiting & Limits
    • ⛔Broadcast Rate Limiting
    • 👥Events & Channels Limits
  • Advanced Usage
    • ↔️Horizontal Scaling
      • 🤖Running Modes
      • 🧠Redis Configuration
      • 🧙‍♂️🧙♂ 🧙♂ 🧙♂ NATS Configuration
      • 🗃️Private Network Configuration
      • 😑Ok, what to choose?
    • 🛑Graceful Shutdowns & Real-time monitoring
    • 📈Prometheus Metrics
    • 🔗HTTP Webhooks
      • 📐AWS Lambda trigger
    • 🕛Queues
      • ⛓️AWS SQS FIFO
      • 🧠Redis
  • Network Watcher
    • 🚀Installation
    • 💿Environment Variables
Powered by GitBook
On this page
  • Docker Container
  • Helm Chart
  • Kubernetes YAML

Was this helpful?

Edit on GitHub
  1. Network Watcher

Installation

PreviousRedisNextEnvironment Variables

Last updated 3 years ago

Was this helpful?

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 ().

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 , 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 registry where you may view the available tags.

Helm Chart

To deploy using Helm, please consult the documentation .

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
metadata:
  name: soketi-service
spec:
  selector:
    app: soketi
    ws.soketi.app/accepts-new-connections: "yes" # required
  ports:
    - protocol: TCP
      port: 6001
      targetPort: 6001
      name: ws
ap

iVersion: apps/v1
kind: Deployment
metadata:
  name: soketi
  labels:
    app: soketi
spec:
  replicas: 3
  selector:
    matchLabels:
      app: soketi
  template:
    metadata:
      labels:
        app: soketi
        ws.soketi.app/accepts-new-connections: "yes" # optional
    spec:
      containers:
        - name: soketi
          image: soketi/soketi:0.17-16-alpine
          ports:
            - containerPort: 6001
        - name: network-watcher
          image: quay.io/soketi/network-watcher:6
          env:
            - name: KUBE_CONNECTION
              value: cluster
            - name: MEMORY_PERCENT
              value: "75" # if > 75% memory, reject new connections
            - name: CHECKING_INTERVAL
              value: "5" # every 5 seconds
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
          
🚀
soketi/network-watcher
soketi/soketi Helm Chart
soketi/network-watcher
the soketi Helm chart GitHub repository