Blazingly fast pusher drop-in replacement written in rust
Blazingly fast pusher drop-in replacement written in rust
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.
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.
sockudo: events, serials, message IDs, recovery, rewind, tags, deltas, and
mutable message events.until_attach history reads, and
degraded/reset-required continuity state.ably-compat facade exposing a reduced Ably AI Transport compatibility surface for
tested AI Transport workloads.…The SDK directories preserve their original repository names so package metadata, release scripts, and issue references remain recognizable.
| Capability | Protocol V1 | Protocol V2 |
|---|---|---|
| Event prefixes | pusher: / pusher_internal: |
sockudo: / sockudo_internal: |
| Pusher compatibility | Strict compatibility target | Sockudo-native |
serial and message_id |
Stripped from delivery | Native on relevant frames |
| Recovery and rewind | Not available | Hot replay plus durable history |
| Mutable messages | Not available | sockudo:message.* |
| Annotations | Not available | Native |
| Tag filtering and deltas | Not available | Native |
| AI Transport | Not available | Optional 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.
git clone https://github.com/sockudo/sockudo.git
cd sockudo
make upDefault local services:
| Service | URL |
|---|---|
| Sockudo server | http://localhost:6001 |
| Prometheus metrics | http://localhost:9601/metrics |
| Dashboard UI | http://localhost:5174 |
| Dashboard API | http://localhost:3460 |
Install the latest verified x86_64 or ARM64 release into ~/.local/bin:
curl --proto '=https' --tlsv1.2 -sSfL \
https://sockudo.io/install.sh | shThe 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.
rustup toolchain install stable
git clone https://github.com/sockudo/sockudo.git
cd sockudo
cargo run -p sockudoBuild 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 fullhelm install sockudo oci://ghcr.io/sockudo/charts/sockudo --version 4.7.0Or from a checkout, when developing the chart itself:
helm install sockudo ./charts/sockudoExample 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=trueWhen defaultApp.existingSecret is set, the Secret must contain default-app-secret and can also
include default-app-id and default-app-key.
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.
| Runtime | Package |
|---|---|
| JavaScript / TypeScript | @sockudo/client |
| AI Transport TypeScript | @sockudo/ai-transport |
| Swift / Apple platforms | SockudoSwift via SwiftPM (https://github.com/sockudo/sockudo-swift) |
| Kotlin / JVM / Android | io.sockudo:sockudo-kotlin |
| Flutter / Dart | sockudo_flutter |
| .NET | Sockudo.Client |
| Python | sockudo-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.
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.
| Language | Package |
|---|---|
| Node.js | sockudo |
| Python | sockudo-http-python |
| PHP | sockudo/sockudo-php-server |
| Ruby | sockudo |
| Go | github.com/sockudo/sockudo/server-sdks/sockudo-http-go/v2 |
| Rust | sockudo-http |
| Java | io.sockudo:sockudo-http-java |
| .NET | SockudoServer |
| Swift | Sockudo 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"})The Rust workspace is split by responsibility:
| Crate | Responsibility |
|---|---|
sockudo-protocol |
Protocol message types, V1/V2 prefixes, extras, wire payloads |
sockudo-filter |
Tag filtering expressions and matching |
sockudo-core |
Shared traits, config, auth, errors, history, version store, annotations |
sockudo-app |
App-manager backends |
sockudo-cache |
Cache backends |
sockudo-queue |
Queue backends |
sockudo-rate-limiter |
Rate limiting and middleware |
sockudo-metrics |
Prometheus metrics |
sockudo-webhook |
Webhook delivery |
sockudo-delta |
Delta compression |
sockudo-push |
Push domain, storage, queues, providers, feedback, scheduler |
sockudo-ai-transport |
AI Transport validation, rollup, and conformance helpers |
sockudo-adapter |
Connections, presence, fanout, replay, recovery |
sockudo-mcp |
Model Context Protocol server (tools, resources, prompts) and sockudo-mcp binary |
sockudo-server |
Binary, 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.
Common server features:
| Feature | Purpose |
|---|---|
local |
In-memory development defaults |
v2 |
Protocol V2 bundle: deltas, tag filtering, recovery |
delta |
Delta compression |
tag-filtering |
Server-side tag filtering |
recovery |
Serial and message-id recovery |
ai-transport |
AI Transport validation and rollup surfaces |
ably-compat |
Opt-in reduced Ably Realtime/REST facade for AI Transport compatibility; implies ai-transport |
push |
Push notification runtime and HTTP APIs |
mcp |
Embedded Model Context Protocol server for AI agents (/mcp, scoped bearer tokens) |
redis, redis-cluster |
Redis-backed adapter/cache/queue/rate limit paths |
nats, pulsar, rabbitmq, google-pubsub, kafka, iggy |
Horizontal adapter and queue integrations |
omq |
Brokerless horizontal adapter integration |
mysql, postgres, dynamodb, surrealdb, scylladb |
App, history, version-store, and push storage backends |
sqs, sns, lambda |
AWS queue, notification, and webhook integrations |
full |
All 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 fullSockudo 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:
| Section | Purpose |
|---|---|
[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:
No open issues yet, or sync has not completed.