HIGH AVAILABILITY & FAILOVER SOLUTIONS


High Availability Solutions

A high availability (HA) setup is an infrastructure without a single point of failure. It prevents a single server failure from being a downtime event by adding redundancy to every layer of your architecture. A load balancer facilitates redundancy for the backend layer (web/app servers), but for a true high availability setup, you need to have redundant load balancers as well.

In this example, you have multiple load balancers (one active and one or more passive) behind a static IP address that can be remapped from one server to another. When a user accesses your website, the request goes through the external IP address to the active load balancer. If that load balancer fails, your failover mechanism will detect it and automatically reassign the IP address to one of the passive servers.


Load Balancing

The load balancer forwards requests to different backend servers based on the content of the user’s request.This mode of load balancing allows you to run multiple web application servers under the same domain and port.

In this example, if a user requests yourdomain.com/blog, they are forwarded to the blog backend, which is a set of servers that run a blog application. Other requests are forwarded to web-backend, which might be running another application. Both backends use the same database server


Scalable WordPress Installation

In this example you can see how we can create and deploy a Scalable WordPress site consisting of:

  • 1 Nginx load balancer
  • 2 Nginx web servers
  • 1 MySQL database server
  • A GlusterFS distributed filesystem

MySQL Replication

MySQL replication is a process that allows you to easily maintain multiple copies of a MySQL data by having them copied automatically from a master to a slave database.

This can helpful for many reasons including facilating a backup for the data,a way to analyze it without using the main database, or simply as a means to scale out.

In this example, two database servers will be replicating in a master-slave configuration. The WordPress servers will selectively write to the master and read from both the master and slave databases, by use of the HyperDB WordPress plugin.