Skip to content

Sockudo Guide ​

Welcome to the Sockudo guide! This comprehensive documentation will walk you through everything you need to know to get Sockudo up and running, configure it for your needs, and understand its core features.

Sockudo is a high-performance WebSocket server built in Rust that is compatible with the Pusher protocol. This means you can use existing Pusher client libraries (like Laravel Echo, pusher-js, and others) to connect to Sockudo and build real-time applications.

What is Sockudo? ​

Sockudo provides real-time, bidirectional communication between clients and servers using WebSockets. Key features include:

  • Pusher Protocol Compatibility: Drop-in replacement for Pusher with existing client libraries
  • High Performance: Built in Rust for speed and efficiency
  • Horizontal Scaling: Multiple adapters for scaling across instances (Redis, NATS, Redis Cluster)
  • Flexible Storage: Support for MySQL, PostgreSQL, DynamoDB, and in-memory app management
  • Comprehensive Features: Rate limiting, webhooks, metrics, SSL/TLS, and more
  • Docker Ready: Full Docker and Kubernetes support for modern deployments

Performance Highlights ​

Sockudo delivers exceptional performance compared to alternatives. In comprehensive benchmarks against Soketi (Node.js-based Pusher server):

  • 6.5x faster message latency: 1.84ms vs 12.01ms average
  • 8x faster 95th percentile: 3ms vs 24ms response times
  • 16% higher throughput: 2,927 vs 2,523 messages/second
  • Efficient resource usage: Superior performance with lower CPU and memory overhead

Built with Rust's zero-cost abstractions and memory safety, Sockudo handles thousands of concurrent connections while maintaining sub-5ms latency for real-time applications.

πŸ“Š View Complete Performance Benchmarks

Quick Navigation ​

Getting Started ​

Core Features ​

  • Webhooks: Set up event notifications to your application
  • Scaling: Scale Sockudo using different adapters and load balancing
  • Monitoring: Monitor performance with Prometheus and Grafana

Performance & Operations ​

Architecture Overview ​

Sockudo is designed with modularity and scalability in mind:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Client Apps   β”‚    β”‚   Load Balancer β”‚    β”‚    Sockudo      β”‚
β”‚  (Browser/App)  │◄──►│   (Nginx/HAProxy│◄──►│   Instances     β”‚
β”‚                 β”‚    β”‚   /K8s Ingress) β”‚    β”‚                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                      β”‚
                             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                             β”‚                        β”‚                        β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚    Adapter       β”‚    β”‚   App Manager    β”‚    β”‚     Cache        β”‚
                    β”‚ (Redis/NATS/     β”‚    β”‚ (Memory/MySQL/   β”‚    β”‚ (Memory/Redis)   β”‚
                    β”‚  Local/Cluster)  β”‚    β”‚  Postgres/Dynamo)β”‚    β”‚                  β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚                        β”‚                        β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚     Queue        β”‚    β”‚   Rate Limiter   β”‚    β”‚    Webhooks      β”‚
                    β”‚ (Memory/Redis/   β”‚    β”‚ (Memory/Redis)   β”‚    β”‚  (HTTP/Lambda)   β”‚
                    β”‚   SQS/Cluster)   β”‚    β”‚                  β”‚    β”‚                  β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Core Components ​

  • WebSocket Server: High-performance WebSocket handling with Pusher protocol compatibility
  • HTTP API: RESTful API for publishing events and managing channels
  • Adapters: Pluggable backends for horizontal scaling (Local, Redis, NATS, Redis Cluster)
  • App Manager: Flexible application management with multiple database backends
  • Metrics & Monitoring: Built-in Prometheus metrics for observability
  • Rate Limiting: Configurable rate limiting to protect against abuse

Why Choose Sockudo? ​

Performance First ​

  • Native Performance: Rust's zero-cost abstractions deliver optimal performance
  • Memory Safety: No garbage collection pauses or memory leaks
  • Concurrent by Design: Built from the ground up for high-concurrency scenarios
  • Proven Benchmarks: Measurably faster than popular alternatives

Production Ready ​

  • Battle Tested: Comprehensive test suite and production deployment experience
  • Horizontal Scaling: Built-in support for multiple instances with shared state
  • Monitoring: Rich metrics and observability out of the box
  • Security: Rate limiting, SSL/TLS, and authentication support

Developer Experience ​

  • Drop-in Replacement: Compatible with existing Pusher client libraries
  • Flexible Configuration: Environment variables, JSON config, or hybrid approaches
  • Clear Documentation: Comprehensive guides for all features and use cases
  • Active Development: Regular updates and community support

Getting Started ​

  1. Quick Start: Get Sockudo running in minutes
  2. Configuration: Configure for your environment
  3. Performance Benchmarks: Understand performance characteristics
  4. Deployment: Deploy to production

Support and Community ​

  • Documentation: This comprehensive guide covers all features
  • GitHub Issues: Report bugs and request features
  • Performance: See our benchmark results for performance insights
  • Examples: Real-world configuration examples throughout the documentation

Ready to build fast, reliable real-time applications? Start with our Getting Started Guide or explore the Performance Benchmarks to see what Sockudo can deliver for your use case.

Released under the MIT License.