Specifications
Match Functions
Equalizer Installation and Administration Guide 137
2. Regular Expressions: Some match functions have prefix, suffix, substr, or regex variants. The
regex variants interpret an argument as a regular expression to match against requests. Regular
expressions can be very costly to compute, so use the prefix, suffix, or substr variants of
functions (or Boolean combinations of prefix and suffix testing), rather than the regex function
variants, for best performance. For example, the following regular expression match:
dirname_regex("(two|four|six|eight)")
Can be replaced by the more efficient:
dirname_substr("two") ||
dirname_substr("four") ||
dirname_substr("six") ||
dirname_substr("eight")
Equalizer supports POSIX regular expression syntax only. See Appendix C, “Regular
Expression Format” for a description.
3. Supported Headers: All of the header_*(header, string) match functions take a header
argument, which selects the header of interest. If this header is not present in the request, the
match function evaluates to false. Otherwise, the text associated with the header is examined
depending on the particular function.
Although HTTP permits a header to span multiple request lines, none of the functions matches
text on more than one line. In addition, Equalizer will only parse the first instanmce of a header.
If, for example, a request has multiple cookie headers, Equalizer will only match against the
first cookie header in the request.
The list of supported headers for the header argument are as follows:
4. HTTPS Protocol Matching: Equalizer permits the construction of virtual clusters running the
HTTPS protocol. HTTPS is HTTP running over an encrypted transport, typically SSL version
2.0 or 3.0 or TLS version 1.0. All of the functions available for load balancing HTTP clusters
Table 64: Supported HTTP Headers for Matching
accept expect proxy-authorization
accept-charset from range
accept-encoding host referer
accept-language if-match te
authorization if-modified-since trailer
cache-control if-none-match transfer-encoding
connection if-range upgrade
content-length if-unmodified-since user-agent
cookie max-forwards via
date pragma warning