API
Load Balancers
Retrieve load balancer

Retrieve an Existing Load Balancer

  • Name
    get
    Type
    /v1/load_balancers/:uuid
    Description

    Send a GET request to get a load balancer.

Request

Example

curl -X GET "https://api.simplystack.com/v1/load_balancers" \
  -H "Content-Type: application/json" \
  -H "Authorization: Token d359ad9cc9422b5ff07aede0cd2707da4ff82be0" \
 

Response

JSON object with key named load_balancer which is an array of the following attributes for the load_balancers object:

Load Balancer Attributes

See load balancer model.

Health Attibutes

When the health object is returned, health checks are used to tell if a Stacklet is responding and should receive traffic. The load balancer will automatically stop sending traffic to the unresponsive Stacklets. The User may specify the protocol, port, and path for a health check as well as additional setting such as the check interval and response timeout. The following are the returned attributes:

See health model.

Rules Attributes

When the rules object is returned, the Forwarding rules determine how traffic will be routed from the load balancer to the Stacklets assigned to it. They can be used to configure the type of traffic (HTTP, HTTPS, or TCP) and to map ports on the load balancer to ports on the Stacklets. For SSL encrypted traffic, the user may also configure whether to use SSL termination at the load balancer (by specifying an SSL certificate) or to pass the encrypted traffic through to the Stacklet. The following are the returned attributes:

See health model.

Sticky Sessions Attributes

When sticky_sessions object is returned, that means sticky sessions are in use, follow up requests from the client will be sent to the same Stacklet as the original request. Both the name of the cookie and the TTL are configurable as follow:

See sticky sessions model.

Example

{
  "load_balancer": {
    "uuid": "21848c7e-0389-4fdf-95bf-7d4d58d62c22",
    "name": "lb01",
    "created_at": "2020-01-07T18:37:45.190194Z",
    "task": null,
    "region": {
      "available": true,
      "features": [
          "floating_ips"
      ],
      "name": "Frankfurt",
      "slug": "fra"
    },
    "ip": 192.168.1.17,
    "algorithm": "round_robin",
    "sticky_sessions": null,
    "rules": [
      {
        "protocol": "http",
        "source_port": 80,
        "target_port": 80,
        "certificate_id": null,
        "tls_passthrough": false
      },
      {
        "protocol": "https",
        "source_port": 443,
        "target_port": 443,
        "certificate_id": 7,
        "tls_passthrough": false
      }
    ],
    "health": {
      "protocol": "http",
      "port": 80,
      "path": "/",
      "interval": 10,
      "rise": 3,
      "fall": 3
    },
    "redirect_http_to_https": false,
    "stacklet_ids": [
      1,
      2
    ]
  }
}