Scaling a PHP application across multiple servers sounds simple:
1 server
↓
2 servers
↓
4 serversBut adding servers does not automatically make an application scalable.
My story about the web, and the world
Scaling a PHP application across multiple servers sounds simple:
1 server
↓
2 servers
↓
4 serversBut adding servers does not automatically make an application scalable.
That sounds simple:
Old application
↓
Rewrite everything
↓
New applicationBut real systems are rarely that easy.
You can clean up classes, separate modules, introduce better boundaries, and design a migration plan—and still hit a wall because the environment underneath the application is not what you expected.
Then traffic grows.
You add a second application instance behind a load balancer.
And suddenly strange things start happening.
Users get logged out.
Uploads disappear.
Background jobs cannot find temporary files.
One request sees state created by another server.
In the previous EvolvePHP post, I wrote about Evolve Audit.
Audit approaches an existing PHP application from the outside.
It asks:
“What can we learn about this codebase without running it?”
That is useful, but static evidence only tells part of the story.
At some point, modernization has to deal with the environment in which the application actually runs.
Which PHP version is active?
Are required extensions available?
Are important paths writable?
Are required environment variables present?
Do the assumptions in the project match the machine running it?
That is where I see Evolve Doctor fitting.
Redis.
Queues.
More servers.
Read replicas.
Containers.
Load balancers.
But infrastructure is only one part of the story.
A codebase that is difficult to reason about at small scale usually becomes more expensive to operate at large scale.
That is why I think scalability starts with coding principles long before it becomes an infrastructure problem.
A lot of architecture discussions eventually become arguments about deployment models.
Monolith or microservices?
One database or many?
Synchronous or event-driven?
PHP or Go?
Containers or serverless?
Those are useful questions.
But I think they often arrive too early.
Move the controller.
Move the business logic.
Create an API.
Deploy it separately.
Done.
Except the difficult part is usually not the code.
It is the data.
You can move code in a day. Untangling data ownership can take months.
That is why I think service extraction should begin with the database question much earlier than most teams expect.
“Which framework should we migrate to?”
The better first question is:
“What exactly are we dealing with?”
A mature PHP system can contain years of assumptions that are not obvious from looking at a few controllers.
Load balancers.
More servers.
Redis.
Read replicas.
Kubernetes.
Queues.
CDNs.
Those things matter.