NodeBalancers

NodeBalancers List

get
https://api.linode.com/v4/nodebalancers

Returns a paginated list of NodeBalancers you have access to.

Query Parameters

page
integer > = 1
Default: 1

The page of a collection to return.

page_size
integer [25 .. 500]
Default: 100

The number of items to return per page.

Request Samples

curl -H "Authorization: Bearer $TOKEN" \
    https://api.linode.com/v4/nodebalancers

Response Samples

{
  "data": [
    {
      "id": "",
      "created": "2018-01-01T00:01:01.000Z",
      "label": "balancer12345",
      "updated": "2018-03-01T00:01:01.000Z",
      "tags": [
        "example tag",
        "another example"
      ],
      "region": "us-east",
      "ipv4": "",
      "ipv6": "",
      "hostname": "192.0.2.1.ip.linodeusercontent.com",
      "client_conn_throttle": "",
      "transfer": {
        "total": 32.46078109741211,
        "out": 3.5487728118896484,
        "in": 28.91200828552246
      }
    }
  ],
  "page": 1,
  "pages": 1,
  "results": 1
}

Responses

200: A paginated list of NodeBalancers.

data
array of objects
id
integer

This NodeBalancer's unique ID.

created
string

When this NodeBalancer was created.

label
Filterable
string[a-zA-Z0-9-_]{3,32}

This NodeBalancer's label. These must be unique on your Account.

updated
string

When this NodeBalancer was last updated.

tags
Filterable
array

An array of Tags applied to this object. Tags are for organizational purposes only.

region
Filterable
string

The Region where this NodeBalancer is located. NodeBalancers only support backends in the same Region.

ipv4
Filterable
string

This NodeBalancer's public IPv4 address.

ipv6
Nullable
string

This NodeBalancer's public IPv6 address.

hostname
string

This NodeBalancer's hostname, beginning with its IP address and ending with .ip.linodeusercontent.com.

client_conn_throttle
integer

Throttle connections per second. Set to 0 (zero) to disable throttling.

transfer
object

Information about the amount of transfer this NodeBalancer has had so far this month.

total
Nullable
number

The total transfer, in MB, used by this NodeBalancer this month.

out
Nullable
number

The total inbound transfer, in MB, used for this NodeBalancer this month.

in
Nullable
number

The total outbound transfer, in MB, used for this NodeBalancer this month.

page
integer

The current page.

pages
integer

The total number of pages.

results
integer

The total number of results.

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.

NodeBalancer Create

post
https://api.linode.com/v4/nodebalancers

Creates a NodeBalancer in the requested Region.

NodeBalancers require a port Config with at least one backend Node to start serving requests.

When using the Linode CLI to create a NodeBalancer, first create a NodeBalancer without any Configs. Then, create Configs and Nodes for that NodeBalancer with the respective Config Create and Node Create commands.

Request Body Schema

region
Required
string

The ID of the Region to create this NodeBalancer in.

client_conn_throttle
integer

Throttle connections per second. Set to 0 (zero) to disable throttling.

configs
array

The port Config(s) to create for this NodeBalancer.

Each Config must have a unique port and at least one Node.

label
Filterable
string [3 .. 32] characters [a-zA-Z0-9-_]{3,32}

This NodeBalancer's label. These must be unique on your Account.

tags
array

An array of Tags applied to this object. Tags are for organizational purposes only.

Request Samples

curl -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    -X POST -d '{
      "region": "us-east",
      "label": "balancer12345",
      "client_conn_throttle": 0,
      "configs": [
        {
          "port": 443,
          "protocol": "https",
          "algorithm": "roundrobin",
          "stickiness": "http_cookie",
          "check": "http_body",
          "check_interval": 90,
          "check_timeout": 10,
          "check_attempts": 3,
          "check_path": "/test",
          "check_body": "it works",
          "check_passive": true,
          "proxy_protocol": "none",
          "cipher_suite": "recommended",
          "ssl_cert": "-----BEGIN CERTIFICATE-----\nCERTIFICATE_INFORMATION\n-----END CERTIFICATE-----",
          "ssl_key": "-----BEGIN PRIVATE KEY-----\nPRIVATE_KEY_INFORMATION\n-----END PRIVATE KEY-----",
          "nodes": [
            {
              "address": "192.168.210.120:80",
              "label": "node1",
              "weight": 50,
              "mode": "accept"
            },
            {
              "address": "192.168.210.122:81",
              "label": "node2",
              "weight": 50,
              "mode": "accept"
            }
          ]
        }
      ]
    }' \
    https://api.linode.com/v4/nodebalancers

Response Samples

{
  "created": "2018-01-01T00:01:01.000Z",
  "updated": "2018-03-01T00:01:01.000Z",
  "id": 1234,
  "label": "balancer12345",
  "region": "us-east",
  "tags": [],
  "ipv4": "",
  "ipv6": "",
  "hostname": "192.0.2.1.ip.linodeusercontent.com",
  "client_conn_throttle": "",
  "transfer": {
    "total": 32.46078109741211,
    "out": 3.5487728118896484,
    "in": 28.91200828552246
  }
}

Responses

200: NodeBalancer created successfully.

created
string <date-time>

When this NodeBalancer was created.

updated
string <date-time>

When this NodeBalancer was last updated.

id
integer

This NodeBalancer's unique ID.

label
Filterable
string [3 .. 32] characters [a-zA-Z0-9-_]{3,32}

This NodeBalancer's label. These must be unique on your Account.

region
Filterable
string

The Region where this NodeBalancer is located. NodeBalancers only support backends in the same Region.

tags
Filterable
array of objects

An array of Tags applied to this object. Tags are for organizational purposes only.

ipv4
Filterable
string <ip>

This NodeBalancer's public IPv4 address.

ipv6
Nullable
string <ip>

This NodeBalancer's public IPv6 address.

hostname
string

This NodeBalancer's hostname, beginning with its IP address and ending with .ip.linodeusercontent.com.

client_conn_throttle
integer

Throttle connections per second. Set to 0 (zero) to disable throttling.

transfer
object

Information about the amount of transfer this NodeBalancer has had so far this month.

total
Nullable
number

The total transfer, in MB, used by this NodeBalancer this month.

out
Nullable
number

The total inbound transfer, in MB, used for this NodeBalancer this month.

in
Nullable
number

The total outbound transfer, in MB, used for this NodeBalancer this month.

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.