Repository navigation
Sockudo 5.2.0 adds Apache Iggy cluster support and fixes several reliability problems reported in production: leaked connections after pong timeouts, Redis subscribers that silently stop receiving, lost presence webhooks on shutdown, and cross-node broadcasts dropped by newly started nodes. Idle connections also use about 43% less memory, and three TLS certificate-trust advisories are fixed.
Protocol V1 Pusher compatibility is unchanged.
⚠️ Upgrade notes
iggydeployments: the Iggy SDK moves from 0.10 to 0.11, which requires Apache Iggy server 0.9 or newer. Iggy 0.8.x and 0.9 do not share a wire protocol, and Iggy 0.9 starts from a fresh data directory. Upgrade the Iggy servers before you roll out this release. The bundled compose files now pinapache/iggy:0.9.0.- Shutdown takes longer: after the listener grace period, graceful shutdown now waits for presence cleanup and webhook delivery, bounded by
queue.reliability.shutdown_timeout_ms(30 s by default). Raise your supervisor timeout (for example, KubernetesterminationGracePeriodSeconds) to cover listener grace, this drain, and queue worker shutdown. - Rate limiting behind proxies: with
trust_hops = 0, bothX-Forwarded-ForandX-Real-IPare now ignored. If you relied onX-Real-IPat zero, settrust_hopsexplicitly (1behind NGINX,2behind a Google external Application Load Balancer) and block direct access to Sockudo. Otherwise every proxied client shares the proxy's rate-limit bucket. - Publishing while draining: on a node without a horizontal adapter,
/eventsand/batch_eventsnow return503with codedrainingand aRetry-Afterheader during shutdown, instead of200for events that no subscriber would receive. Publishers should retry against a healthy instance.
✨ Highlights
Apache Iggy VSR clusters
The iggy adapter and queue now follow the cluster leader, fail over to surviving replicas, route polls and offset commits to the partition primary, and rejoin consumer groups after membership loss. New settings:
cluster_seeds(IGGY_CLUSTER_SEEDS): extra replicas to try at startup.connect_timeout_ms(IGGY_CONNECT_TIMEOUT_MS, default 2 s): limits each dial attempt.failover_timeout_ms(IGGY_FAILOVER_TIMEOUT_MS, default 15 s): lets publishes wait out a leader election.durability/consumer_offset_durability:replicated(the default) orpersisted.
docker-compose.iggy-cluster.yml runs three Iggy replicas with three Sockudo nodes.
Graceful shutdown that loses nothing
- On SIGTERM, Sockudo closes existing connections with
4200right away, so clients reconnect even if the pod is killed during the drain window. - Presence leases, delayed
member_removedwebhooks, and the final webhook batch are drained before queue and cache connections close. - Memory-queue jobs finish before exit.
Horizontal scaling reliability
- Redis adapter: sometimes Redis disappears without closing the connection and comes back at the same address, for example during a managed resize or a network partition. Previously each node then kept publishing but received nothing until it was restarted. The subscriber connection is now pinged every
pubsub_ping_interval_ms(default 10 s) and resubscribes when a ping fails. Each resubscribe incrementssockudo_horizontal_transport_reconnections_total. - New nodes: a newly started node no longer drops its cross-node broadcasts while it is still discovering peers. Peers answer its first heartbeat right away.
Connection and presence correctness
- Pong-timeout leak: connections no longer leak after a Protocol V1 pong timeout (close code
4201). Previously,sockudo_connecteddrifted above the real socket count, memory grew, and presence channels kept members whosemember_removednever fired. Disconnect cleanup now finishes even if its caller is cancelled.tests/load/pong-timeout-leak.mjsreproduces the old leak. - Presence identities: when a socket leaves a presence channel,
member_removednow reports the identity it joined that channel with, not a socket-wide ID.
Memory and observability
- Idle WebSocket connections use about 43% less resident memory: 68 KiB → 39 KiB per connection at 10,000 idle connections.
- OpenTelemetry fixes:
- The configured
service_nameis now exported instead ofunknown_service:sockudo. - Health probes and
/metricsscrapes no longer create root spans. - Horizontal adapter consumer spans are now exported in release builds, so a trace continues onto the nodes that deliver the message.
- The configured
- Client authentication failures on socket messages are logged at
warninstead oferror.
🐛 Other fixes
- The memory cache driver now honors per-key TTLs. Previously every entry was kept for
cache.memory.ttl(300 s by default), so for example/channelslistings were served stale for minutes. - Rate-limit client IP extraction rejects short, malformed, or duplicated forwarded headers and falls back to the socket peer's address.
📦 Dependencies
- Security:
rustls-webpki0.103.16 andwebpki-roots/webpki-root-certs1.0.10, so TLS clients no longer trust distrusted emSign intermediates (RUSTSEC-2026-0381, RUSTSEC-2026-0382, RUSTSEC-2026-0383). sockudo-ws3.1.0.- Updated:
rustls0.23.46 (fixes acargo denyadvisory),redis1.7.1,tokio1.54,hyper1.12,rmcp3.6,lapin4.12,scylla1.9,surrealdb3.3.4,google-cloud-pubsub1.7, the AWS SDK (aws-config1.13), and others. cargo auditnow passes with no ignored advisories.- Docker images now build with Rust 1.99.
Installation
Linux installer (Recommended)
curl --proto '=https' --tlsv1.2 -sSfL \
https://sockudo.io/install.sh \
| sh -s -- --version 5.2.0Using cargo
cargo install sockudo --version 5.2.0Using Docker
docker pull ghcr.io/sockudo/sockudo:5.2.0
docker pull sockudo/sockudo:5.2.0Using Helm
helm install sockudo \
oci://ghcr.io/sockudo/charts/sockudo \
--version 5.2.0Direct Download
Linux archives and their SHA-256 checksums are attached below.
Platform Support
- ✅ Linux x86_64 (GNU)
- ✅ Linux x86_64 (musl)
- ✅ Linux ARM64 (GNU)
- ✅ Linux ARM64 (musl)
- ✅ Docker linux/amd64
- ✅ Docker linux/arm64
- 🛠️ Other platforms via
cargo install sockudo
What's Changed
- fix(server): properly close existing connections with 4200 on SIGTERM by @lilfaf in #468
- fix: connections leaking after an activity/pong timeout by @K-Leon in #470
- fix(server): refuse publishes while draining instead of acknowledging them by @K-Leon in #472
- fix(observability): OpenTelemetry service name, probe spans, and adapter consumer spans by @jedi-tal in #473
- chore(docker): bump rust from 1.98-bookworm to 1.99-bookworm by @dependabot[bot] in #474
- fix(adapter): finish disconnect cleanup when its caller is cancelled by @countradooku in #475
- fix(cache): honor per-key TTLs in the memory cache driver by @countradooku in #476
- fix(logs): downgrade recoverable auth errors in message loop to warn by @lilfaf in #477
- feat(iggy): support Apache Iggy VSR clusters in the adapter and queue by @countradooku in #478
- chore(deps): bump the cargo-minor-and-patch group with 17 updates by @dependabot[bot] in #480
- fix(adapter): resubscribe when a redis subscriber connection goes silent by @npwvestjens in #481
- perf(adapter): box large futures in the websocket connection handler by @npwvestjens in #482
- fix: upgrade rustls to fix cargo deny check by @lilfaf in #484
- Fix channel-specific presence identities on unsubscribe and disconnect by @countradooku in #485
- fix: validate forwarded IP trust for rate limiting by @countradooku in #486
- fix: drain presence cleanup and webhook delivery on shutdown by @countradooku in #487
- fix(kotlin-sdk): avoid JDK APIs missing on Android and guard the API surface by @lilfaf in #488 (released separately as Kotlin client 2.3.1)
- chore(release): prepare Sockudo 5.2.0 by @countradooku in #494
New Contributors
Full Changelog: v5.1.0...v5.2.0