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

stueynet's avatar

Forge load balancers, Digital Ocean, Envoyer

Anyone have any experience with setting up a forge load balancer and deployments with Envoyer? I have a load balancer provisioned to balance load to 2 web servers. web01 and web02. I have a few questions:

  • What is the recommended method for syncing files?
  • Which of the 3 servers needs SSL?
  • How do I deploy with Envoyer to this setup?
0 likes
2 replies
michaeldyrynda's avatar
Level 41

Theoretical responses; I've not actually done this specifically myself.

What is the recommended method for syncing files?

Ideally you would use some cloud storage platform for delivery. Realistically, if you're at the point where you're balancing horizontally-scaled servers, you should be doing this anyway.

Which of the 3 servers needs SSL?

Usually you'll put the certificate on the load balancer.

How do I deploy with Envoyer to this setup?

Envoyer will be configured to deploy the same code to both web servers. It would be nice if Envoyer lets you configure multiple servers for a single deployment, as currently you need to take up two site slots for the same deployment.

If you wanted to avoid that, you might look at some clungey solution like mounting NFS shares between the two hosts or having a post-commit hook that triggers an rsync between them, but that's not going to scale very well (3, 4, 10 servers etc.)

2 likes

Please or to participate in this conversation.