sockudo/sockudo

Blazingly fast pusher drop-in replacement written in rust

Rust

828

1,332 commits

updated Oct 17, 2026

See the code

README

Sockudo Logo

Sockudo

A self-hosted realtime platform: Pusher-compatible at the edge, Sockudo-native where you need recovery, history, mutable messages, push, AI Transport, and first-party SDKs.

Build status License GitHub stars

What Sockudo Is

Sockudo is a high-performance Rust realtime server for WebSocket and HTTP publish workloads. It keeps strict Protocol V1 compatibility with the Pusher protocol, then adds Protocol V2 features for teams that need stronger delivery semantics and product-level control.

This repository is now the Sockudo monorepo. It contains the server, Rust workspace crates, dashboard, deployment assets, docs, official realtime client SDKs, HTTP server SDKs, and the TypeScript AI Transport SDK.

Highlights

  • Pusher-compatible WebSocket and HTTP APIs for Protocol V1 clients.
  • Protocol V2 with sockudo: events, serials, message IDs, recovery, rewind, tags, deltas, and mutable message events.
  • Horizontal fanout through Redis, Redis Cluster, NATS, RabbitMQ, Google Pub/Sub, Kafka, Pulsar, and Apache Iggy (single node or replicated VSR cluster).
  • Durable history, hot replay buffers, two-tier recovery, until_attach history reads, and degraded/reset-required continuity state.
  • Versioned mutable messages with create, update, delete, append, summary, latest-visible reads, and version history.
  • Presence membership plus retained presence-history transitions and snapshots.
  • Message annotations for reactions, receipts, moderation, summary projection, and raw annotation streams.
  • Push notification pipeline for FCM, APNs, Web Push, HMS, and WNS.
  • Prometheus metrics, webhook delivery, rate limiting, app managers, TLS, Docker Compose, and Helm.
  • Optional AI Transport built on the same versioned-message, history, recovery, push, and presence primitives instead of a parallel streaming path.
  • Optional ably-compat facade exposing a reduced Ably AI Transport compatibility surface for tested AI Transport workloads.

Monorepo Layout

crates/              Rust server crates and libraries
benches/ai/          Permanent Criterion benchmarks for AI hot paths
benches/presence/    Presence performance budgets
client-sdks/         Realtime client SDKs and AI Transport SDK
server-sdks/         HTTP/server SDKs for backend publishers
dashboard/           Operator API and Vue UI
docs/                Documentation site content
config/              Local configuration examples
ops/                 Migrations and operational assets
charts/              Helm chart
tests/               Conformance, dashboard, load, and binary fixtures
tools/               Probes, chaos tooling, and helper utilities

The SDK directories preserve their original repository names so package metadata, release scripts, and issue references remain recognizable.

Protocols

CapabilityProtocol V1Protocol V2
Event prefixespusher: / pusher_internal:sockudo: / sockudo_internal:
Pusher compatibilityStrict compatibility targetSockudo-native
serial and message_idStripped from deliveryNative on relevant frames
Recovery and rewindNot availableHot replay plus durable history
Mutable messagesNot availablesockudo:message.*
AnnotationsNot availableNative
Tag filtering and deltasNot availableNative
AI TransportNot availableOptional feature and runtime config

Use Protocol V1 when you need drop-in Pusher behavior. Use Protocol V2 when clients and server SDKs can rely on Sockudo-native recovery, history, mutation, annotation, filtering, and AI Transport semantics. Protocol defaults vary by SDK; check each package README before assuming V2 is enabled.

Quick Start

Docker Compose

git clone https://github.com/sockudo/sockudo.git
cd sockudo
make up

Default local services:

ServiceURL
Sockudo serverhttp://localhost:6001
Prometheus metricshttp://localhost:9601/metrics
Dashboard UIhttp://localhost:5174
Dashboard APIhttp://localhost:3460

Linux Binary

Install the latest verified x86_64 or ARM64 release into ~/.local/bin:

curl --proto '=https' --tlsv1.2 -sSfL \
  https://sockudo.io/install.sh | sh

