NodeBalancers
Configs List
https://api.linode.com/v4/nodebalancers/{nodeBalancerId}/configs
Returns a paginated list of NodeBalancer Configs associated with this NodeBalancer. NodeBalancer Configs represent individual ports that this NodeBalancer will accept traffic on, one Config per port.
For example, if you wanted to accept standard HTTP traffic, you would need a Config listening on port 80.
Path Parameters
The ID of the NodeBalancer 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
Response Samples
- 200
- default
{
"data": [
{
"id": "",
"port": 80,
"protocol": "http",
"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",
"nodebalancer_id": 12345,
"ssl_commonname": "www.example.com",
"ssl_fingerprint": "00:01:02:03:04:05:06:07:08:09:0A:0B:0C:0D:0E:0F:10:11:12:13",
"ssl_cert": "<REDACTED>",
"ssl_key": "<REDACTED>",
"nodes_status": {
"up": 4,
"down": ""
}
}
],
"page": 1,
"pages": 1,
"results": 1
}
Responses
200: A paginted list of NodeBalancer Configs
This config's unique ID
The port this Config is for. These values must be unique across configs on a single NodeBalancer (you can't have two configs for port 80, for example). While some ports imply some protocols, no enforcement is done and you may configure your NodeBalancer however is useful to you. For example, while port 443 is generally used for HTTPS, you do not need SSL configured to have a NodeBalancer listening on port 443.
The protocol this port is configured to serve.
The
http
andtcp
protocols do not supportssl_cert
andssl_key
.The
https
protocol is mutually required withssl_cert
andssl_key
.
Review our guide on Available Protocols for information on protocol features.
What algorithm this NodeBalancer should use for routing traffic to backends.
Controls how session stickiness is handled on this port.
- If set to
none
connections will always be assigned a backend based on the algorithm configured. If set to
table
sessions from the same remote address will be routed to the same backend.For HTTP or HTTPS clients,
http_cookie
allows sessions to be routed to the same backend based on a cookie set by the NodeBalancer.
The type of check to perform against backends to ensure they are serving requests. This is used to determine if backends are up or down.
- If
none
no check is performed. connection
requires only a connection to the backend to succeed.http
andhttp_body
rely on the backend serving HTTP, and that the response returned matches what is expected.
How often, in seconds, to check that backends are up and serving requests.
Must be greater than check_timeout
.
How long, in seconds, to wait for a check attempt before considering it failed.
Must be less than check_interval
.
How many times to attempt a check before considering a backend to be down.
The URL path to check on each backend. If the backend does not respond to this request it is considered to be down.
This value must be present in the response body of the check in order for it to pass. If this value is not present in the response body of a check request, the backend is considered to be down.
If true, any response from this backend with a 5xx
status code will be enough for it to be considered unhealthy and taken out of rotation.
ProxyProtocol is a TCP extension that sends initial TCP connection information such as source/destination IPs and ports to backend devices. This information would be lost otherwise. Backend devices must be configured to work with ProxyProtocol if enabled.
- If ommited, or set to
none
, the NodeBalancer doesn't send any auxilary data over TCP connections. This is the default. - If set to
v1
, the human-readable header format (Version 1) is used. Requirestcp
protocol. - If set to
v2
, the binary header format (Version 2) is used. Requirestcp
protocol.
What ciphers to use for SSL connections served by this NodeBalancer.
legacy
is considered insecure and should only be used if necessary.
The ID for the NodeBalancer this config belongs to.
The read-only common name automatically derived from the SSL certificate assigned to this NodeBalancerConfig. Please refer to this field to verify that the appropriate certificate is assigned to your NodeBalancerConfig.
The read-only SHA1-encoded fingerprint automatically derived from the SSL certificate assigned to this NodeBalancerConfig. Please refer to this field to verify that the appropriate certificate is assigned to your NodeBalancerConfig.
The PEM-formatted public SSL certificate (or the combined PEM-formatted SSL certificate and Certificate Authority chain) that should be served on this NodeBalancerConfig's port.
Line breaks must be represented as "\n" in the string for requests (but not when using the Linode CLI).
Diffie-Hellman Parameters can be included in this value to enable forward secrecy.
The contents of this field will not be shown in any responses that display
the NodeBalancerConfig. Instead, <REDACTED>
will be printed where the field
appears.
The read-only ssl_commonname
and ssl_fingerprint
fields in a NodeBalancerConfig
response are automatically derived from your certificate. Please refer to these fields to
verify that the appropriate certificate was assigned to your NodeBalancerConfig.
The PEM-formatted private key for the SSL certificate set in the ssl_cert
field.
Line breaks must be represented as "\n" in the string for requests (but not when using the Linode CLI).
The contents of this field will not be shown in any responses that display
the NodeBalancerConfig. Instead, <REDACTED>
will be printed where the field
appears.
The read-only ssl_commonname
and ssl_fingerprint
fields in a NodeBalancerConfig
response are automatically derived from your certificate. Please refer to these fields to
verify that the appropriate certificate was assigned to your NodeBalancerConfig.
A structure containing information about the health of the backends for this port. This information is updated periodically as checks are performed against backends.
The number of backends considered to be "UP" and healthy, and that are serving requests.
The number of backends considered to be "DOWN" and unhealthy. These are not in rotation, and not serving requests.
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.
Config Create
https://api.linode.com/v4/nodebalancers/{nodeBalancerId}/configs
Creates a NodeBalancer Config, which allows the NodeBalancer to accept traffic on a new port. You will need to add NodeBalancer Nodes to the new Config before it can actually serve requests.
Path Parameters
The ID of the NodeBalancer to access.
Request Body Schema
What algorithm this NodeBalancer should use for routing traffic to backends.
The type of check to perform against backends to ensure they are serving requests. This is used to determine if backends are up or down.
- If
none
no check is performed. connection
requires only a connection to the backend to succeed.http
andhttp_body
rely on the backend serving HTTP, and that the response returned matches what is expected.
How many times to attempt a check before considering a backend to be down.
This value must be present in the response body of the check in order for it to pass. If this value is not present in the response body of a check request, the backend is considered to be down.
How often, in seconds, to check that backends are up and serving requests.
Must be greater than check_timeout
.
If true, any response from this backend with a 5xx
status code will be enough for it to be considered unhealthy and taken out of rotation.
The URL path to check on each backend. If the backend does not respond to this request it is considered to be down.
How long, in seconds, to wait for a check attempt before considering it failed.
Must be less than check_interval
.
What ciphers to use for SSL connections served by this NodeBalancer.
legacy
is considered insecure and should only be used if necessary.
The port this Config is for. These values must be unique across configs on a single NodeBalancer (you can't have two configs for port 80, for example). While some ports imply some protocols, no enforcement is done and you may configure your NodeBalancer however is useful to you. For example, while port 443 is generally used for HTTPS, you do not need SSL configured to have a NodeBalancer listening on port 443.
The protocol this port is configured to serve.
The
http
andtcp
protocols do not supportssl_cert
andssl_key
.The
https
protocol is mutually required withssl_cert
andssl_key
.
Review our guide on Available Protocols for information on protocol features.
ProxyProtocol is a TCP extension that sends initial TCP connection information such as source/destination IPs and ports to backend devices. This information would be lost otherwise. Backend devices must be configured to work with ProxyProtocol if enabled.
- If ommited, or set to
none
, the NodeBalancer doesn't send any auxilary data over TCP connections. This is the default. - If set to
v1
, the human-readable header format (Version 1) is used. Requirestcp
protocol. - If set to
v2
, the binary header format (Version 2) is used. Requirestcp
protocol.
The PEM-formatted public SSL certificate (or the combined PEM-formatted SSL certificate and Certificate Authority chain) that should be served on this NodeBalancerConfig's port.
Line breaks must be represented as "\n" in the string for requests (but not when using the Linode CLI).
Diffie-Hellman Parameters can be included in this value to enable forward secrecy.
The contents of this field will not be shown in any responses that display
the NodeBalancerConfig. Instead, <REDACTED>
will be printed where the field
appears.
The read-only ssl_commonname
and ssl_fingerprint
fields in a NodeBalancerConfig
response are automatically derived from your certificate. Please refer to these fields to
verify that the appropriate certificate was assigned to your NodeBalancerConfig.
The PEM-formatted private key for the SSL certificate set in the ssl_cert
field.
Line breaks must be represented as "\n" in the string for requests (but not when using the Linode CLI).
The contents of this field will not be shown in any responses that display
the NodeBalancerConfig. Instead, <REDACTED>
will be printed where the field
appears.
The read-only ssl_commonname
and ssl_fingerprint
fields in a NodeBalancerConfig
response are automatically derived from your certificate. Please refer to these fields to
verify that the appropriate certificate was assigned to your NodeBalancerConfig.
Controls how session stickiness is handled on this port.
- If set to
none
connections will always be assigned a backend based on the algorithm configured. If set to
table
sessions from the same remote address will be routed to the same backend.For HTTP or HTTPS clients,
http_cookie
allows sessions to be routed to the same backend based on a cookie set by the NodeBalancer.
Request Samples
- Shell
- CLI
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"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",
"ssl_cert": "-----BEGIN CERTIFICATE-----\nCERTIFICATE_INFORMATION\n-----END CERTIFICATE-----",
"ssl_key": "-----BEGIN PRIVATE KEY-----\nPRIVATE_KEY_INFORMATION\n-----END PRIVATE KEY-----",
"cipher_suite": "recommended"
}' \
https://api.linode.com/v4/nodebalancers/12345/configs
Response Samples
- 200
- default
{
"id": 1234,
"port": 80,
"protocol": "http",
"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",
"nodebalancer_id": 12345,
"ssl_commonname": "www.example.com",
"ssl_fingerprint": "00:01:02:03:04:05:06:07:08:09:0A:0B:0C:0D:0E:0F:10:11:12:13",
"ssl_cert": "<REDACTED>",
"ssl_key": "<REDACTED>",
"nodes_status": {
"up": 4,
"down": 0
}
}
Responses
200: Config created successfully.
This config's unique ID
The port this Config is for. These values must be unique across configs on a single NodeBalancer (you can't have two configs for port 80, for example). While some ports imply some protocols, no enforcement is done and you may configure your NodeBalancer however is useful to you. For example, while port 443 is generally used for HTTPS, you do not need SSL configured to have a NodeBalancer listening on port 443.
The protocol this port is configured to serve.
The
http
andtcp
protocols do not supportssl_cert
andssl_key
.The
https
protocol is mutually required withssl_cert
andssl_key
.
Review our guide on Available Protocols for information on protocol features.
What algorithm this NodeBalancer should use for routing traffic to backends.
Controls how session stickiness is handled on this port.
- If set to
none
connections will always be assigned a backend based on the algorithm configured. If set to
table
sessions from the same remote address will be routed to the same backend.For HTTP or HTTPS clients,
http_cookie
allows sessions to be routed to the same backend based on a cookie set by the NodeBalancer.
The type of check to perform against backends to ensure they are serving requests. This is used to determine if backends are up or down.
- If
none
no check is performed. connection
requires only a connection to the backend to succeed.http
andhttp_body
rely on the backend serving HTTP, and that the response returned matches what is expected.
How often, in seconds, to check that backends are up and serving requests.
Must be greater than check_timeout
.
How long, in seconds, to wait for a check attempt before considering it failed.
Must be less than check_interval
.
How many times to attempt a check before considering a backend to be down.
The URL path to check on each backend. If the backend does not respond to this request it is considered to be down.
This value must be present in the response body of the check in order for it to pass. If this value is not present in the response body of a check request, the backend is considered to be down.
If true, any response from this backend with a 5xx
status code will be enough for it to be considered unhealthy and taken out of rotation.
ProxyProtocol is a TCP extension that sends initial TCP connection information such as source/destination IPs and ports to backend devices. This information would be lost otherwise. Backend devices must be configured to work with ProxyProtocol if enabled.
- If ommited, or set to
none
, the NodeBalancer doesn't send any auxilary data over TCP connections. This is the default. - If set to
v1
, the human-readable header format (Version 1) is used. Requirestcp
protocol. - If set to
v2
, the binary header format (Version 2) is used. Requirestcp
protocol.
What ciphers to use for SSL connections served by this NodeBalancer.
legacy
is considered insecure and should only be used if necessary.
The ID for the NodeBalancer this config belongs to.
The read-only common name automatically derived from the SSL certificate assigned to this NodeBalancerConfig. Please refer to this field to verify that the appropriate certificate is assigned to your NodeBalancerConfig.
The read-only SHA1-encoded fingerprint automatically derived from the SSL certificate assigned to this NodeBalancerConfig. Please refer to this field to verify that the appropriate certificate is assigned to your NodeBalancerConfig.
The PEM-formatted public SSL certificate (or the combined PEM-formatted SSL certificate and Certificate Authority chain) that should be served on this NodeBalancerConfig's port.
Line breaks must be represented as "\n" in the string for requests (but not when using the Linode CLI).
Diffie-Hellman Parameters can be included in this value to enable forward secrecy.
The contents of this field will not be shown in any responses that display
the NodeBalancerConfig. Instead, <REDACTED>
will be printed where the field
appears.
The read-only ssl_commonname
and ssl_fingerprint
fields in a NodeBalancerConfig
response are automatically derived from your certificate. Please refer to these fields to
verify that the appropriate certificate was assigned to your NodeBalancerConfig.
The PEM-formatted private key for the SSL certificate set in the ssl_cert
field.
Line breaks must be represented as "\n" in the string for requests (but not when using the Linode CLI).
The contents of this field will not be shown in any responses that display
the NodeBalancerConfig. Instead, <REDACTED>
will be printed where the field
appears.
The read-only ssl_commonname
and ssl_fingerprint
fields in a NodeBalancerConfig
response are automatically derived from your certificate. Please refer to these fields to
verify that the appropriate certificate was assigned to your NodeBalancerConfig.
A structure containing information about the health of the backends for this port. This information is updated periodically as checks are performed against backends.
The number of backends considered to be "UP" and healthy, and that are serving requests.
The number of backends considered to be "DOWN" and unhealthy. These are not in rotation, and not serving requests.
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.