Traffic is load balanced among available servers in a cluster. There are several configurable variables including the protocol being load balanced, load balancing algorithm, method of session persistency, and health checking.
Cluster Protocol: HTTP or TCP (Layer 4 Load Balancing)
The Maestro AFE inherently operates at the application (HTTP) layer, functioning as a full proxy. The Maestro therefore, sees an application as a series of requests and responses, instead of only packets and TCP sessions—like a traditional Layer 4 Load Balancer.
Functioning at the HTTP level also enables the Maestro to perform advanced load balancing functions like L7 Switching and Redirection, while simultaneously having the ability to compress response data in real time and secure an application with SSL. The Maestro AFE is capable of performing load balancing for non-HTTP applications that run over the TCP protocol as well. Non-HTTP load balancing is performed at layer 4 (TCP) and on a per-connection basis.
Layer 4 load balancing is still performed using TCP termination. The Maestro AFE will terminate all TCP connections that need layer 4 load balancing services, thus allowing them to use the device’s advanced TCP services such as FastTCP and buffering. These services will help the TCP connections perform more optimally.
With layer 4 load balancing, since client-side connections are terminated by the Maestro AFE, server-side connections are initiated by the device. Since there is no connection consolidation for non-HTTP connections (i.e. no multiplexing), there will be a 1-to-1 relationship between client-side and server-side connections. However, the server-side connections will still carry the source IP address of the original client, in order to allow server logging mechanisms to operate as before. This means that TCP servers must guarantee their path back to the client through the Maestro AFE. This is often done by configuring the IP address of server-side interface of the Maestro AFE to be the default gateway of the server. This way, all response traffic from the server will flow through the Maestro AFE to assure proper TCP connection handling.
To configure Layer 4 Load Balancing, the following steps must be followed:
Each cluster that is configured with non-HTTP servers will be configured as a TCP cluster, rather than an HTTP cluster.
The real servers within the TCP cluster must be configured to route return traffic back through the Maestro AFE. This is accomplished by configuring the servers default route (or network specific route) to route through the Maestro AFE physical IP interface (or VRRPc interface if redundantly deployed).
A TCP virtual server can only be bound to a single cluster. That cluster must be configured as a TCP cluster. Also, no SSL or compression services are available to TCP virtual servers or TCP clusters.
Load Balancing Algorithms
The algorithm represents the logic by which application requests will be distributed to available servers in a cluster. Four options exist:
Round Robin (RR) – Application requests are forwarded in a cyclical fashion to each available server.
Weighted Round Robin (WRR) – Similar to Round Robin in that requests are cyclically distributed among available servers, however they are forwarded based on each
server’s configured weight. Servers are configured with a weight, or metric, between 1 and 100. The higher the weight, the greater priority, or amount of traffic a server should receive relative to other lower weighted servers.
Weighted Least Pending Requests (WLPR) – For HTTP Clusters only. The Maestro AFE is fully application aware—knowing the status of each outstanding client request and the servers subsequent response. This application level intelligence enables the Maestro AFE to make extremely accurate load balancing decisions based on real-time application knowledge of each servers pending request load.
Weighted Least Connections (WLC) – For TCP Clusters. When performing in TCP mode (Layer 4 Load Balancing), the Maestro AFE keeps track of the number of
individual TCP connections load balanced to each server within a cluster. The Maestro can make load balancing decisions based on a combination of the server’s configured weight as well as the number of connections currently established with each server.
Server Response Time (SRV-RSP-TIME-BASED) – The Maestro AFE calculates the server’s response time as it receives updates from the server health check mechanism regarding the servers in the cluster. The load balancing process distributes a high percentage of the load to the fast servers, enabling them to receive more traffic and a small percentage of the load to the slow servers, enabling them to receive less traffic.
In addition, each cluster has a Stop Traffic Factor (STF) parameter, which removes very slow servers from being eligible for traffic distribution. When a server’s response time is greater than STF multiplied by the response time of the fastest server, the server is no longer eligible for new requests. STF has the value of three by default, but can accept
To configure load balancing algorithm from the CLI Command Syntax:
load-balancing algorithm { wlpr | wlc | wrr | rr }
load-balancing algorithm { wlpr | wlc | wrr srv-rsp-time-based}
Prompt level - Configure - Farm - Cluster Example commands:
cluster "Cluster-1">load-balancing algorithm rr
Example of enabling load balancing based on the server’s response time:
cluster "Cluster-2">load-balancing algorithm wrr | wlpr srv-rsp-time-based
Example of disabling load balancing based on the server’s response time:
cluster "Cluster-3">load-balancing algorithm wrr | wlpr no srv-rsp-time-based
Example of setting STF:
cluster "Cluster-4">load-balancing algorithm wrr | wlpr srv-rsp-time-based stop-traffic-factor “4”
To configure load balancing algorithm from the GUI
1. Once logged in through the GUI, click on the Configuration button on the left panel.
2. In the Topology window, expand the Servers Topology icon by clicking the + symbol and then clicking the Farm icon. The Farm window appears.
Figure 44: Adding a Cluster
3. Click the New button. The Add New Cluster window appears.
4. Specify a Cluster Name and Protocol for the cluster.
Ensure that the health check is enabled. Otherwise, the Server Response Time mode is disabled.
When the Load Balance Algorithm is set to RR, the server response mechanism is disabled.
When Use Server Response Time is set to Disable, the Stop Traffic Factor field is disabled.
Figure 46: Configuring Load Balancing Parameter
Persistency
Some applications require that a client communicate with the same server in a load balanced cluster throughout the duration of their session. This functionality is called persistence, as each new connection from the same client should be kept persistent, or
“sticky” to the same server. The persistency mechanism of the Maestro AFE offers several settings:
None – No persistence is enabled for the cluster. All requests are distributed via the configured load balancing algorithm.
By IP Address – The Maestro AFE will identify a client by the Source IP address.
When configured, the first request from a client will be load balanced to the best server.
Subsequent requests from the same Source IP address will remain persistent to the chosen server.
request from the client will include the inserted data which the Maestro AFE will use to identify which server to forward the request to, thus maintaining persistency
throughout the duration of the client’s session.
To Configure Persistency Method from the CLI
Command Syntax:
load-balancing { persistency | no-persistency } [ by-ip | application-level-persistency ]
Prompt level - Configure - Farm - Cluster Example commands:
cluster "Cluster-1">load-balancing persistency by-ip cluster "Cluster-1">load-balancing no-persistency To Configure Persistency from the GUI
Enter the Configuration mode and select the desired cluster, as described in To add farms from the GUI on page 106.