The installer detects GNU libc or musl and verifies the archive's SHA-256 checksum. See the installation guide for version pinning and custom installation paths.

From Source

rustup toolchain install stable
git clone https://github.com/sockudo/sockudo.git
cd sockudo

cargo run -p sockudo

Build with a production-oriented feature set:

cargo build -p sockudo --release --features "v2,redis,postgres,push"

Build everything the server can expose:

cargo build -p sockudo --release --features full

Kubernetes

helm install sockudo oci://ghcr.io/sockudo/charts/sockudo --version 4.7.0

Or from a checkout, when developing the chart itself:

helm install sockudo ./charts/sockudo

Example production shape with Redis, ingress, autoscaling, and monitoring:

helm install sockudo oci://ghcr.io/sockudo/charts/sockudo --version 4.7.0 \
  --set config.adapterDriver=redis \
  --set redis.host=redis-master \
  --set redis.existingSecret=my-redis-secret \
  --set defaultApp.existingSecret=my-default-app-secret \
  --set autoscaling.enabled=true \
  --set pdb.enabled=true \
  --set ingress.enabled=true \
  --set serviceMonitor.enabled=true

When defaultApp.existingSecret is set, the Secret must contain default-app-secret and can also include default-app-id and default-app-key.

Client SDKs

Realtime clients live under client-sdks/.

SDK CI and publishing are managed from root workflows. See the 2026 SDK publishing runbook before releasing packages or changing registry setup. Registry-native packages publish through protected workflows where supported. SwiftPM packages are mirrored to standalone package repositories.

