Benefits of layer 7 load balancing
The main benefit of layer 7 load balancing is the ability to use and manipulate the HTTP headers in requests and responses.
When a layer 7 load balancer processes a request from a particular client for the first time, it adds a load balancer cookie to the HTTP request. The front-end load balancer checks for this load balancer cookie in each subsequent request to provide persistence, or stickiness. When we configure IBM Security Verify Access version 7.0 to use layer 7 load balancing, specify the name of this cookie for each service.
If we use a layer 7 load balancer, we have access to extra attributes that used to manipulate the HTTP requests and responses. For example, we can use the replace attributes, such as reqrep, to rewrite URLs or domain names in "Host" headers.
The available attributes for header manipulation are as follows:
- reqadd
- Adds a header to the end of the HTTP request.
- reqdel
- Headers that match a specified regular expression are deleted from the request.
- reqrep
- (Case-sensitive) Search the HTTP request line for a specified regular expression and replace any instances with a specified string.
- reqirep
- (Case-insensitive) Search the HTTP request line for a specified regular expression and replace any instances with a specified string.
- rspadd
- Adds a header to the end of the HTTP response.
- rspdel
- Headers that match a specified regular expression are deleted from the response.
- rsprep
- (Case-sensitive) Search the HTTP response line for a specified regular expression and replace any instances with a specified string.
- rspirep
- (Case-insensitive) Search the HTTP response line for a specified regular expression and replace any instances with a specified string.
The available attributes to assist with HTTP header based balancing are as follows:
- balance
hdr(<name>) Overrides the standard scheduler to enable balancing on the specified HTTP request header.
There are also generic attributes to configure connection properties for the front-end load balancer. For example, we can set values for the connection timeout, number of retries, and number of concurrent connections. For a complete list of the available attributes, see Configure front-end load balancer.
Parent topic: Front-end load balancer