NodeBalancers
NodeBalancers List
https://api.linode.com/v4/nodebalancers
Returns a paginated list of NodeBalancers you have access to.
Query Parameters
The page of a collection to return.
The number of items to return per page.
Request Samples
- Shell
- CLI
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/nodebalancers
Response Samples
- 200
- default
{
"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.
This NodeBalancer's unique ID.
When this NodeBalancer was created.
This NodeBalancer's label. These must be unique on your Account.
When this NodeBalancer was last updated.
An array of Tags applied to this object. Tags are for organizational purposes only.
The Region where this NodeBalancer is located. NodeBalancers only support backends in the same Region.
This NodeBalancer's public IPv4 address.
This NodeBalancer's public IPv6 address.
This NodeBalancer's hostname, beginning with its IP address and ending with .ip.linodeusercontent.com.
Throttle connections per second. Set to 0 (zero) to disable throttling.
Information about the amount of transfer this NodeBalancer has had so far this month.
The total transfer, in MB, used by this NodeBalancer this month.
The total inbound transfer, in MB, used for this NodeBalancer this month.
The total outbound transfer, in MB, used for this NodeBalancer this month.
The current page.
The total number of pages.
The total number of results.
default: Error
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.
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
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
The ID of the Region to create this NodeBalancer in.
Throttle connections per second. Set to 0 (zero) to disable throttling.
The port Config(s) to create for this NodeBalancer.
Each Config must have a unique port and at least one Node.
This NodeBalancer's label. These must be unique on your Account.
An array of Tags applied to this object. Tags are for organizational purposes only.
Request Samples
- Shell
- CLI
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
- 200
- default
{
"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.
When this NodeBalancer was created.
When this NodeBalancer was last updated.
This NodeBalancer's unique ID.
This NodeBalancer's label. These must be unique on your Account.
The Region where this NodeBalancer is located. NodeBalancers only support backends in the same Region.
An array of Tags applied to this object. Tags are for organizational purposes only.
This NodeBalancer's public IPv4 address.
This NodeBalancer's public IPv6 address.
This NodeBalancer's hostname, beginning with its IP address and ending with .ip.linodeusercontent.com.
Throttle connections per second. Set to 0 (zero) to disable throttling.
Information about the amount of transfer this NodeBalancer has had so far this month.
The total transfer, in MB, used by this NodeBalancer this month.
The total inbound transfer, in MB, used for this NodeBalancer this month.
The total outbound transfer, in MB, used for this NodeBalancer this month.
default: Error
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.
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.