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

beerbuddha's avatar

Just touching up on @fideloper response on scaling DB. Taking the AWS approach (which you can mimic in forge by constructing different servers)

in AWS a server is called an EC2 instance. For databases - they have a dedicated optimized server called RDS. They have different categories of EC2 servers dependant on the type of computation (M3 vs C3) and also different HDD, RAM, also network pipe.

One of the architectural project I had to deal with was: You would go multi server (ie horizontal scaling) for the following reason

  1. Availability (mentioned) - could be taken as region distribution if you have slaves running for read on different regions
  2. Redundancy: if you are working with nosql options like cassandra
  3. separate your ressources (prevent from vertical scaling ie cpu/ram due to DB) from having a single point of bottleneck. I.E: if you run a report intensive DB you shouldnt be coupling it with a front facing application to the users on the same server

The entire microservice architecture utilises this concept heavily where you can have mini servers utilizing 1 DB (or multi) for their own dedicated services. With this you can scale according to your needs per service. Obviously the more servers you have the cost goes up, so if you have a simple app - keep it to one and the same and when you have more traffic then you can ramp up the architecture.

What I would LOVE is to have Forge + AWS full integration of Ec2 servers so i can stop using aws console to do everything. It would be a dream

1 like
dahall4's avatar

+1. Would love to see how Jeffery Way would do this! In the meantime, I just wrote a fairly extensive guide to how to properly set up networked servers using Forge in a reply here on Laracasts: Check it out!

2 likes
devchops's avatar

+1

Desperately in need of a laracast on this topic!

Previous

Please or to participate in this conversation.