GET'> PUT'> POST'> DELETE'> ]>
The Load Balancer as a Service (LBaaS) extension The LBaaS extension enables OpenStack tenants to load-balance their VM traffic. The extension enables you to: Load-balance client traffic from one network to application services, such as VMs, on the same or a different network. Load-balance several protocols, such as TCP and HTTP. Monitor the health of application services. Support session persistence.
Concepts This extension introduces these concepts: VIP The primary load balancing configuration object. Specifies the virtual IP address and port where client traffic is received. Also defines other details such as the load balancing method to be used, protocol, and so on. This entity is sometimes known in load-balancing products as a virtual server, vserver, or listener. pool A logical set of devices, such as web servers, that you group together to receive and process traffic. The load balancing function chooses which member of the pool handles the new requests or connections received on the VIP address. Each VIP has one pool. pool member The application that runs on the back-end server. health monitor Determines whether or not back-end members of the VIP pool can process a request. A pool can have several health monitors associated with it. The LBaaS extension supports these types of health monitors: PING. Pings the members by using ICMP. TCP. Connects to the members by using TCP. HTTP. Sends an HTTP request to the member. HTTPS. Sends a secure HTTP request to the member. When a pool has several monitors associated with it, all monitors check each member of the pool. If any monitor declares a member as unhealthy, the member status is changed to inactive and the member does not participate in the load balancing for the pool. All monitors must declare the member to be healthy for it to stay active. session persistence Forces connections or requests in the same session to be processed by the same member as long as it is active. The LBaaS extension supports these types of persistence: SOURCE_IP. All connections that originate from the same source IP address are handled by the same member of the pool. HTTP_COOKIE. The load balancing function creates a cookie on the first request from a client. Subsequent requests that contain the same cookie value are handled by the same member of the pool. APP_COOKIE. The load balancing function relies on a cookie established by the back-end application. All requests with the same cookie value are handled by the same member of the pool. Absence of session_persistence attribute means no session persistence mechanism is used. When no session persistence is used, the session_persistence attribute does not appear in the API response, instead of returning null. You can clear session persistence for the VIP by sending null in session_persistence attribute in a VIP update request.
High-level task flow To use the LBaaS extension to configure load balancing, you must complete these high-level tasks: Create a pool, which is initially empty. Create one or several members in the pool. Create one or several health monitors. Associate the health monitors with the pool. Create a VIP that is associated with the pool.
VIP operations This section discusses operations for managing load balancer VIPs through the LBaaS extension.
VIP attributes
Attribute Type Required CRUD C. Use the attribute in create operations. R. This attribute is returned in response to show and list operations. U. You can update the value of this attribute. D. You can delete the value of this attribute. Default value Validation constraints Notes
id uuid-str N/A R generated N/A Unique identifier for the VIP.
tenant_id uuid-str Yes CR Derived from authentication token. N/A Owner of the VIP. Only an admin user can specify a tenant identifier other than its own.
name String No CRU None N/A Human readable name for the VIP. Does not have to be unique.
description String No CRU None N/A Human readable description for the VIP.
subnet_id uuid-str No CR None UUID pattern. The subnet on which to allocate the VIP address.
address IP No CR None IP address or null The IP address of the VIP.
protocol String Yes CR None { "TCP" | "HTTP" | "HTTPS" } The protocol of the VIP address.
protocol_port Integer Yes CR None [0..65535] The port on which to listen to client traffic that is associated with the VIP address.
pool_id uuid-str No CRU None UUID pattern. The pool that the VIP associated with.
session_persistence dict No CRU None composite Session persistence is a dictionary with the following attributes: type - any of APP_COOKIE, HTTP_COOKIE or SOURCE_IP cookie_name - any string, required if type is APP_COOKIE Session persistence parameters of the VIP. Absence of session_persistence attribute means no session persistence mechanism is used. When no session persistence is used, the session_persistence attribute does not appear in the API response, instead of returning null. You can clear session persistence for the VIP by sending null in session_persistence attribute in a VIP update request.
connection_limit Integer No CRU -1 None The maximum number of connections allowed for the VIP or -1 if the limit is not set.
admin_state_up Bool No CRU true {true | false } Administrative state of the VIP
status String N/A R N/A N/A Indicates whether a VIP is currently operational.
List VIPs Verb URI Description &GET; /lb/vips Lists VIPs. Normal Response Code: 200 Error Response Codes: Unauthorized (401), Forbidden (403) This operation does not require a request body. This operation returns a response body. List VIPs: HTTP request GET /v2.0/lb/vips.json HTTP/1.1 User-Agent: python-neutronclient Accept: application/json List VIPs: JSON response
Show VIP details Verb URI Description &GET; /lb/vips/vip-id Shows details for a specified VIP. Normal Response Code: 200 Error Response Codes: Unauthorized (401), Forbidden (403), Not Found (404) This operation does not require a request body. This operation returns a response body. Show VIP details: HTTP request GET /v2.0/lb/vips/4ec89087-d057-4e2c-911f-60a3b47ee304.json HTTP/1.1 User-Agent: python-neutronclient Accept: application/json Show VIP details: JSON response
Create VIP Verb URI Description &POST; /lb/vips Creates a load balancer VIP. Normal Response Code: 201 Error Response Codes: Unauthorized (401), Bad Request (400) This operation requires a request body. This operation returns a response body. Create VIP: HTTP and JSON request POST /v2.0/lb/vips.json HTTP/1.1 User-Agent: python-neutronclient Accept: application/json Create VIP: HTTP and JSON response HTTP/1.1 201 Created Content-Type: application/json; charset=UTF-8
Update VIP Verb URI Description &PUT; /lb/vips/vip-id Updates a load balancer VIP. Normal Response Code: 200 Error Response Codes: Unauthorized (401), Bad Request (400), Not Found (404) Update VIP: HTTP and JSON request PUT /v2.0/lb/vips/c987d2be-9a3c-4ac9-a046-e8716b1350e2.json User-Agent: python-neutronclient Accept: application/json Update VIP: HTTP and JSON response HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8
Delete VIP Verb URI Description &DELETE; /lb/vips/vip-id Removes a load balancer VIP. Normal Response Code: 204 Error Response Codes: Unauthorized (401), Not Found (404), Conflict (409) This operation does not require a request body. This operation does not return a response body. Delete VIP: HTTP request DELETE /v2.0/lb/vips/c987d2be-9a3c-4ac9-a046-e8716b1350e2.json HTTP/1.1 Accept: application/json Delete VIP: HTTP response HTTP/1.1 204 No Content Content-Length: 0
Pool operations This section discusses operations for managing load balancer pools through the Load balancing as a service extension.
Pool Attributes
Attribute Type Required CRUD C. Use the attribute in create operations. R. This attribute is returned in response to show and list operations. U. You can update the value of this attribute. D. You can delete the value of this attribute. Default Value Validation Constraints Notes
id uuid-str N/A R generated N/A Unique identifier for the pool.
tenant_id uuid-str Yes CR Derived from authentication token. N/A Owner of the pool. Only an admin user can specify a tenant identifier other than its own
vip_id uuid-str No R None UUID pattern. The vip that the pool associated with.
name String No CRU None N/A Human readable name for the pool. Does not have to be unique.
description String No CRU None N/A Human readable description for the pool.
subnet_id uuid-str No CR None UUID pattern. The network that pool members belong to.
protocol String Yes CR None { "TCP" | "HTTP" | "HTTPS" } The protocol of the pool.
lb_method String Yes CRU None None The algorithm used to distribute load between the members of the pool.
health_monitors uuid-list No CRU None N/A List of health monitors to associate with the pool.
members uuid-list No R None N/A List of members that belong to the pool.
admin_state_up Bool No CRU true {true | false } Administrative state of the pool.
status String N/A R N/A N/A Indicates whether a pool is currently operational or not.
List pools Verb URI Description &GET; /lb/pools Lists pools. Normal Response Code: 200 Error Response Codes: Unauthorized (401), Forbidden (403) This operation does not require a request body. This operation returns a response body. List pools: HTTP request GET /v2.0/lb/pools.json HTTP/1.1 User-Agent: python-neutronclient Accept: application/json List pools: HTTP and JSON response HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8
Show pool Verb URI Description &GET; /lb/pools/pool-id Returns details about a specific pool. Normal Response Code: 200 Error Response Codes: Unauthorized (401), Forbidden (403), Not Found (404) This operation does not require a request body. This operation returns a response body. Show pool: HTTP request GET /v2.0/lb/pools/72741b06-df4d-4715-b142-276b6bce75ab.json HTTP/1.1 User-Agent: python-neutronclient Accept: application/json Show pool: HTTP and JSON response HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8
Create Pool Verb URI Description &POST; /lb/pools Create a new load balancer pool. Normal Response Code: 201 Error Response Codes: Unauthorized (401), Bad Request (400) This operation requires a request body. This operation returns a response body. Create pool: HTTP request POST /v2.0/lb/pools.json HTTP/1.1 User-Agent: python-neutronclient Accept: application/json Create pool: HTTP and JSON response HTTP/1.1 201 Created Content-Type: application/json; charset=UTF-8
Update Pool Verb URI Description &PUT; /lb/pools/pool-id Updates a load balancer pool. Normal Response Code: 200 Error Response Codes: Unauthorized (401), Bad Request (400), Not Found (404) Update pool: HTTP and JSON request PUT /v2.0/lb/pools/61b1f87a-7a21-4ad3-9dda-7f81d249944f.json User-Agent: python-neutronclient Accept: application/json Update pool: HTTP and JSON response HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8
Delete pool Verb URI Description &DELETE; /lb/pools/pool-id Removes a load balancer pool. Normal Response Code: 204 Error Response Codes: Unauthorized (401), Not Found (404), Conflict (409) This operation does not require a request body. This operation does not return a response body. Delete pool: HTTP request DELETE /v2.0/lb/pools/a224402b-794b-4c0c-9d08-d95640a6f5a1.json HTTP/1.1 Accept: application/json Delete pool: HTTP response HTTP/1.1 204 No Content Content-Length: 0
Member operations This section discusses operations for managing pool members through the Load balancing as a service extension.
Member Attributes
Attribute Type Required CRUD C. Use the attribute in create operations. R. This attribute is returned in response to show and list operations. U. You can update the value of this attribute. D. You can delete the value of this attribute. Default value Validation constraints Notes
id uuid-str N/A R generated N/A Unique identifier for the member.
tenant_id uuid-str Yes CR Derived from authentication token. N/A Owner of the member. Only an admin user can specify a tenant identifier other than its own.
pool_id uuid-str Yes CRU None UUID pattern. The pool that the member belongs to.
address IP Yes CR None IP address or null. The IP address of the member.
protocol_port Integer Yes CR None [0..65535] The port on which the application is hosted.
weight Integer No CRU 1 [0..256] The weight of a member determines the portion of requests or connections it services compared to the other members of the pool. A value of 0 means the member does not participate in load-balancing but still accepts persistent connections.
admin_state_up Bool No CRU true {true | false } Administrative state of the member.
status String N/A R N/A N/A Indicates whether or not a member is currently operational.
List members Verb URI Description &GET; /lb/members Lists members. Normal Response Code: 200 Error Response Codes: Unauthorized (401), Forbidden (403) This operation does not require a request body. This operation returns a response body. List members: HTTP request GET /v2.0/lb/members.json HTTP/1.1 User-Agent: python-neutronclient Accept: application/json List members: HTTP and JSON response HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8
Show member Verb URI Description &GET; /lb/members/member-id Returns details about a specific member. Normal Response Code: 200 Error Response Codes: Unauthorized (401), Forbidden (403), Not Found (404) This operation does not require a request body. This operation returns a response body. Show member: HTTP request GET /v2.0/lb/members/701b531b-111a-4f21-ad85-4795b7b12af6.json HTTP/1.1 User-Agent: python-neutronclient Accept: application/json Show member: HTTP and JSON response HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8
Create member Verb URI Description &POST; /lb/members Creates a load balancer member. Normal Response Code: 201 Error Response Codes: Unauthorized (401), Bad Request (400) This operation requires a request body. This operation returns a response body. Create member: HTTP and JSON request POST /v2.0/lb/members.json HTTP/1.1 User-Agent: python-neutronclient Accept: application/json Create member: HTTP and JSON response HTTP/1.1 201 Created Content-Type: application/json; charset=UTF-8
Update member Verb URI Description &PUT; /lb/members/member-id Updates a load balancer member. Normal Response Code: 200 Error Response Codes: Unauthorized (401), Bad Request (400), Not Found (404) Update member: HTTP and JSON request PUT /v2.0/lb/members/b9a7012a-1097-45b2-a973-6572973619bc.json User-Agent: python-neutronclient Accept: application/json Update member: HTTP and JSON response HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8
Delete member Verb URI Description &DELETE; /lb/members/member-id Removes a load balancer member. Normal Response Code: 204 Error Response Codes: Unauthorized (401), Not Found (404), Conflict (409) This operation does not require a request body. This operation does not return a response body. Delete member: HTTP request DELETE /v2.0/lb/members/b9a7012a-1097-45b2-a973-6572973619bc.json HTTP/1.1 Accept: application/json Delete member: HTTP and JSON response HTTP/1.1 204 No Content Content-Length: 0
Health monitor operations This section discusses operations for managing load balancer health monitors through the LBaaS extension.
Health monitor attributes
Attribute Type Required CRUD C. Use the attribute in create operations. R. This attribute is returned in response to show and list operations. U. You can update the value of this attribute. D. You can delete the value of this attribute. Default value Validation constraints Notes
id uuid-str N/A R generated N/A Unique ID for the health monitor.
tenant_id uuid-str Yes CR Derived from authentication token. N/A Owner of the health monitor. Only an admin user can specify a tenant identifier other than its own.
type String Yes CR None {"PING" | "TCP" | "HTTP" | "HTTPS"} The type of probe send by load balancer to verify member state
delay Integer Yes CRU None non-negative The time in seconds between sending probes to members.
timeout uuid-str Yes CRU None non-negative The maximum number of seconds for a monitor to wait for a connection to be established before it times out. The value must be less than the delay value.
max_retries Integer Yes CRU None [1..10] Number of allowed connection failures before changing the member's status to INACTIVE.
http_method String No Required if type is HTTP or HTTPS. CRU GET None The HTTP method used for requests by the monitor.
url_path String No CRU / None The HTTP path of the request sent by the monitor to test a member's health. This must be a string beginning with a / (forward slash).
expected_codes String No CRU 200 Single value, such as 200, list, such as 200, 202, or range, such as 200-204. The list of HTTP status codes expected in response from the member to declare it healthy.
admin_state_up Bool No CRU true {true | false } Administrative state of the health monitor.
status String N/A R N/A N/A Indicates whether or not a health monitor is currently operational.
List health monitors Verb URI Description &GET; /lb/health_monitors Lists health monitors. Normal Response Code: 200 Error Response Codes: Unauthorized (401), Forbidden (403) This operation does not require a request body. This operation returns a response body. List health monitors: HTTP request GET /v2.0/lb/health_monitors.json HTTP/1.1 User-Agent: python-neutronclient Accept: application/json List health monitors: HTTP and JSON response HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8
Show health monitor Verb URI Description &GET; /lb/health_monitors/health_monitor-id Show details for a specified health monitor. Normal Response Code: 200 Error Response Codes: Unauthorized (401), Forbidden (403), Not Found (404) This operation does not require a request body. This operation returns a response body. Show health monitor: HTTP request GET /v2.0/lb/health_monitors/701b531b-111a-4f21-ad85-4795b7b12af6.json HTTP/1.1 User-Agent: python-neutronclient Accept: application/json Show health monitor: HTTP and JSON response HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8
Create health monitor Verb URI Description &POST; /lb/health_monitors Creates a load balancer health monitor. Normal Response Code: 201 Error Response Codes: Unauthorized (401), Bad Request (400) This operation requires a request body. This operation returns a response body. Create health monitor: HTTP and JSON request POST /v2.0/lb/health_monitors.json HTTP/1.1 User-Agent: python-neutronclient Accept: application/json Create health monitor: HTTP and JSON response HTTP/1.1 201 Created Content-Type: application/json; charset=UTF-8
Update health monitor Verb URI Description &PUT; /lb/health_monitors/health_monitor-id Updates a load balancer health monitor. Normal Response Code: 200 Error Response Codes: Unauthorized (401), Bad Request (400), Not Found (404) Update health monitor: HTTP and JSON request PUT /v2.0/lb/health_monitors/466c8345-28d8-4f84-a246-e04380b0461d.json HTTP/1.1 User-Agent: python-neutronclient Accept: application/json Update health monitor: HTTP and JSON response HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8
Delete health monitor Verb URI Description &DELETE; /lb/health_monitors/healthmonitor-id Deletes a specified health monitor. Normal Response Code: 204 Error Response Codes: Unauthorized (401), Not Found (404), Conflict (409) This operation does not require a request body. This operation does not return a response body. Delete health monitor: HTTP request DELETE /v2.0/lb/health_monitors/ada338f0-10d0-4326-b02e-cc123114f240.json HTTP/1.1 Accept: application/json Delete health monitor: HTTP response HTTP/1.1 204 No Content Content-Length: 0
Associate health monitor with a pool Verb URI Description &POST; /lb/pools/pool-id/health_monitors Associate health monitor with the pool. Normal Response Code: 200 Error Response Codes: Unauthorized (401), Bad Request (400), Not Found (404) Associate health monitor: HTTP and JSON request POST /v2.0/lb/pools/72741b06-df4d-4715-b142-276b6bce75ab/health_monitors.json HTTP/1.1 User-Agent: python-neutronclient Accept: application/json Associate health monitor: HTTP and JSON response HTTP/1.1 201 Created Content-Type: application/json; charset=UTF-8
Disassociate health monitor from a pool Verb URI Description &DELETE; /lb/pools/pool-id/health_monitors/healthmonitor-id Disassociates a health monitor from the pool. Normal Response Code: 204 Error Response Codes: Unauthorized (401), Not Found (404), Conflict (409) This operation does not require a request body. This operation does not return a response body. Disassociate health monitor: HTTP request DELETE /v2.0/lb/pools/72741b06-df4d-4715-b142-276b6bce75ab/health_monitors/ada338f0-10d0-4326-b02e-cc123114f240.json HTTP/1.1 Accept: application/json Disassociate health monitor: HTTP response HTTP/1.1 204 No Content Content-Length: 0