📡
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

Was this helpful?

Edit on GitHub
  1. Advanced Usage
  2. Horizontal Scaling

Redis Configuration

PreviousRunning ModesNext🧙♂ 🧙♂ 🧙♂ NATS Configuration

Last updated 3 years ago

Was this helpful?

soketi is optimized to work in multi-node or multi-process environments like Kubernetes or PM2. However, as you may expect, the main concern when scaling horizontally is how to make the nodes communicate with each other. To be able to scale horizontally and efficiently enable node-to-node or process-to-process communication, soketi leverages a .

You can configure soketi to run using Redis as a primary adapter for all typically local-persistent data using the ADAPTER_DRIVER environment variable:

$ ADAPTER_DRIVER=redis soketi start

Adapters like Redis are used for horizontal scaling only. Configuring and running Redis when running soketi using the local adapter will have no effect.

Environment Variables

These are the Redis variables to configure the adapter for Redis. For the rest of them, like host, port, and clustering support, read

Name
Default
Possible values
Description

ADAPTER_DRIVER

local

redis, nats, local, cluster

The adapter driver to use to store and retrieve each app and channel's persistent data.

ADAPTER_REDIS_PREFIX

''

Any string

The Redis adapter's Pub / Sub channels prefix.

ADAPTER_REDIS_CLUSTER_MODE

false

true, false

Whether the client should be initialized for Redis Cluster.

↔️
🧠
Redis connection
Redis Configuration.
You have to specify the DB_REDIS_CLUSTER_NODES value.