Web App: High Availability / How to prevent a single point of failure?

Load BalancingHigh AvailabilityCluster ComputingUptime

Load Balancing Problem Overview


Can someone explain to me how high-availability ("HA") works for a web application ... because I assume HA means that there exist no single-point-of-failure.

However, even if a load balancer is used- isn't that the single point of failure?

Load Balancing Solutions


Solution 1 - Load Balancing

I have found this article on the subject: http://www.tenereillo.com/GSLBPageOfShame.htm

Basically if you do not require long lasting sticky sessions you can configure your DNS servers to return multiple A records (IP addresses) for your website.

Web browsers are smart enough to try all the addresses until they find one that works.

Solution 2 - Load Balancing

In simple words high availability can be defined as running a system 24*7 without a downtime even if there are hardware and software failures. In other way a fault tolerance application. This helps ensure uninterrupted use of the application for it’s intended users.

enter image description here

Read more on High Availability Deployment Architecture

Solution 3 - Load Balancing

It works the following way that you setup two HA Proxy servers with heartbeat, so when one fails (stops responding to queries), it's being removed from the cluster. Requests from HA Proxy can be forwarded to web servers in round robin fashion, and if one web server fails, HA Proxy servers do not try to contact it until it's alive. Web servers are storing all dynamic information in database, which is replicated across two MySQL instances. As you can see, HA Proxy and Cluster MySQL (or simply MySQL replication) as well IP Clustering here is the key.

example high availabibility cluster

Solution 4 - Load Balancing

Sure it is when operated alone. Usual highly available setup includes 2 or more load balancers running in cluster in either active/active or active/passive configuration. To further increase the availability you can have 2 different Internet Service Providers (or geo distributed datacenters) each running a pair of clustered load balancers. Then you configure DNS A record resolving to 2 distinct public IP addresses which guarantees round-robin processing splitting DNS requests evenly (CloudFlare is very fast and reliable at this). There's also possibility to return IP address of datacenter closest to your originating geo location by using something like PowerDNS dnsdist This is what big players do to make their services highly available.

Please read https://docs.oracle.com/cd/E23824_01/html/821-1453/gkkky.html for more clearity. Actually both load balancer uses same vip(Virtual IP Address. https://techterms.com/definition/vip).

Solution 5 - Load Balancing

HA architecture is a entire field and multiple books were written on it, so it is hard to answer in a short paragraph.

To sum up the ideal situation, you would be using multiple servers, interconnected to a layer of multiple load balancers. The nodes and LB will be located in a few different data centers, and connected to different network backbone. Ideally the data centers will be located all over the world.

In short, all component will have redundancy, including the load balancers.

For a starting point, see Wikipedia for High Availability Cluster

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionnickbView Question on Stackoverflow
Solution 1 - Load Balancinguser677686View Answer on Stackoverflow
Solution 2 - Load BalancingTechieView Answer on Stackoverflow
Solution 3 - Load BalancingAndrewView Answer on Stackoverflow
Solution 4 - Load Balancingdeepak goyalView Answer on Stackoverflow
Solution 5 - Load BalancingDesmond ZhouView Answer on Stackoverflow