The Official iPhone Unlock website uses load balancing technology. It sits atop a “cluster” of servers, so that each request is distributed across a large computer network. This results in lower process requirement on each “node” (individual server), and as our website is extremely busy, if it were hosted on one individual server, it would quickly crash and bring the web server down.
Load balancing is invisible to the end user, optimising resource use, maximising throughput, and avoids overloading of our individual web servers and databases. If a node gets overloaded, we benefit from redundancy – which means that node goes offline but immediately the other nodes in the “cluster” (the group of servers) take over the work, keeping the website online.
There are various levels of load balancing – “Round Robin DNS” is the most simple, whereby each request is simply offloaded to the next node, until nodes are run out, and then the next request goes to the first node. This is not suitable for our needs as there is no concept of load analysis and persistence of sessions.
We use a company called Cloudflare who take care of the creation of nodes, distribution and scheduling. The database is not load balanced, but thanks to aggressive caching, this is not required. Future updates to our website may require getting a load balanced database, this is a non-trivial task however.
An important part to consider when distributing requests is sessions – information that must be kept across the multiple requests in a user’s session. If this information is stored locally on one backend server, then subsequent requests going to different backend servers would not be able to find it. Therefore once a session on our website is created for a particular end user, all requests from that user go to a particular node, ensuring no data is lost.