📡
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
  • Environment Variables
  • App-level Limits

Was this helpful?

Edit on GitHub
  1. App Management

Array Driver

PreviousIntroductionNextSQL Drivers

Last updated 3 years ago

Was this helpful?

The default app driver used by soketi is the array driver. This is a static, in-memory array of app credentials that is kept in memory while the underlying uWS Server process is running. Whenever a connection is made or an event is broadcast, the app credentials will be verified against these in-memory credentials.

By default, default values are defined for the app ID, key, and secret for ease of installation and development. However, you should change these credentials before launching your application in production.

For rate limits and max connections options, setting the variable value to -1 will disable the rate limits and / or max allowed connections.

Environment Variables

Name
Default
Possible values
Description

DEFAULT_APP_ID

app-id

Any string

The default app id for the array driver.

DEFAULT_APP_KEY

app-key

Any string

The default app key for the array driver.

DEFAULT_APP_SECRET

app-secret

Any string

The default app secret for the array driver.

DEFAULT_APP_MAX_CONNS

-1

Any integer

The default app's limit of concurrent connections.

DEFAULT_APP_ENABLE_CLIENT_MESSAGES

false

true, false

Whether client messages should be enabled for the app.

DEFAULT_APP_ENABLED

true

true, false

Whether the app is activated. This option can be used to disable an app.

DEFAULT_APP_MAX_BACKEND_EVENTS_PER_SEC

-1

Any integer

DEFAULT_APP_MAX_CLIENT_EVENTS_PER_SEC

-1

Any integer

DEFAULT_APP_MAX_READ_REQ_PER_SEC

-1

Any integer

DEFAULT_APP_WEBHOOKS

[]

[{"url": "string", "event_types": ["string", ...]}, ...]

The webhooks list for the app. See below

App-level Limits

The array driver does not support setting limits at the app-level variables using environment variables. However, you can use to set limits for your apps:

{
    "appManager.array.apps": [
        {
            "id": "app-id",
            "key": "app-key",
            "secret": "app-secret",
            "enabled": true,
            "enableClientMessages": true,
            "webhooks": [],
            "maxBackendEventsPerSecond": -1,
            "maxClientEventsPerSecond": -1,
            "maxReadRequestsPerSecond": -1,
            "maxPresenceMembersPerChannel": 100,
            "maxPresenceMemberSizeInKb": 2,
            "maxChannelNameLength": 200,
            "maxEventChannelsAtOnce": 10,
            "maxEventNameLength": 100,
            "maxEventPayloadInKb": 4,
            "maxEventBatchSize": 10
        }
    ]
}

The default app's limit of /events endpoint events broadcast per second. You can

The default app's limit of client events broadcast per second by a single socket. You can

The default app's limit of read endpoint calls per second. You can

Keep in mind, the fields are optional and you can omit them in case you want to keep the default ones defined with the .

🧬
events & channels limits environment variables
configure rate limiting database store
configure rate limiting database store
configure rate limiting database store
configuration files