Home Arrow Icon Knowledge base Arrow Icon Global Arrow Icon Can I use a serverless solution like Pusher or Ably with Laravel Reverb


Can I use a serverless solution like Pusher or Ably with Laravel Reverb


Yes, you can use a serverless WebSocket solution like Pusher or Ably with Laravel Reverb, although it may not be the most ideal approach:

1. Reverb is not really Vapor compatible out of the box, as Vapor is designed around a serverless mentality where you don't have to manage servers yourself[1].

2. For Vapor applications, it's suggested to use a serverless WebSocket solution like Pusher or Ably, rather than running your own Reverb server[1].

3. If you still want to use Reverb with a Vapor application, the recommended approach is to run the Reverb server on a traditional server, separate from your Vapor application. Then, you can have your Vapor application connect to the remote Reverb server[1].

4. Reverb utilizes the Pusher protocol for WebSockets, making it immediately compatible with Laravel broadcasting and Laravel Echo[3]. This means you can potentially integrate Reverb with a serverless WebSocket service like Pusher or Ably.

However, using a serverless WebSocket solution with Reverb goes against the serverless philosophy of Vapor, as you would need to manage the Reverb server separately. The more "Vapor-friendly" approach would be to use a fully serverless WebSocket solution like Pusher or Ably without running your own Reverb server[1].

In summary, while it's possible to use Reverb with a serverless WebSocket service like Pusher or Ably, it's not the recommended approach for Vapor applications. A more ideal solution would be to use a fully serverless WebSocket offering that doesn't require managing any servers yourself.

Citations:
[1] https://laravelpodcast.com/episodes/laravel-11-reverb-herd-windows-pro-other-laracon-eu-recap/transcript
[2] https://github.com/brefphp/bref/discussions/1774
[3] https://reverb.laravel.com
[4] https://www.linkedin.com/posts/laravel-news_laravel-reverb-the-new-solution-for-real-time-activity-7179055070334853120-WDSF
[5] https://www.2hatslogic.com/blog/laravel-reverb-future-real-time-web-applications/