Introduction to Clustering in PHP
What on earth is Clustering?
An extremely simplified definition of clustering could well be having multiple computers working together to get a single goal. Typically you notice with distributed computing applications (network object rendering of graphics, protein folding, and many others.), but in the web world it pertains to having multiple servers providing an online site or service. In practice, on the other hand, this can be more complicated particularly when coupled with incorrect ideas close to what clustering truly is.
Load balancing is the first task in setting up a clustered environment for just a web application. For those connected with you unfamiliar, load balancing involves having a master node of which accepts web requests, and funnels the crooks to a farm of web servers to truly process the request.
For a cluster to be effective, not only do we should load balance, but we should share the user sessions across all nodes. PHP is a lttle bit unique in the sense which the session information is stored around the file system. To get right PHP session sharing, every node essentially needs having access to the other node's file system.