Link to failover

We will talk more about failover in the next section, but it is important here to mention that load balancing can be used to implement a failover strategy. Here, the goal will be to try the request against another machine if the current one fails. This can be sort of seen as round-robin, but instead of using each request as a trigger for the iteration over the hosts (to change targeted instance), a failure would be the trigger. Here is an example sequence using the failover strategy, considering that we have the same three hosts as in the round-robin part:

Request number
Selected server
Status
1
server1.company.com
OK
2
server1.company.com
OK
3
server1.company.com
OK
4
server1.company.com ...

Get Java EE 8 High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.