In this example we are looking at the entry level to our high availability and failover services (DRaaS) utilising only 2 fairly basic physical servers and costing on average under £200/month. Our aim with the entry level is to make high availability and failover available to companies of all sizes and remove the need for high I.T. budgets that have been necessary in the past.
In the example we are using a basic Linux, Apache, MySQL and PHP, or LAMP in short, installation with 1 primary node and 1 secondary node with the intention that it would be hosting an e-commerce website for a company that needs to be highly available as any downtime for the website results in potential loss of revenue.
The 2 servers would replicate their changes to each other so that the data is identical on both servers ensuring that the experience for the end user is identical whichever server is the current active server. Our automated replication agents then use a number of different factors to determine which server should be the active copy and direct traffic towards that server.
Data replication can be performed in a number of different ways depending on the amount of data being changed and what data is being changed. If it was primarily MySQL database changes then replication only at the database level would likely suffice, however in our example a lot of images are changed on a daily basis as well as PDF invoices and e-mail correspondence are saved to folders on the server. In this scenario block level replication of the file system ensures that everything is kept current across the entire file system and also removes the need for any website changes to be made to both servers reducing administration overheads.
In the event of a failure on the primary LAMP stack our replication agents will automatically switch the secondary LAMP stack to be the active host and our BGP network will start directing traffic to the new active server within a few seconds and without any manual or DNS changes required.