RuntimePackage
JavaScript / TypeScript@sockudo/client
AI Transport TypeScript@sockudo/ai-transport
Swift / Apple platformsSockudoSwift via SwiftPM (https://github.com/sockudo/sockudo-swift)
Kotlin / JVM / Androidio.sockudo:sockudo-kotlin
Flutter / Dartsockudo_flutter
.NETSockudo.Client
Pythonsockudo-python

JavaScript example:

import Sockudo from "@sockudo/client";

const sockudo = new Sockudo("app-key", {
  wsHost: "127.0.0.1",
  wsPort: 6001,
  wssPort: 6001,
  forceTLS: false,
  enabledTransports: ["ws"],
  protocolVersion: 2,
});

const channel = sockudo.subscribe("public-updates");
channel.bind("price-updated", (payload) => {
  console.log(payload);
});

AI Transport example:

import { ClientSessionProvider, useView } from "@sockudo/ai-transport/react";

See client-sdks/sockudo-ai-transport-js/README.md for React, Vue, Svelte, Vercel AI SDK, and direct provider helpers.

Server SDKs

HTTP/server SDKs live under server-sdks/. They publish events, sign private and presence channel auth, authenticate users, validate webhooks, query state, and expose Sockudo-native APIs such as idempotent publishing, history, mutable messages, annotations, and push where implemented.

SDK CI and publishing are managed from root workflows. See the 2026 SDK publishing runbook before releasing packages or changing registry setup. Registry-native packages publish through protected workflows where supported. Go modules and SwiftPM publish from this monorepo with package-manager-native tags and manifests. The PHP SDK is mirrored to sockudo/sockudo-http-php for Packagist.

LanguagePackage
Node.jssockudo
Pythonsockudo-http-python
PHPsockudo/sockudo-php-server
Rubysockudo
Gogithub.com/sockudo/sockudo/server-sdks/sockudo-http-go/v2
Rustsockudo-http
Javaio.sockudo:sockudo-http-java
.NETSockudoServer
SwiftSockudo via SwiftPM (https://github.com/sockudo/sockudo-http-swift)

Node.js example:

import { Sockudo } from "sockudo";

const sockudo = new Sockudo({
  appId: "app-id",
  key: "app-key",
  secret: "app-secret",
  host: "127.0.0.1",
  port: 6001,
  useTLS: false,
});

await sockudo.trigger("orders", "order.created", { id: "ord_123" });

Python example:

from sockudo_http import Config, Sockudo

sockudo = Sockudo(
    Config(
        app_id="app-id",
        key="app-key",
        secret="app-secret",
        host="127.0.0.1",
        port=6001,
    )
)

sockudo.trigger("orders", "order.created", {"id": "ord_123"})

Server Workspace

The Rust workspace is split by responsibility:

CrateResponsibility
sockudo-protocolProtocol message types, V1/V2 prefixes, extras, wire payloads
sockudo-filterTag filtering expressions and matching
sockudo-coreShared traits, config, auth, errors, history, version store, annotations
sockudo-appApp-manager backends
sockudo-cacheCache backends
sockudo-queueQueue backends
sockudo-rate-limiterRate limiting and middleware
sockudo-metricsPrometheus metrics
sockudo-webhookWebhook delivery
sockudo-deltaDelta compression
sockudo-pushPush domain, storage, queues, providers, feedback, scheduler
sockudo-ai-transportAI Transport validation, rollup, and conformance helpers
sockudo-adapterConnections, presence, fanout, replay, recovery
sockudo-mcpModel Context Protocol server (tools, resources, prompts) and sockudo-mcp binary
sockudo-serverBinary, HTTP/WS routes, bootstrap, durable stores, push API

The Rust SDK at server-sdks/sockudo-http-rust is intentionally excluded from the root Cargo workspace so it can keep its own package and release lifecycle.

Feature Flags

Common server features:

FeaturePurpose
localIn-memory development defaults
v2Protocol V2 bundle: deltas, tag filtering, recovery
deltaDelta compression
tag-filteringServer-side tag filtering
recoverySerial and message-id recovery
ai-transportAI Transport validation and rollup surfaces
ably-compatOpt-in reduced Ably Realtime/REST facade for AI Transport compatibility; implies ai-transport
pushPush notification runtime and HTTP APIs
mcpEmbedded Model Context Protocol server for AI agents (/mcp, scoped bearer tokens)
redis, redis-clusterRedis-backed adapter/cache/queue/rate limit paths
nats, pulsar, rabbitmq, google-pubsub, kafka, iggyHorizontal adapter and queue integrations
omqBrokerless horizontal adapter integration
mysql, postgres, dynamodb, surrealdb, scylladbApp, history, version-store, and push storage backends
sqs, sns, lambdaAWS queue, notification, and webhook integrations
fullAll production integrations wired by the server

Examples:

cargo build
cargo build --no-default-features
cargo build --features "redis,postgres"
cargo build --features "v2,ai-transport,redis,postgres,push"
cargo build --release --features full

Configuration

Sockudo prefers TOML and falls back to JSON. The default local config is config/config.toml.

Minimal local shape:

port = 6001
host = "0.0.0.0"
debug = false

[app_manager]
driver = "memory"

[app_manager.array]
[[app_manager.array.apps]]
id = "app-id"
key = "app-key"
secret = "app-secret"
enabled = true

[adapter]
driver = "local"

[cache]
driver = "memory"

[queue]
driver = "memory"

Major runtime sections:

SectionPurpose
[app_manager]App credentials, policies, origin rules, namespaces
[adapter]Realtime fanout driver
[cache]Shared cache for auth, recovery, and cross-node state
[queue]Background queue driver
[history]Durable channel history
[versioned_messages]Mutable message storage and versioning
[presence_history]Retained join/leave transitions
[annotations]Annotation publish, delete, summaries, raw streams
[push]Push providers, quotas, retries, feedback, scheduler
[ai_transport]AI Transport validation and channel scoping

Reference docs:

AI Transport

AI Transport is default-off and Protocol V2-only. Enable it with both Cargo and runtime config:

cargo build -p sockudo --features "v2,ai-transport,redis,postgres,push"
[versioned_messages]
enabled = true

[history]
enabled = true

[ai_transport]
enabled = true

[[ai_transport.channels]]
prefix = "ai:"

Operational rule: append rollup only changes WebSocket egress. Persistence, version storage, history, recovery, push, and webhooks still see every original mutation.

Useful docs:

MCP for AI Agents

Sockudo exposes a Model Context Protocol (MCP) server so agents can inspect channels, read history and presence, publish events, mutate versioned messages, manage push, and triage incidents through scoped, audited tools. Build with --features mcp and enable [mcp] with bearer tokens, or run the standalone sockudo-mcp binary over stdio against any deployment:

cargo install --path crates/sockudo-mcp --features cli
claude mcp add sockudo -- sockudo-mcp --url https://rt.example.com --app app-1:key:secret

See MCP server.

Development

Server checks:

cargo fmt --all
cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings

Focused server checks:

cargo test -p sockudo-core
cargo test -p sockudo-adapter
cargo test -p sockudo-ai-transport
cargo test -p sockudo-push

Presence correctness and performance gate:

scripts/presence-bench-guard.sh

The gate compares authoritative enter/leave against the former facade-map cycle in the same Criterion run. It fails if either the single-worker or eight-worker disjoint-client confidence interval is slower.

AI Transport checks:

scripts/ai-transport-bench-guard.sh
AIT_CONFORMANCE_OFFLINE=1 scripts/ai-conformance-node.sh
make ably-compat-test
make ably-ai-transport-test
make ably-ai-demo

Pinned cross-SDK and released-binary evidence:

cd sockudo-compatibility
make conformance strict-completeness browser-conformance browser-strict
make go-conformance ait-conformance
# After publishing a tag with detached checksum assets:
SOCKUDO_RELEASE_TAG=vX.Y.Z make release-verify

The opt-in Ably targets exercise the pinned Ably REST and WebSocket surface, excluding Live Objects and all non-WebSocket realtime transports, using local Sockudo as the endpoint. The compatibility runtime lives in crates/sockudo-ably-compat and reuses native Sockudo auth, publish, history, recovery, presence, annotation, stats, and push services. Node defaults, browser, strict-pending, and AI Transport are independent evidence lanes; a pass in one is not a pass in another. The dated release status and scope limits are in the compatibility scorecard under docs/ably-compat/ and the reports under sockudo-compatibility/. Do not use these targets to claim full Ably platform compatibility.

Sockudo and this compatibility layer are community-built and community-maintained. They are not Ably products, and Ably does not provide support for them. Use Sockudo's issue tracker, discussions, Discord, or other support channels listed below for help.

Docs checks:

cd docs
npm run types:check
npm run build

SDK checks are covered by SDK CI and are also package-local when iterating. Start from the 2026 SDK publishing runbook, then use the native package manager: bun, pnpm, npm, pytest, cargo, go test, gradle, swift test, dotnet test, composer, or bundle.

Deployment Profiles

ProfileAdapterCacheQueueApp storeTypical use
Local developmentlocalmemorymemorymemoryFast single-node iteration
Small productionredisredisredispostgres or mysqlSimple shared state
High trafficredis-clusterredis-clusterexternal queueSQL or DynamoDBLarger fanout and retention
AI Transporthorizontal adaptershared cacheshared queueshared history and version storeStreaming recovery and rollup

For horizontal adapters, do not assume memory history, memory version stores, or process-local cache are safe. AI Transport startup intentionally rejects invalid horizontal/shared-state combinations.

Documentation

Sponsors

SWAG LiveCaller

Contributing

  1. Fork the repository.
  2. Create a focused branch.
  3. Make the smallest coherent change.
  4. Run the relevant checks.
  5. Open a pull request with the behavior change, verification, and any follow-up risk.

For coding-agent work, read AGENTS.md. For a compact technical map of the repo, read CLAUDE.md.

License

Sockudo is licensed under the MIT License. Individual SDK packages may also carry their own package metadata and notices; check the SDK directory before publishing.

Support

abbly
broadcasting
pusher
realtime
rust
rust-lang
websocket
websockets
ws

sockudo/sockudo

Blazingly fast pusher drop-in replacement written in rust

Rust

828

1,332 commits

updated Oct 17, 2026

See the code

README

Sockudo Logo

Sockudo

A self-hosted realtime platform: Pusher-compatible at the edge, Sockudo-native where you need recovery, history, mutable messages, push, AI Transport, and first-party SDKs.

Build status License GitHub stars

What Sockudo Is

Sockudo is a high-performance Rust realtime server for WebSocket and HTTP publish workloads. It keeps strict Protocol V1 compatibility with the Pusher protocol, then adds Protocol V2 features for teams that need stronger delivery semantics and product-level control.

This repository is now the Sockudo monorepo. It contains the server, Rust workspace crates, dashboard, deployment assets, docs, official realtime client SDKs, HTTP server SDKs, and the TypeScript AI Transport SDK.

Highlights

  • Pusher-compatible WebSocket and HTTP APIs for Protocol V1 clients.
  • Protocol V2 with sockudo: events, serials, message IDs, recovery, rewind, tags, deltas, and mutable message events.
  • Horizontal fanout through Redis, Redis Cluster, NATS, RabbitMQ, Google Pub/Sub, Kafka, Pulsar, and Apache Iggy (single node or replicated VSR cluster).
  • Durable history, hot replay buffers, two-tier recovery, until_attach history reads, and degraded/reset-required continuity state.
  • Versioned mutable messages with create, update, delete, append, summary, latest-visible reads, and version history.
  • Presence membership plus retained presence-history transitions and snapshots.
  • Message annotations for reactions, receipts, moderation, summary projection, and raw annotation streams.
  • Push notification pipeline for FCM, APNs, Web Push, HMS, and WNS.
  • Prometheus metrics, webhook delivery, rate limiting, app managers, TLS, Docker Compose, and Helm.
  • Optional AI Transport built on the same versioned-message, history, recovery, push, and presence primitives instead of a parallel streaming path.
  • Optional ably-compat facade exposing a reduced Ably AI Transport compatibility surface for tested AI Transport workloads.

Monorepo Layout

crates/              Rust server crates and libraries
benches/ai/          Permanent Criterion benchmarks for AI hot paths
benches/presence/    Presence performance budgets
client-sdks/         Realtime client SDKs and AI Transport SDK
server-sdks/         HTTP/server SDKs for backend publishers
dashboard/           Operator API and Vue UI
docs/                Documentation site content
config/              Local configuration examples
ops/                 Migrations and operational assets
charts/              Helm chart
tests/               Conformance, dashboard, load, and binary fixtures
tools/               Probes, chaos tooling, and helper utilities

The SDK directories preserve their original repository names so package metadata, release scripts, and issue references remain recognizable.

Protocols

CapabilityProtocol V1Protocol V2
Event prefixespusher: / pusher_internal:sockudo: / sockudo_internal:
Pusher compatibilityStrict compatibility targetSockudo-native
serial and message_idStripped from deliveryNative on relevant frames
Recovery and rewindNot availableHot replay plus durable history
Mutable messagesNot availablesockudo:message.*
AnnotationsNot availableNative
Tag filtering and deltasNot availableNative
AI TransportNot availableOptional feature and runtime config

Use Protocol V1 when you need drop-in Pusher behavior. Use Protocol V2 when clients and server SDKs can rely on Sockudo-native recovery, history, mutation, annotation, filtering, and AI Transport semantics. Protocol defaults vary by SDK; check each package README before assuming V2 is enabled.

Quick Start

Docker Compose

git clone https://github.com/sockudo/sockudo.git
cd sockudo
make up

Default local services:

ServiceURL
Sockudo serverhttp://localhost:6001
Prometheus metricshttp://localhost:9601/metrics
Dashboard UIhttp://localhost:5174
Dashboard APIhttp://localhost:3460

Linux Binary

Install the latest verified x86_64 or ARM64 release into ~/.local/bin:

curl --proto '=https' --tlsv1.2 -sSfL \
  https://sockudo.io/install.sh | sh

The installer detects GNU libc or musl and verifies the archive's SHA-256 checksum. See the installation guide for version pinning and custom installation paths.

From Source

rustup toolchain install stable
git clone https://github.com/sockudo/sockudo.git
cd sockudo

cargo run -p sockudo

Build with a production-oriented feature set:

cargo build -p sockudo --release --features "v2,redis,postgres,push"

Build everything the server can expose:

cargo build -p sockudo --release --features full

Kubernetes

helm install sockudo oci://ghcr.io/sockudo/charts/sockudo --version 4.7.0

Or from a checkout, when developing the chart itself:

helm install sockudo ./charts/sockudo

Example production shape with Redis, ingress, autoscaling, and monitoring:

helm install sockudo oci://ghcr.io/sockudo/charts/sockudo --version 4.7.0 \
  --set config.adapterDriver=redis \
  --set redis.host=redis-master \
  --set redis.existingSecret=my-redis-secret \
  --set defaultApp.existingSecret=my-default-app-secret \
  --set autoscaling.enabled=true \
  --set pdb.enabled=true \
  --set ingress.enabled=true \
  --set serviceMonitor.enabled=true

When defaultApp.existingSecret is set, the Secret must contain default-app-secret and can also include default-app-id and default-app-key.

Client SDKs

Realtime clients live under client-sdks/.

SDK CI and publishing are managed from root workflows. See the 2026 SDK publishing runbook before releasing packages or changing registry setup. Registry-native packages publish through protected workflows where supported. SwiftPM packages are mirrored to standalone package repositories.

RuntimePackage
JavaScript / TypeScript@sockudo/client
AI Transport TypeScript@sockudo/ai-transport
Swift / Apple platformsSockudoSwift via SwiftPM (https://github.com/sockudo/sockudo-swift)
Kotlin / JVM / Androidio.sockudo:sockudo-kotlin
Flutter / Dartsockudo_flutter
.NETSockudo.Client
Pythonsockudo-python

JavaScript example:

import Sockudo from "@sockudo/client";

const sockudo = new Sockudo("app-key", {
  wsHost: "127.0.0.1",
  wsPort: 6001,
  wssPort: 6001,
  forceTLS: false,
  enabledTransports: ["ws"],
  protocolVersion: 2,
});

const channel = sockudo.subscribe("public-updates");
channel.bind("price-updated", (payload) => {
  console.log(payload);
});

AI Transport example:

import { ClientSessionProvider, useView } from "@sockudo/ai-transport/react";

See client-sdks/sockudo-ai-transport-js/README.md for React, Vue, Svelte, Vercel AI SDK, and direct provider helpers.

Server SDKs

HTTP/server SDKs live under server-sdks/. They publish events, sign private and presence channel auth, authenticate users, validate webhooks, query state, and expose Sockudo-native APIs such as idempotent publishing, history, mutable messages, annotations, and push where implemented.

SDK CI and publishing are managed from root workflows. See the 2026 SDK publishing runbook before releasing packages or changing registry setup. Registry-native packages publish through protected workflows where supported. Go modules and SwiftPM publish from this monorepo with package-manager-native tags and manifests. The PHP SDK is mirrored to sockudo/sockudo-http-php for Packagist.

LanguagePackage
Node.jssockudo
Pythonsockudo-http-python
PHPsockudo/sockudo-php-server
Rubysockudo
Gogithub.com/sockudo/sockudo/server-sdks/sockudo-http-go/v2
Rustsockudo-http
Javaio.sockudo:sockudo-http-java
.NETSockudoServer
SwiftSockudo via SwiftPM (https://github.com/sockudo/sockudo-http-swift)

Node.js example:

import { Sockudo } from "sockudo";

const sockudo = new Sockudo({
  appId: "app-id",
  key: "app-key",
  secret: "app-secret",
  host: "127.0.0.1",
  port: 6001,
  useTLS: false,
});

await sockudo.trigger("orders", "order.created", { id: "ord_123" });

Python example:

from sockudo_http import Config, Sockudo

sockudo = Sockudo(
    Config(
        app_id="app-id",
        key="app-key",
        secret="app-secret",
        host="127.0.0.1",
        port=6001,
    )
)

sockudo.trigger("orders", "order.created", {"id": "ord_123"})

Server Workspace

The Rust workspace is split by responsibility:

CrateResponsibility
sockudo-protocolProtocol message types, V1/V2 prefixes, extras, wire payloads
sockudo-filterTag filtering expressions and matching
sockudo-coreShared traits, config, auth, errors, history, version store, annotations
sockudo-appApp-manager backends
sockudo-cacheCache backends
sockudo-queueQueue backends
sockudo-rate-limiterRate limiting and middleware
sockudo-metricsPrometheus metrics
sockudo-webhookWebhook delivery
sockudo-deltaDelta compression
sockudo-pushPush domain, storage, queues, providers, feedback, scheduler
sockudo-ai-transportAI Transport validation, rollup, and conformance helpers
sockudo-adapterConnections, presence, fanout, replay, recovery
sockudo-mcpModel Context Protocol server (tools, resources, prompts) and sockudo-mcp binary
sockudo-serverBinary, HTTP/WS routes, bootstrap, durable stores, push API

The Rust SDK at server-sdks/sockudo-http-rust is intentionally excluded from the root Cargo workspace so it can keep its own package and release lifecycle.

Feature Flags

Common server features:

FeaturePurpose
localIn-memory development defaults
v2Protocol V2 bundle: deltas, tag filtering, recovery
deltaDelta compression
tag-filteringServer-side tag filtering
recoverySerial and message-id recovery
ai-transportAI Transport validation and rollup surfaces
ably-compatOpt-in reduced Ably Realtime/REST facade for AI Transport compatibility; implies ai-transport
pushPush notification runtime and HTTP APIs
mcpEmbedded Model Context Protocol server for AI agents (/mcp, scoped bearer tokens)
redis, redis-clusterRedis-backed adapter/cache/queue/rate limit paths
nats, pulsar, rabbitmq, google-pubsub, kafka, iggyHorizontal adapter and queue integrations
omqBrokerless horizontal adapter integration
mysql, postgres, dynamodb, surrealdb, scylladbApp, history, version-store, and push storage backends
sqs, sns, lambdaAWS queue, notification, and webhook integrations
fullAll production integrations wired by the server

Examples:

cargo build
cargo build --no-default-features
cargo build --features "redis,postgres"
cargo build --features "v2,ai-transport,redis,postgres,push"
cargo build --release --features full

Configuration

Sockudo prefers TOML and falls back to JSON. The default local config is config/config.toml.

Minimal local shape:

port = 6001
host = "0.0.0.0"
debug = false

[app_manager]
driver = "memory"

[app_manager.array]
[[app_manager.array.apps]]
id = "app-id"
key = "app-key"
secret = "app-secret"
enabled = true

[adapter]
driver = "local"

[cache]
driver = "memory"

[queue]
driver = "memory"

Major runtime sections:

SectionPurpose
[app_manager]App credentials, policies, origin rules, namespaces
[adapter]Realtime fanout driver
[cache]Shared cache for auth, recovery, and cross-node state
[queue]Background queue driver
[history]Durable channel history
[versioned_messages]Mutable message storage and versioning
[presence_history]Retained join/leave transitions
[annotations]Annotation publish, delete, summaries, raw streams
[push]Push providers, quotas, retries, feedback, scheduler
[ai_transport]AI Transport validation and channel scoping

Reference docs:

AI Transport

AI Transport is default-off and Protocol V2-only. Enable it with both Cargo and runtime config:

cargo build -p sockudo --features "v2,ai-transport,redis,postgres,push"
[versioned_messages]
enabled = true

[history]
enabled = true

[ai_transport]
enabled = true

[[ai_transport.channels]]
prefix = "ai:"

Operational rule: append rollup only changes WebSocket egress. Persistence, version storage, history, recovery, push, and webhooks still see every original mutation.

Useful docs:

MCP for AI Agents

Sockudo exposes a Model Context Protocol (MCP) server so agents can inspect channels, read history and presence, publish events, mutate versioned messages, manage push, and triage incidents through scoped, audited tools. Build with --features mcp and enable [mcp] with bearer tokens, or run the standalone sockudo-mcp binary over stdio against any deployment:

cargo install --path crates/sockudo-mcp --features cli
claude mcp add sockudo -- sockudo-mcp --url https://rt.example.com --app app-1:key:secret

See MCP server.

Development

Server checks:

cargo fmt --all
cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings

Focused server checks:

cargo test -p sockudo-core
cargo test -p sockudo-adapter
cargo test -p sockudo-ai-transport
cargo test -p sockudo-push

Presence correctness and performance gate:

scripts/presence-bench-guard.sh

The gate compares authoritative enter/leave against the former facade-map cycle in the same Criterion run. It fails if either the single-worker or eight-worker disjoint-client confidence interval is slower.

AI Transport checks:

scripts/ai-transport-bench-guard.sh
AIT_CONFORMANCE_OFFLINE=1 scripts/ai-conformance-node.sh
make ably-compat-test
make ably-ai-transport-test
make ably-ai-demo

Pinned cross-SDK and released-binary evidence:

cd sockudo-compatibility
make conformance strict-completeness browser-conformance browser-strict
make go-conformance ait-conformance
# After publishing a tag with detached checksum assets:
SOCKUDO_RELEASE_TAG=vX.Y.Z make release-verify

The opt-in Ably targets exercise the pinned Ably REST and WebSocket surface, excluding Live Objects and all non-WebSocket realtime transports, using local Sockudo as the endpoint. The compatibility runtime lives in crates/sockudo-ably-compat and reuses native Sockudo auth, publish, history, recovery, presence, annotation, stats, and push services. Node defaults, browser, strict-pending, and AI Transport are independent evidence lanes; a pass in one is not a pass in another. The dated release status and scope limits are in the compatibility scorecard under docs/ably-compat/ and the reports under sockudo-compatibility/. Do not use these targets to claim full Ably platform compatibility.

Sockudo and this compatibility layer are community-built and community-maintained. They are not Ably products, and Ably does not provide support for them. Use Sockudo's issue tracker, discussions, Discord, or other support channels listed below for help.

Docs checks:

cd docs
npm run types:check
npm run build

SDK checks are covered by SDK CI and are also package-local when iterating. Start from the 2026 SDK publishing runbook, then use the native package manager: bun, pnpm, npm, pytest, cargo, go test, gradle, swift test, dotnet test, composer, or bundle.

Deployment Profiles

ProfileAdapterCacheQueueApp storeTypical use
Local developmentlocalmemorymemorymemoryFast single-node iteration
Small productionredisredisredispostgres or mysqlSimple shared state
High trafficredis-clusterredis-clusterexternal queueSQL or DynamoDBLarger fanout and retention
AI Transporthorizontal adaptershared cacheshared queueshared history and version storeStreaming recovery and rollup

For horizontal adapters, do not assume memory history, memory version stores, or process-local cache are safe. AI Transport startup intentionally rejects invalid horizontal/shared-state combinations.

Documentation

Sponsors

SWAG LiveCaller

Contributing

  1. Fork the repository.
  2. Create a focused branch.
  3. Make the smallest coherent change.
  4. Run the relevant checks.
  5. Open a pull request with the behavior change, verification, and any follow-up risk.

For coding-agent work, read AGENTS.md. For a compact technical map of the repo, read CLAUDE.md.

License

Sockudo is licensed under the MIT License. Individual SDK packages may also carry their own package metadata and notices; check the SDK directory before publishing.

Support

abbly
broadcasting
pusher
realtime
rust
rust-lang
websocket
websockets
ws

Project health

crates.io

Latest release

5.1.0 · Oct 1, 2026

Releases this year

26

Significant stargazers

Felix-Ayush

654 followers · starred Jul 2026

Joel Parker Henderson

1,745 followers · starred Feb 2026

Zoltán Szőgyényi

491 followers · starred Jun 2025

Nathan Walker

712 followers · starred Mar 2026