NodeBalancers
Nodes List
https://api.linode.com/v4/nodebalancers/{nodeBalancerId}/configs/{configId}/nodes
Returns a paginated list of NodeBalancer nodes associated with this Config. These are the backends that will be sent traffic for this port.
Path Parameters
The ID of the NodeBalancer to access.
The ID of the NodeBalancer config to access.
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/12345/configs/4567/nodes
Response Samples
- 200
- default
{
"data": [
{
"id": "",
"status": "UP",
"label": "node54321",
"weight": 50,
"address": "192.168.210.120:80",
"nodebalancer_id": 12345,
"mode": "accept",
"config_id": 4567
}
],
"page": 1,
"pages": 1,
"results": 1
}
Responses
200: A paginated list of NodeBalancer nodes.
This node's unique ID.
The current status of this node, based on the configured checks of its NodeBalancer Config.
The label for this node. This is for display purposes only.
Used when picking a backend to serve a request and is not pinned to a single backend yet. Nodes with a higher weight will receive more traffic.
The private IP Address where this backend can be reached. This must be a private IP address.
The NodeBalancer ID that this Node belongs to.
The mode this NodeBalancer should use when sending traffic to this backend.
- If set to
accept
this backend is accepting traffic. - If set to
reject
this backend will not receive traffic. If set to
drain
this backend will not receive new traffic, but connections already pinned to it will continue to be routed to it.If set to
backup
, this backend will only receive traffic if allaccept
nodes are down.
The NodeBalancer Config ID that this Node belongs to.
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.
Node Create
https://api.linode.com/v4/nodebalancers/{nodeBalancerId}/configs/{configId}/nodes
Creates a NodeBalancer Node, a backend that can accept traffic for this NodeBalancer Config. Nodes are routed requests on the configured port based on their status.
Path Parameters
The ID of the NodeBalancer to access.
The ID of the NodeBalancer config to access.
Request Body Schema
The private IP Address where this backend can be reached. This must be a private IP address.
The label for this node. This is for display purposes only.
The mode this NodeBalancer should use when sending traffic to this backend.
- If set to
accept
this backend is accepting traffic. - If set to
reject
this backend will not receive traffic. If set to
drain
this backend will not receive new traffic, but connections already pinned to it will continue to be routed to it.If set to
backup
, this backend will only receive traffic if allaccept
nodes are down.
Used when picking a backend to serve a request and is not pinned to a single backend yet. Nodes with a higher weight will receive more traffic.
Request Samples
- Shell
- CLI
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"address": "192.168.210.120:80",
"label": "node54321",
"weight": 50,
"mode": "accept"
}' \
https://api.linode.com/v4/nodebalancers/12345/configs/4567/nodes
Response Samples
- 200
- default
{
"status": "UP",
"id": 1234,
"label": "node54321",
"weight": 50,
"address": "192.168.210.120:80",
"nodebalancer_id": 12345,
"mode": "accept",
"config_id": 4567
}
Responses
200: Node created successfully.
The current status of this node, based on the configured checks of its NodeBalancer Config.
This node's unique ID.
The label for this node. This is for display purposes only.
Used when picking a backend to serve a request and is not pinned to a single backend yet. Nodes with a higher weight will receive more traffic.
The private IP Address where this backend can be reached. This must be a private IP address.
The NodeBalancer ID that this Node belongs to.
The mode this NodeBalancer should use when sending traffic to this backend.
- If set to
accept
this backend is accepting traffic. - If set to
reject
this backend will not receive traffic. If set to
drain
this backend will not receive new traffic, but connections already pinned to it will continue to be routed to it.If set to
backup
, this backend will only receive traffic if allaccept
nodes are down.
The NodeBalancer Config ID that this Node belongs to.
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.