In order to manage the success and popularity of a web site, it needs to be designed to cope with a growing number of users. Applications need to scale upwards to remain responsive during times of heavy load, and backwards to reduce TCO when costly resources are no longer needed. Our aim is to provide a timely and seamless user experience without needing to invest in a permanent platform ready for the biggest potential future traffic spike.
In this white paper, we will discuss horizontal scaling, or adding additional resources (typically servers) to an existing infrastructure and spreading the load of one or more of the subsystems out across them. Because of its "shared nothing" design philosophy, PHP excels at horizontal scaling. We'll only briefly cover vertical scaling (additional RAM, CPUs or hard disk space), as every system can benefit from having bigger servers to run on.
There are two main challenges to scaling applications horizontally:
1) Designing an application that can be scaled as and when the need arises. To do this requires some architectural planning of the system, using techniques such as:
- Breaking applications into a series of loosely-coupled subsystems tied together via APIs
- Horizontally scaling subsystems individually (as opposed to vertically scaling the entire application)
- Scaling the database by using techniques like replication, sharding or federation
2) Arriving at a system which can add and remove resources automatically.
Download this white paper to learn several strategies for horizontal scaling of PHP applications, as well as to understand the overhead required for each one. We'll also make some recommendations about the kinds of scenarios which render each strategy a useful platform choice.
Download now (free, but we ask you to leave your contact details)