You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Layer 7 load balancing takes its name from the OSI model, indicating that the load balancer distributes requests to back-end pools based on layer 7 (application) data.

OSI Model

OSI Model (Open Systems Interconnection Model) is a conceptual framework used to describe the functions of a networking system. The OSI model characterizes computing functions into a universal set of rules and requirements in order to support interoperability between different products and software. In the OSI reference model, the communications between a computing system are split into seven different abstraction layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application.

While layer 7 load balancing in general can theoretically be done for any well-defined layer 7 application interface, for the purposes of Octavia, L7 functionality refers only to the HTTP protocol and its semantics. Octavia accomplish the logic of layer 7 load balancing through the use of L7 Rules and L7 Policies. An L7 Rule is a single, simple logical test which evaluates to true or false. An L7 Policy is a collection of L7 rules, as well as a defined action that should be taken if all the rules associated with the policy match. 

To create a Policy you must go to your Listener, which is in turn inside the LB, and click on the Create L7 Policy button.Position of Policies

Once the Policy has been created, enter it. To create the rule set, click on the Create L7 Rule button.Position of Rules

L7 Rules

An L7 Rule is a single, simple logical test which returns either true or false. It consists of a rule type, a comparison type, a value, and an optional key that gets used depending on the rule type. An L7 rule must always be associated with an L7 policy.

Rules types

L7 rules have the following types:

  • HOST_NAME: does a comparison between the HTTP/1.1 hostname in the request against the value parameter in the rule.
  • PATH: compares the path portion of the HTTP URI against the value parameter in the rule.
  • FILE_TYPE: compares the last portion of the URI against the value parameter in the rule. (eg. “txt”, “jpg”, etc.)
  • HEADER: looks for a header defined in the key parameter and compares it against the value parameter in the rule.
  • COOKIE: looks for a cookie named by the key parameter and compares it against the value parameter in the rule.

Comparaison types

L7 rules of a given type always do comparisons. The types of comparisons supported are listed below. Note that not all rule types support all comparison types:

  • REGEX: Perl type regular expression matching.
  • STARTS_WITH: String starts with.
  • ENDS_WITH: String ends with.
  • CONTAINS: String contains.
  • EQUAL_TO: String is equal to.

Invert

In order to more fully express the logic required by some policies, rules may have their result inverted. That is to say, if the invert parameter of a given rule is true, the result of its comparison will be inverted. For example, an inverted “equal to” rule effectively becomes a “not equal to”, and an inverted “regex” rule returns true only if the given regex does not match.

L7 Policies

An L7 Policy is a collection of L7 rules associated with a Listener, and which may also have an association to a back-end pool. Policies describe actions that should be taken by the load balancing software if all of the rules in the policy return true.




  • No labels