Handling growth.
WHAT TO DO FIRST
Measure.
Establish which pages are slow and why.
WHAT USUALLY HELPS MOST
Fixing query multiplication Adding indexes Caching expensive results Enabling the opcode cache Caching configuration and routes
WHAT THAT ACHIEVES
Substantially more capacity on the same hosting.
WHAT TO DO NEXT
Move slow work to queues Serve static assets efficiently Reduce what loads on every request
WHEN TO CONSIDER MORE RESOURCES
When measurement shows the application is efficient and the hardware is the limit.
WHAT TO MOVE FIRST WHEN OUTGROWING SHARED HOSTING
The application, to a server with dedicated resources.
WHAT TO CONSIDER AFTER THAT
A separate database server A cache server Several application servers behind a balancer
WHAT THAT LAST ONE REQUIRES
Sessions and cache stored centrally, not on individual servers Uploaded files stored centrally
WHAT MOST APPLICATIONS NEVER NEED
Any of that.
WHAT TO AVOID
Adding complexity before efficiency has been addressed.