Multiple Datacenter Load Balancing
Background. As a technology solutions company, we have an extensive depth of knowledge in development, and also a very strong background in hosting. In this article, I’d like to highlight an innovative hosting solution that we developed for a client of ours, who had some very rigorous requirements for their web application.
The client was Ripe Digital, who approached us, needing a solution for their content-heavy, video website, involving hosting and development. They had no tolerance for downtime and tasked us to propose a reliable, redundant hosting solution to ensure that their site would enjoy extremely high up-time.
Although the bulk of the sites bandwidth usage would be dedicated to video content, many other types of content were to be included. The site was to feature user generated content, podcasts, content, as well as a mobile-compatible version of the website, and an email marketing tool in the back end, and much more.
Solution. To start with, we wanted the hosting solution to have geographic redundancies built in. We decided to host the website across two data centers, one here in Los Angeles, and the other in Texas. The servers in Texas were under a managed hosting solution, while the ones in LA were collocated and under our management.
The servers in Texas were designed to host the static content - images and static pages, and it was optimized to give more memory to Apache in order to handle all the incoming static requests. The LA servers were built to host the dynamic PHP files, and so they were optimized to lend memory to PHP for dynamic allocation. Our database was mirrored and balanced as well, between two servers. We had a simple round robin algorithm for scheduling traffic between the four servers.
Synchronization was important for us, as we wanted development and continuous maintenance to be a seamless process. Immediate FTP synchronization was enabled in the content management system, with deleted files also being sync’d. We also had an automated synchronization between the staging and live servers, to ensure that what we were testing against was identical to the live site.
While we initially used a heartbeat to monitor server statuses, we replaced that with custom software to handle monitoring more efficiently.
Results. What we ended up with was a robust hosting environment that allowed for our client to enjoy good traffic increases, with 99.99% up-time.