How to create a high-availability application server?

Solution 1:

As your question is quite generic and doesn't give any details about the involved software, my answer is short as well: Just use a set of two loadbalancers, which share a 'virtual IP' between them via the use of e.g. vrrp (the "Virtual Router Redundancy Protocol") or pacemaker (there are more options available as well). Use two machines for that, which are either bare metal or running from two different hosts. If one of the machine goes down, the other will take over the IP. Point your record to this IP (and remember: DNS isn't made to achieve high availability.)

Edit 1: As @Ondra Sniper Flidr mentioned in the comments: Another solution is keepalived.

Edit 2: You could also have a look at CARP, the "Common Address Redundancy Protocol". A software solution using this protocol would be UCARP for example.

enter image description here

Solution 2:

Your load balancer should be made highly available, by the simple expedient of having two devices acting cooperatively. At any moment, one of the two devices is configured to have the load balancer IP address, and the two devices constantly talk to each other so the standby device knows that the active device is still operating.

In the event that the active load balancer goes down for any reason, the standby device reconfigures itself automatically to have the load balancer IP address, and it continues to balance traffic to the backend cluster.