Jump to: navigation, search

Neutron/LBaaS/l7

< Neutron‎ | LBaaS
Revision as of 12:44, 19 November 2013 by Avishayb (talk | contribs) (CLI Example)

L7 Switching

Background

Layer 7 switching takes its name from the OSI model, indicating that the device switches requests based on layer 7 (application) data. Layer 7 switching is also known as "request switching", "application switching", and "content based routing". A layer 7 switch presents to the outside world a "virtual server" that accepts requests on behalf of a number of servers and distributes those requests based on policies that use application data to determine which server should service which request. This allows for the application infrastructure to be specifically tuned/optimized to serve specific types of content. For example, one server can be tuned to serve only images, another for execution of server-side scripting languages like PHP and ASP, and another for static content such as HTML , CSS , and JavaScript. Unlike load balancing, layer 7 switching does not require that all servers in the pool (farm/cluster) have the same content. In fact, layer 7 switching expects that servers will have different content, thus the need to more deeply inspect requests before determining where they should be directed. Layer 7 switches are capable of directing requests based on URI, host, HTTP headers, and anything in the application message.

API Changes

CLI Example

  • neutron create-lb-l7policy policy1 (Create l7 policy named 'policy1')

 

  • neutron create-lb-l7rule r1 --attribute-type header --attribute-name "myheader" --attribute-value "transaction[1-9]{1,4}" --action SELECT-POOL --policy p1

 

  • neutron create-lb-l7rule r2 --attribute-type path --attribute-value "/shopping/.*" --action SELECT-POOL --policy p1

 

  • neutron create-lb-pool pool1 .....

 

  • neutron create-lb-vip .vip1 ......

 

  • neutron associate-lb-pool-vip --pool pool1 --vip vip1 --l7policy p1

Model

class L7Rule {

     enum Type [Hostname, Path, File Type, Header, Cookie],
     String Name, 
     enum Compare Type [regext],
     String Value,
     String SelectedPool

}

Example: L7Rule(Type=Hostname,Name='finance_rule',CompareType=regext,value='.*finance.* ', SelectedPool='FinancePool')

class L7Policy {

  collection of L7Rule 

}

DB Migration