Skip to content
Laravel Backend Software Architecture

Laravel Reverb Cut My WebSocket Stack From 7 Parts to 5

Raheel Shan

Raheel Shan

November 24th, 2026 · 13 min read

Laravel Reverb Cut My WebSocket Stack From 7 Parts to 5

In the first two articles, I was dealing with Laravel WebSockets, Redis, Node.js, queues, Echo and several other pieces just to get real-time communication working.

Then Laravel introduced Reverb.

For me, the biggest difference was not that WebSockets suddenly became simple.

It was that I no longer had to assemble the WebSocket server from different third-party projects.

Reverb is built for Laravel and speaks the Pusher protocol, so it also fits into the Echo setup I was already using.

Installing Reverb

The installation is straightforward:

php artisan install:broadcasting

Laravel asks which broadcasting setup you want, installs Reverb, publishes its configuration, adds the required environment variables, and sets up the frontend broadcasting configuration.

Then you start the server:

php artisan reverb:start

That removes quite a few things from the old setup.

There is no Redis requirement for a single-server setup.

There is no Predis package just for broadcasting.

There is no Node.js Echo server.

There is no separate third-party WebSocket repository to maintain.

The environment configuration looks something like this:

BROADCAST_CONNECTION=reverb

REVERB_APP_ID=...
REVERB_APP_KEY=...
REVERB_APP_SECRET=...
REVERB_HOST=localhost
REVERB_PORT=8080
REVERB_SCHEME=http

And Echo still uses pusher-js:

import Echo from 'laravel-echo';
import Pusher from 'pusher-js';

window.Pusher = Pusher;

window.Echo = new Echo({
    broadcaster: 'reverb',

    key: import.meta.env.VITE_REVERB_APP_KEY,

    wsHost: import.meta.env.VITE_REVERB_HOST,
    wsPort: import.meta.env.VITE_REVERB_PORT ?? 80,
    wssPort: import.meta.env.VITE_REVERB_PORT ?? 443,

    forceTLS:
        (import.meta.env.VITE_REVERB_SCHEME ?? 'https') === 'https',

    enabledTransports: ['ws', 'wss'],
});

This part is important.

Reverb speaks the Pusher protocol, so I did not have to throw away the Echo code I already had.

Existing calls such as:

Echo.private(...)
    .listen(...)

and:

Echo.join(...)

continue to work with Reverb.

That made the migration much easier.

The stack became smaller

In article 1, I had seven different pieces involved in the setup.

With Reverb, the core setup became:

  • Laravel application
  • Queue worker
  • Reverb process
  • laravel-echo
  • pusher-js

That is a much better starting point.

Redis is no longer required for a single-server setup.

It becomes relevant when you want to run Reverb across multiple servers.

For example:

REVERB_SCALING_ENABLED=true

Reverb can then use Redis pub/sub to distribute messages between the Reverb servers.

So Redis is still part of the picture when you need scaling.

It is just no longer something I need to install simply because I want WebSockets.

That is an important difference.

Why Reverb feels better

One project to maintain

The older setups depended on third-party WebSocket projects.

That was one of the things I disliked about the architecture.

Your Laravel application could be using the latest Laravel version while the WebSocket package was following a completely different maintenance cycle.

Reverb is part of the Laravel ecosystem.

That does not magically remove every maintenance problem, but at least the WebSocket server is designed around Laravel rather than being something I have to fit into Laravel.

One language

The old laravel-echo-server approach brought Node.js into the application.

Now the WebSocket server itself runs with PHP.

I already have PHP.

I already know how to deploy PHP processes.

I do not need another runtime just for the WebSocket server.

That removes another thing from the deployment and monitoring setup.

Debugging is easier

Reverb has a debug mode:

php artisan reverb:start --debug

This gives me connection and message information directly in the terminal.

That is useful when debugging real-time features.

In the older setup, a stopped process or incorrect configuration could leave the main application working normally while real-time simply stopped.

With debug output, I can at least see what Reverb is doing.

Restarting after deployment

Reverb also provides:

php artisan reverb:restart

This is useful because the WebSocket process is long-running.

A normal PHP request starts with the latest application code.

A long-running WebSocket process does not.

If I deploy new code and leave the old Reverb process running, it can continue using the previous application state.

Having a Laravel command specifically for restarting Reverb makes this part of deployment much cleaner.

Reverb did not remove the operational work

This is where I would not describe Reverb as a magic solution.

It removed a lot of the unnecessary pieces.

It did not remove the responsibility of running a real-time server.

In production, I still need to deal with a few things.

Supervisor

Reverb is a long-running process:

php artisan reverb:start

If that process stops, real-time stops.

So I still need something such as Supervisor to keep it running and restart it when necessary.

Reverse proxy and SSL

If the application is running over HTTPS, the WebSocket connection also needs to use the correct secure setup.

I still need Nginx or another reverse proxy to handle the WebSocket connection correctly.

The browser will not happily allow an insecure ws:// connection from an HTTPS page.

So this part of the old deployment problem is still there.

File descriptor limits

Every WebSocket connection stays open.

That means the server has to keep file descriptors available for those connections.

For an application with a small number of users, the default limits may never become an issue.

For a busy real-time application, they eventually matter.

Queue worker

Reverb does not change Laravel's queue behaviour.

If my event implements ShouldBroadcast, the broadcast still goes through the queue.

So if the queue worker is stopped, the event does not magically reach Reverb.

The same problem from article 1 still exists:

Laravel event
    ↓
Queue
    ↓
Reverb
    ↓
Browser

If the queue is not running, the message does not get there.

What about whispers?

Reverb supports client events as well.

So the code from the previous article still looks familiar:

Echo.private(`chat.${roomId}`)
    .whisper('typing', {
        name: user.name
    });

But Reverb does not change what a whisper actually is.

The whisper still goes between connected clients on the channel.

Your Laravel application does not receive it.

Your database does not receive it.

And if the other user is offline, there is nothing waiting for them.

So Reverb solved one problem:

How do I run the WebSocket server without all the old pieces?

It did not solve the other problem from article 2:

How does the browser call my Laravel application through the WebSocket connection?

I still had two practical options.

Send the data to Laravel over HTTP.

Or build another mechanism to receive the client event on the server.

Neither was the clean server-side communication model I was looking for.

Where Reverb left me

Reverb made the infrastructure much cleaner.

Instead of installing a WebSocket server from another project, running Node.js, configuring Redis and maintaining several separate processes, I now had a Laravel-native WebSocket server.

That is a big improvement.

But it also made something else clearer.

The real problem was no longer the WebSocket server.

Reverb had solved that part.

The remaining question was how to build a real-time application where the client could communicate with the server over the same connection, without falling back to HTTP for every message.

That brings me back to the architecture I was already familiar with from SignalR.

Before getting there, I want to show the way I made it work on this stack: a Laravel process that listens on Redis and receives what the browser sends.

That is article 4.

Previous: Why Laravel Echo Whispers Never Reach Your Server

Next: Two-way communication in Laravel with WebSockets and Redis, and what it costs to keep it running.

Comment "REDIS" if you want the next article when it is live.

Found this useful?

Support the work that goes into these posts.

Support
Comments


Comment created and will be displayed once approved.