Jump to: navigation, search

Difference between revisions of "Neutron/LBaaS/LBaaS reuse option"

< Neutron‎ | LBaaS
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
= Resource Model =
 
= Resource Model =
A number of objects defined for loadbalancer resource model: (PPT)
+
A number of objects defined for loadbalancer resource model:  
  
 
1. '''Virtual-server''': A virtual server is a traffic-management  object represented by a set of IP address and a service. Clients send  application traffic to a virtual server, which then directs the  traffic according to your configuration instructions.
 
1. '''Virtual-server''': A virtual server is a traffic-management  object represented by a set of IP address and a service. Clients send  application traffic to a virtual server, which then directs the  traffic according to your configuration instructions.
Line 14: Line 14:
  
 
{{https://wiki.eng.vmware.com/wiki/images/d/d6/Lb_resource_model_trinity.JPG}}
 
{{https://wiki.eng.vmware.com/wiki/images/d/d6/Lb_resource_model_trinity.JPG}}
 +
 +
= Object Definition =
 +
This section illustrates the object scheme in JSON format by usng an example configuration:
 +
1. 4x [[VirtualServers]] for HTTP, HTTPS, TCP and HTTP Redirection
 +
2. 2x Pools, each has 2x members
 +
3. 3x Monitors with different types
 +
 +
 +
<pre><nowiki>
 +
{
 +
  "loadBalancer": {
 +
    "virtualServer": [
 +
      {
 +
        "id": "1",
 +
        "name": "http_lb",
 +
        "description": "virtualServer for http traffic",
 +
        "VirtualIps": { "ipAddress": "192.168.1.101" },
 +
        "protocol": "HTTP",
 +
        "port": "80",
 +
        "connectionLimit": "1000",
 +
        "rateLimit": "100",
 +
        "enabled": "true",
 +
        "applicationProfile": { "id": "1" },
 +
        "pool": { "id": "1" }
 +
      },
 +
      {
 +
        "name": "https_lb",
 +
        "description": "virtualServer for https traffic",
 +
        "VirtualIps": { "ipAddress": "192.168.1.101" },
 +
        "protocol": "HTTPS",
 +
        "port": "443",
 +
        "enabled": "true",
 +
        "applicationProfile": { "id": "2" },
 +
        "pool": { "id": "2" }
 +
      },
 +
      {
 +
        "name": "https_passthrough_lb",
 +
        "description": "virtualServer for https passthrough traffic",
 +
        "VirtualIps": { "ipAddress": "192.168.1.101" },
 +
        "protocol": "HTTPS",
 +
        "port": "443",
 +
        "enabled": "true",
 +
        "applicationProfile": { "id": "3" },
 +
        "pool": { "id": "2" }
 +
      },
 +
      {
 +
        "name": "tcp_lb",
 +
        "description": "virtualServer for tcp traffic",
 +
        "VirtualIps": { "ipAddress": "192.168.1.101" },
 +
        "protocol": "TCP",
 +
        "port": "8080",
 +
        "enabled": "true",
 +
        "applicationProfile": { "id": "3" },
 +
        "pool": { "id": "1" }
 +
      },
 +
      {
 +
        "name": "http_redirect_lb",
 +
        "description": "virtualServer for http redirection ",
 +
        "VirtualIps": { "ipAddress": "192.168.1.101" },
 +
        "protocol": "HTTP",
 +
        "port": "800",
 +
        "enabled": "true",
 +
        "applicationProfile": { "id": "4" }
 +
      }
 +
    ],
 +
    "pool": [
 +
      {
 +
        "id": "1",
 +
        "name": "http-pool",
 +
        "description": "pool for http and https traffic",
 +
        "algorithm": "ROUND_ROBIN",
 +
        "healthMonitors": { "healthMonitor": "1" },
 +
        "member": [
 +
          {
 +
            "ipAddress": "192.168.4.103",
 +
            "weight": "10",
 +
            "port": "80",
 +
            "healthMonitors": {
 +
              "healthMonitor": { "id": "3" }
 +
            },
 +
            "connectionLimit": "100000",
 +
            "condition": "enabled"
 +
          },
 +
          {
 +
            "ipAddress": "192.168.4.104",
 +
            "weight": "11",
 +
            "port": "80"
 +
          }
 +
        ]
 +
      },
 +
      {
 +
        "id": "2",
 +
        "name": "https-pool",
 +
        "description": "pool for http and https traffic",
 +
        "algorithm": "IP_HASH",
 +
        "healthMonitors": {
 +
          "healthMonitor": { "id": "2" }
 +
        },
 +
        "member": [
 +
          {
 +
            "ipAddress": "192.168.4.103",
 +
            "weight": "10",
 +
            "port": "80"
 +
          },
 +
          {
 +
            "ipAddress": "192.168.4.104",
 +
            "weight": "11",
 +
            "port": "80"
 +
          }
 +
        ]
 +
      }
 +
    ],
 +
    "applicationProfiles": {
 +
      "applicationProfile": [
 +
        {
 +
          "id": "1",
 +
          "name": "http_profile",
 +
          "insertXForwardedFor": "true",
 +
          "sessionPersistence": {
 +
            "method": "COOKIE",
 +
            "cookieName": "JSESSIONID",
 +
            "cookieMode": "INSERT"
 +
          }
 +
        },
 +
        {
 +
          "id": "2",
 +
          "name": "https_profile",
 +
          "persistence": {
 +
            "method": "COOKIE",
 +
            "cookieName": "JSESSIONID"
 +
          },
 +
          "sslPassthrough": "false",
 +
          "clientSsl": {
 +
            "verifyRequired": "false",
 +
            "serverCertificate": "server-cert-1",
 +
            "caCertificates": { "caCertificate": "ca-cert-1" },
 +
            "crlCertificates": { "crlCertificate": "crl" },
 +
            "ciphers": "AES256"
 +
          }
 +
        },
 +
        {
 +
          "id": "3",
 +
          "name": "ssl_profile",
 +
          "persistence": { "method": "SSL_SESSION_ID" },
 +
          "sslPassthrough": "true"
 +
        },
 +
        {
 +
          "id": "4",
 +
          "name": "http_redirection_profile",
 +
          "httpRedirect": { "destUrl": "https://www.company.com/login" }
 +
        }
 +
      ]
 +
    },
 +
    "monitorService": {
 +
      "checkTimeout": "60",
 +
      "monitors": {
 +
        "monitor": [
 +
          {
 +
            "id": "1",
 +
            "type": "HTTP",
 +
            "interval": "10",
 +
            "timeout": "20",
 +
            "method": "GET",
 +
            "path": "/",
 +
            "expected": "\"200-204\""
 +
          },
 +
          {
 +
            "id": "2",
 +
            "type": "HTTPS",
 +
            "interval": "10",
 +
            "timeout": "20",
 +
            "method": "SSL"
 +
          },
 +
          {
 +
            "id": "3",
 +
            "type": "TCP",
 +
            "interval": "10",
 +
            "timeout": "30"
 +
          }
 +
        ]
 +
      }
 +
    }
 +
  }
 +
}
 +
</nowiki></pre>

Revision as of 01:32, 12 October 2012

Resource Model

A number of objects defined for loadbalancer resource model:

1. Virtual-server: A virtual server is a traffic-management object represented by a set of IP address and a service. Clients send application traffic to a virtual server, which then directs the traffic according to your configuration instructions.

2. Application-profile: An application profile contains the configuration to manage application-specific network traffic in a variety of ways, depending on the protocols and services being used. For example, you can configure SSL client certificates before passing requests on to a target server. After configuring a profile, you associate the profile with a virtual server. The virtual server then processes traffic according to the values specified in the profile.

3. Pool: A load balancing pool is a logical set of devices, such as web servers, that you group together to receive and process traffic.

4. Member: A pool member represents the application running on backend server.

5. Monitor: A health monitor can monitor the health or performance of either pool members or servers.

Template:Https://wiki.eng.vmware.com/wiki/images/d/d6/Lb resource model trinity.JPG

Object Definition

This section illustrates the object scheme in JSON format by usng an example configuration: 1. 4x VirtualServers for HTTP, HTTPS, TCP and HTTP Redirection 2. 2x Pools, each has 2x members 3. 3x Monitors with different types


{
  "loadBalancer": {
    "virtualServer": [
      {
        "id": "1",
        "name": "http_lb",
        "description": "virtualServer for http traffic",
        "VirtualIps": { "ipAddress": "192.168.1.101" },
        "protocol": "HTTP",
        "port": "80",
        "connectionLimit": "1000",
        "rateLimit": "100",
        "enabled": "true",
        "applicationProfile": { "id": "1" },
        "pool": { "id": "1" }
      },
      {
        "name": "https_lb",
        "description": "virtualServer for https traffic",
        "VirtualIps": { "ipAddress": "192.168.1.101" },
        "protocol": "HTTPS",
        "port": "443",
        "enabled": "true",
        "applicationProfile": { "id": "2" },
        "pool": { "id": "2" }
      },
      {
        "name": "https_passthrough_lb",
        "description": "virtualServer for https passthrough traffic",
        "VirtualIps": { "ipAddress": "192.168.1.101" },
        "protocol": "HTTPS",
        "port": "443",
        "enabled": "true",
        "applicationProfile": { "id": "3" },
        "pool": { "id": "2" }
      },
      {
        "name": "tcp_lb",
        "description": "virtualServer for tcp traffic",
        "VirtualIps": { "ipAddress": "192.168.1.101" },
        "protocol": "TCP",
        "port": "8080",
        "enabled": "true",
        "applicationProfile": { "id": "3" },
        "pool": { "id": "1" }
      },
      {
        "name": "http_redirect_lb",
        "description": "virtualServer for http redirection ",
        "VirtualIps": { "ipAddress": "192.168.1.101" },
        "protocol": "HTTP",
        "port": "800",
        "enabled": "true",
        "applicationProfile": { "id": "4" }
      }
    ],
    "pool": [
      {
        "id": "1",
        "name": "http-pool",
        "description": "pool for http and https traffic",
        "algorithm": "ROUND_ROBIN",
        "healthMonitors": { "healthMonitor": "1" },
        "member": [
          {
            "ipAddress": "192.168.4.103",
            "weight": "10",
            "port": "80",
            "healthMonitors": {
              "healthMonitor": { "id": "3" }
            },
            "connectionLimit": "100000",
            "condition": "enabled"
          },
          {
            "ipAddress": "192.168.4.104",
            "weight": "11",
            "port": "80"
          }
        ]
      },
      {
        "id": "2",
        "name": "https-pool",
        "description": "pool for http and https traffic",
        "algorithm": "IP_HASH",
        "healthMonitors": {
          "healthMonitor": { "id": "2" }
        },
        "member": [
          {
            "ipAddress": "192.168.4.103",
            "weight": "10",
            "port": "80"
          },
          {
            "ipAddress": "192.168.4.104",
            "weight": "11",
            "port": "80"
          }
        ]
      }
    ],
    "applicationProfiles": {
      "applicationProfile": [
        {
          "id": "1",
          "name": "http_profile",
          "insertXForwardedFor": "true",
          "sessionPersistence": {
            "method": "COOKIE",
            "cookieName": "JSESSIONID",
            "cookieMode": "INSERT"
          }
        },
        {
          "id": "2",
          "name": "https_profile",
          "persistence": {
            "method": "COOKIE",
            "cookieName": "JSESSIONID"
          },
          "sslPassthrough": "false",
          "clientSsl": {
            "verifyRequired": "false",
            "serverCertificate": "server-cert-1",
            "caCertificates": { "caCertificate": "ca-cert-1" },
            "crlCertificates": { "crlCertificate": "crl" },
            "ciphers": "AES256"
          }
        },
        {
          "id": "3",
          "name": "ssl_profile",
          "persistence": { "method": "SSL_SESSION_ID" },
          "sslPassthrough": "true"
        },
        {
          "id": "4",
          "name": "http_redirection_profile",
          "httpRedirect": { "destUrl": "https://www.company.com/login" }
        }
      ]
    },
    "monitorService": {
      "checkTimeout": "60",
      "monitors": {
        "monitor": [
          {
            "id": "1",
            "type": "HTTP",
            "interval": "10",
            "timeout": "20",
            "method": "GET",
            "path": "/",
            "expected": "\"200-204\""
          },
          {
            "id": "2",
            "type": "HTTPS",
            "interval": "10",
            "timeout": "20",
            "method": "SSL"
          },
          {
            "id": "3",
            "type": "TCP",
            "interval": "10",
            "timeout": "30"
          }
        ]
      }
    }
  }
}