Surge Protection Overview of Origin Server Load Balancing and Failover

Configuring High Availability Solutions 3-3 Figure 3–1 Load Balancing Assuming all application Web servers have an initial load of 0, Oracle Web Cache distributes the requests to www.company.com:80 and www.server.com:80 in the following manner: ■ Oracle Web Cache distributes the requests to www.company.com:80 between the two application servers using round robin. Oracle Web Cache distributes the requests to company-host1 and company-host2 between the two application servers so that they maintain an equal load. The first request is sent to company-host1. The second request is sent to company-host2 if company-host1 is still processing the first request. The third and subsequent requests are sent to the application server that has the highest weighted available capacity. When the capacities are equal, Oracle Web Cache uses round robin to distribute requests. Application Servers company1-host company2-host Oracle Web Cache Web Browser Web Browser Web Browser Web Browser Incoming Requests to www.company.com:80 Incoming Requests to www.server.com:80 Capacity:50 Capacity:50 Application Servers server1-host server2-host server3-host Capacity:150 Capacity:50 Capacity:50 Load balancing of requests Load balancing of requests Site: www.server.com:80 Site: www.company.com:80 3-4 Oracle Fusion Middleware Administrators Guide for Oracle Web Cache ■ Oracle Web Cache distributes the requests to www.server.com:80 between three origin servers using the weighted available capacity percentage. The first request to www.server.com:80 is sent to server-host1, because it is the first in the configured list. The second request is sent to server2-host, because server-host1 is still processing the first request and has a weighted available capacity of 99.3 percent and server-host2 has a weighted available capacity of 100 percent. The third request is sent to server-host3 because server2-host is still processing a request and has a weighted available capacity of 98 percent and server3-host has a weighted available capacity of 100 percent. The fourth request is sent to server-host1 because server-host2 and server3-host are still processing requests and have weighted available capacities of 98 percent. The fifth request is sent to server-host1 because its weighted available capacity is 98.6 percent, which is still greater than server-host2 and server-host3, respectively. When the capacities and loads are not equal, Oracle Web Cache uses the weighted available capacity to distribute requests. If requests were processed before new requests came in, then it is possible for all three origin servers to have loads of 0. In this case, Oracle Web Cache uses round robin. If you do not require caching support and need a low-cost solution to a hardware load balancer, you can configure Oracle Web Cache solely as a software load balancer. This configuration mode is useful for managing traffic to a low-volume, departmental, or test Web site. See Section 3.4 for further information.

3.1.3 Backend Failover

After a specified number of continuous request failures, Oracle Web Cache considers an origin server as failed. When an origin server fails, Oracle Web Cache automatically distributes the load over the remaining origin servers and polls the failed origin server for its current up or down status until it is back online. Existing requests to the failed origin server result in errors. However, new requests are directed to the other origin servers. When the failed server returns to operation, Oracle Web Cache includes it in its weighted available capacity to load balance requests. For further information about configuring the number of request failures, see Section 2.11.2 . The failover feature is shown in Figure 3–2 . An outage of server-host3, which had a capacity of 50, results in 75 percent of requests being distributed to server-host1 and 25 percent request being distributed to server-host2.