Menu

1 / 2

Laravel Broadcasting: run Reverb yourself, or use a hosted service?

DEV Community: laravel·Hibira·11 days ago
#G7j7xwWI
#devtolaravel#devto#dev#reverb#hosted
Reading 0:00
15s threshold

Laravel Broadcasting gives you two good ways to push events to browsers. You can run Laravel Reverb , the WebSocket server the Laravel team released with Laravel 11, or you can point the pusher driver at a hosted service such as Pusher or Hibira. Both speak the Pusher protocol, and both work with Laravel Echo and pusher-js. Your events, channels and routes/channels.php don't change.

So the question isn't which one your code supports. It's who runs the WebSocket server.

What running Reverb asks of you

Reverb is a long-running PHP process built on an event loop. Getting it working locally is one command:

php artisan install :broadcasting php artisan reverb:start

Enter fullscreen mode

Exit fullscreen mode

Production takes more:

A process manager. Reverb has to stay up, so it runs under Supervisor or systemd and restarts on deploys.

TLS and a proxy. Browsers need wss:// , so Reverb usually sits behind Nginx or a load balancer that terminates TLS and upgrades the connection.

Server limits.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.