Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Roksonne's avatar

Laravel-Echo-Server with a node-balancer setup in production

I have an api running on Forge across several EC2 instances.

1x node balancer 2x App Servers 1x Redis Cache / Queue Server

The load balancer is setup with a LetsEncrypt SSL certificate.

I am trying to install laravel-echo-server with https so I can avoid paying the big bucks for Pusher.

I have found several guide on how to set this up on a single server, but I am not sure this will work with a multi server setup.

I would really appreciate if someone could point me to a guide explaining how to set this up in my Forge setup described above, or at least explain the basic steps needed.

Brgds, Ro

0 likes
6 replies
Mithrandir's avatar

One thing you need to keep in mind with Echo is that it requires that subsequent requests are sent to the same server to keep the connection.

This is usually handled by the load balancer setting a cookie on first connection and routing subsequent requests from the same connection to the same Echo server.

Apart from that, there really is not much for the multi server setup of Echo, as long as all servers read from the same source (Redis, I guess, you will use)

Mithrandir's avatar

Solution is to put a load balancer in front of the echo servers and make sure that it has sticky sessions so subsequent requests are sent to the same echo server (as long as it is up)

rastaman's avatar

How about using beyondcode? do you have any solutions

Please or to participate in this conversation.