Laravel Reverb
A first-party, blazing-fast WebSocket server for real-time Laravel broadcasting
Repository Health
Technical Analysis
Laravel Reverb is the framework’s official WebSocket server, giving Laravel applications a self-hosted, Pusher-protocol-compatible real-time backend without depending on a third-party hosted service. It’s started via a single Artisan command (reverb:start), integrates directly with Laravel’s existing broadcasting and Echo client tooling, and requires no separate infrastructure beyond PHP and, for horizontal scaling, Redis.
Reverb implements the Pusher channels protocol so existing Laravel Echo front-end code and Pusher-compatible client libraries work against it unmodified. For multi-server deployments it uses Redis pub/sub to synchronize connections and broadcasted events across processes, and it ships with Laravel Pulse integration for monitoring connection counts and message throughput in production.
What You Get
- An Artisan-launched WebSocket server (
php artisan reverb:start) implementing the Pusher channels protocol - Drop-in compatibility with Laravel Echo and existing Pusher-protocol client SDKs
- Redis pub/sub-backed horizontal scaling across multiple Reverb server processes
- TLS/SSL support and configurable connection limits, message size limits, and application credentials
- Built-in Laravel Pulse cards for monitoring live connection counts and message throughput
- Support for both public, private, and presence channels with standard Laravel authorization
Common Use Cases
- Powering live notifications, chat, or activity feeds in a Laravel app without a third-party WebSocket vendor
- Broadcasting job/queue progress updates to a browser client in real time
- Replacing a paid Pusher or Ably subscription with self-hosted infrastructure to control cost and data residency
- Building collaborative or presence-aware features (who’s online, live cursors) via presence channels
Under The Hood
Architecture — Reverb’s core is src/Servers/Reverb, an event-loop-driven server built on ReactPHP-style non-blocking I/O, layered under src/Protocols/Pusher which implements the Pusher channels wire protocol (connection handshake, channel subscribe/unsubscribe, presence-channel member tracking). ApplicationManager.php resolves per-application credentials/config, Connection.php models a single client socket, and src/Jobs/src/Events bridge Laravel’s broadcast() calls into messages pushed to connected sockets. Horizontal scaling runs through a Redis pub/sub adapter that fans broadcast events out to every Reverb process. Tech Stack — PHP 8.2+, built on clue/redis-react for async Redis, guzzlehttp/psr7 for HTTP parsing, pusher/pusher-php-server for protocol compatibility helpers, and Laravel’s illuminate/console/illuminate/http contracts; it registers as a standard Laravel service provider (ReverbServiceProvider.php). Code Quality — Tests are split into tests/Unit, tests/Feature, and a dedicated tests/Specification suite that appears to validate protocol-level conformance against the Pusher channels spec, plus tests/Helpers for shared test scaffolding — a notably rigorous structure for a real-time server where wire-protocol correctness matters. API Design — The developer-facing surface is intentionally minimal: install, configure .env credentials, run artisan reverb:start, and existing Laravel broadcasting/Echo code works unchanged, which keeps the learning curve low for teams already using Laravel’s broadcasting system, at the cost of less flexibility for non-Pusher-protocol clients.