configurations
Creates, updates, deletes, gets or lists a configurations resource.
Overview
| Name | configurations |
| Type | Resource |
| Id | linode.nodebalancers.configurations |
Fields
The following fields are returned by SELECT queries:
- get
- list
The requested NodeBalancer config.
| Name | Datatype | Description |
|---|---|---|
id | integer | Read-only This config's unique ID. |
nodebalancer_id | integer | Read-only The ID for the NodeBalancer this config belongs to. |
algorithm | string | The algorithm this UDP NodeBalancer uses to route traffic to backends. (roundrobin, leastconn, ring_hash) (default: roundrobin, example: leastconn) |
check | string | The type of check to perform against backends to ensure they are serving requests. This determines if backends are up or down. - If none, no check is performed. - connection requires only a connection to the backend to succeed. - http and http_body rely on the backend serving HTTP, and that the response returned matches what is expected. (none, connection, http, http_body) (default: none, example: http_body) |
check_attempts | integer | How many times to attempt a check before considering a backend to be down. |
check_body | string | This value must be present in the response body of the check in order for it to pass. If this value isn't present in the response body of a check request, the backend is considered to be down. (example: it works) |
check_interval | integer | How often, in seconds, to check that backends are up and serving requests. Must be greater than check_timeout. |
check_passive | boolean | Read-only Must be false for UDP. |
check_path | string | The URL path to check on each backend. If the backend does not respond to this request, it's considered to be down. (example: /test, pattern: ^[a-zA-Z0-9/-%?&=.]*$) |
check_timeout | integer | How long, in seconds, to wait for a check attempt before considering it failed. Must be less than check_interval. |
cipher_suite | string | Read-only Not applicable for udp configs. (example: none) |
nodes_status | object | Read-only Describes the health of the backends for this port. This data updates periodically as checks are performed against backends. |
port | integer | This is the port the NodeBalancer listens on for this configuration. Port numbers must be unique across TCP, HTTP, and HTTPS configurations on a single NodeBalancer. However, ports assigned to TCP, HTTP, or HTTPS configurations can also be reused for UDP configurations. For example, Port 80 can simultaneously serve a TCP and a UDP configuration on the same NodeBalancer, but it can't be shared by both a TCP and an HTTP configuration. Although certain ports are traditionally associated with specific protocols, this isn't strictly enforced, and you may configure your NodeBalancer however you find useful. |
protocol | string | The protocol the port is configured to serve, udp in this case. Review our guide on Available Protocols for information on protocol features. (udp) (default: http, example: udp) |
proxy_protocol | string | Read-only Must be none for UDP. (example: none) |
ssl_cert | string | Read-only Not applicable for UDP configs. |
ssl_commonname | string | Read-only Not applicable for UPD configs. (example: ) |
ssl_fingerprint | string | Read-only Not applicable for UDP configs. (example: ) |
ssl_key | string | Read-only Not applicable for UDP configs. |
stickiness | string | Controls how session stickiness is handled on this port. - If set to none, connections are assigned a backend server based on the algorithm configured. - If set to session, all packets with the same session identifiers are routed to the same backend server. Two packets are considered part of the same session if they share the same source and destination IP addresses or ports, and are received within a short time window. - If set to source_ip, the NodeBalancer uses the client's source IP address to route all packets from the same client to the same backend server. (none, session, source_ip) (default: session, example: none) |
udp_check_port | integer | UDP NodeBalancers use TCP and HTTP active health checks to ensure back-end nodes can receive traffic. You can specify the health check port that the backend node listens on, which may differ from the UDP port used to serve traffic. |
udp_session_timeout | integer | Read-only The maximum duration in seconds, a UDP session can be idle before it is closed. |
A paginated list of NodeBalancer Configs.
| Name | Datatype | Description |
|---|---|---|
id | integer | Read-only This config's unique ID. |
nodebalancer_id | integer | Read-only The ID for the NodeBalancer this config belongs to. |
algorithm | string | The algorithm this UDP NodeBalancer uses to route traffic to backends. (roundrobin, leastconn, ring_hash) (default: roundrobin, example: leastconn) |
check | string | The type of check to perform against backends to ensure they are serving requests. This determines if backends are up or down. - If none, no check is performed. - connection requires only a connection to the backend to succeed. - http and http_body rely on the backend serving HTTP, and that the response returned matches what is expected. (none, connection, http, http_body) (default: none, example: http_body) |
check_attempts | integer | How many times to attempt a check before considering a backend to be down. |
check_body | string | This value must be present in the response body of the check in order for it to pass. If this value isn't present in the response body of a check request, the backend is considered to be down. (example: it works) |
check_interval | integer | How often, in seconds, to check that backends are up and serving requests. Must be greater than check_timeout. |
check_passive | boolean | Read-only Must be false for UDP. |
check_path | string | The URL path to check on each backend. If the backend does not respond to this request, it's considered to be down. (example: /test, pattern: ^[a-zA-Z0-9/-%?&=.]*$) |
check_timeout | integer | How long, in seconds, to wait for a check attempt before considering it failed. Must be less than check_interval. |
cipher_suite | string | Read-only Not applicable for udp configs. (example: none) |
nodes_status | object | Read-only Describes the health of the backends for this port. This data updates periodically as checks are performed against backends. |
port | integer | This is the port the NodeBalancer listens on for this configuration. Port numbers must be unique across TCP, HTTP, and HTTPS configurations on a single NodeBalancer. However, ports assigned to TCP, HTTP, or HTTPS configurations can also be reused for UDP configurations. For example, Port 80 can simultaneously serve a TCP and a UDP configuration on the same NodeBalancer, but it can't be shared by both a TCP and an HTTP configuration. Although certain ports are traditionally associated with specific protocols, this isn't strictly enforced, and you may configure your NodeBalancer however you find useful. |
protocol | string | The protocol the port is configured to serve, udp in this case. Review our guide on Available Protocols for information on protocol features. (udp) (default: http, example: udp) |
proxy_protocol | string | Read-only Must be none for UDP. (example: none) |
ssl_cert | string | Read-only Not applicable for UDP configs. |
ssl_commonname | string | Read-only Not applicable for UPD configs. (example: ) |
ssl_fingerprint | string | Read-only Not applicable for UDP configs. (example: ) |
ssl_key | string | Read-only Not applicable for UDP configs. |
stickiness | string | Controls how session stickiness is handled on this port. - If set to none, connections are assigned a backend server based on the algorithm configured. - If set to session, all packets with the same session identifiers are routed to the same backend server. Two packets are considered part of the same session if they share the same source and destination IP addresses or ports, and are received within a short time window. - If set to source_ip, the NodeBalancer uses the client's source IP address to route all packets from the same client to the same backend server. (none, session, source_ip) (default: session, example: none) |
udp_check_port | integer | UDP NodeBalancers use TCP and HTTP active health checks to ensure back-end nodes can receive traffic. You can specify the health check port that the backend node listens on, which may differ from the UDP port used to serve traffic. |
udp_session_timeout | integer | Read-only The maximum duration in seconds, a UDP session can be idle before it is closed. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | nodeBalancerId, configId | Returns configuration information for a single port of this NodeBalancer. Learn more... Learn more... | |
list | select | nodeBalancerId | page, page_size | 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. Learn more... Learn more... |
create | insert | nodeBalancerId, nodes | Creates a NodeBalancer configuration, which allows the NodeBalancer to accept traffic on a new port. You will need to add NodeBalancer nodes to the new configuration before it can actually serve requests. > 🚧 > > You can configure UDP on the same NodeBalancer that also uses TCP, HTTP, or HTTPS, but only when managing it through the API. If UDP is configured and you make changes to the TCP, HTTP or HTTPS settings in Cloud Manager, the existing UDP configuration will be overwritten. This is because Cloud Manager doesn't currently support UDP. CLI: HTTPS. <br /> linode-cli nodebalancers config-create 12345 \<br /> --port 443 \<br /> --protocol https \<br /> --algorithm roundrobin \<br /> --stickiness http_cookie \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works" \<br /> --check_passive true \<br /> --proxy_protocol "none" \<br /> --ssl_cert "-----BEGIN CERTIFICATE-----<br /> CERTIFICATE_INFORMATION<br /> -----END CERTIFICATE-----" \<br /> --ssl_key "-----BEGIN PRIVATE KEY-----<br /> PRIVATE_KEY_INFORMATION<br /> -----END PRIVATE KEY-----" \<br /> --cipher_suite recommended<br /> Learn more... - CLI: UDP. <br /> linode-cli nodebalancers config-create 12345 \<br /> --port 80 \<br /> --protocol udp \<br /> --algorithm ring_hash \<br /> --stickiness session \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works" \<br /> --udp_check_port 80<br /> Learn more... - CLI: TCP. <br /> linode-cli nodebalancers config-create 12345 \<br /> --port 80 \<br /> --protocol tcp \<br /> --algorithm roundrobin \<br /> --stickiness none \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works" \<br /> --proxy_protocol "v2"<br /> Learn more... - CLI: HTTP. <br /> linode-cli nodebalancers config-create 12345 \<br /> --port 440 \<br /> --protocol http \<br /> --algorithm roundrobin \<br /> --stickiness http_cookie \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works"<br /> Learn more... Learn more... | |
update | replace | nodeBalancerId, configId | Updates the configuration for a single port on a NodeBalancer. > 🚧 > > You can configure UDP on the same NodeBalancer that also uses TCP, HTTP, or HTTPS, but only when managing it through the API. If UDP is configured and you make changes to the TCP, HTTP or HTTPS settings in Cloud Manager, the existing UDP configuration will be overwritten. This is because Cloud Manager doesn't currently support UDP. CLI: HTTPS. <br /> linode-cli nodebalancers config-update \<br /> 12345 4567 \<br /> --port 443 \<br /> --protocol https \<br /> --algorithm roundrobin \<br /> --stickiness http_cookie \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works" \<br /> --check_passive true \<br /> --proxy_protocol "none" \<br /> --ssl_cert "-----BEGIN CERTIFICATE-----<br /> CERTIFICATE_INFORMATION<br /> -----END CERTIFICATE-----" \<br /> --ssl_key "-----BEGIN PRIVATE KEY-----<br /> PRIVATE_KEY_INFORMATION<br /> -----END PRIVATE KEY-----" \<br /> --cipher_suite recommended<br /> Learn more... - CLI: UDP. <br /> linode-cli nodebalancers config-update \<br /> 12345 4567 \<br /> --port 80 \<br /> --protocol udp \<br /> --algorithm ring_hash \<br /> --stickiness session \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works" \<br /> --udp_check_port 80<br /> Learn more... - CLI: TCP. <br /> linode-cli nodebalancers config-update \<br /> 12345 4567 \<br /> --port 80 \<br /> --protocol tcp \<br /> --algorithm roundrobin \<br /> --stickiness none \<br /> --stickiness http_cookie \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works" \<br /> --proxy_protocol "v2"<br /> Learn more... - CLI: HTTP. <br /> linode-cli nodebalancers config-update \<br /> 12345 4567 \<br /> --port 440 \<br /> --protocol http \<br /> --algorithm roundrobin \<br /> --stickiness http_cookie \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works"<br /> Learn more... Learn more... | |
delete | delete | nodeBalancerId, configId | Deletes the Config for a port of this NodeBalancer. This cannot be undone. Once completed, this NodeBalancer will no longer respond to requests on the given port. This also deletes all associated NodeBalancerNodes, but the Linodes they were routing traffic to will be unchanged and will not be removed. Learn more... Learn more... | |
rebuild | exec | nodeBalancerId, configId, nodes | Rebuilds a NodeBalancer config and its nodes that you have permission to modify. Use this operation to update a NodeBalancer's config and nodes with a single request. > 🚧 > > You can configure UDP on the same NodeBalancer that also uses TCP, HTTP, or HTTPS, but only when managing it through the API. If UDP is configured and you make changes to the TCP, HTTP or HTTPS settings in Cloud Manager, the existing UDP configuration will be overwritten. This is because Cloud Manager doesn't currently support UDP. CLI: HTTPS. <br /> linode-cli nodebalancers config-rebuild \<br /> 12345 4567 \<br /> --port 443 \<br /> --protocol https \<br /> --algorithm roundrobin \<br /> --stickiness http_cookie \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works" \<br /> --check_passive true \<br /> --proxy_protocol "none" \<br /> --ssl_cert "-----BEGIN CERTIFICATE-----<br /> CERTIFICATE_INFORMATION<br /> -----END CERTIFICATE-----" \<br /> --ssl_key "-----BEGIN PRIVATE KEY-----<br /> PRIVATE_KEY_INFORMATION<br /> -----END PRIVATE KEY-----" \<br /> --cipher_suite recommended \<br /> --nodes.label "node1" --nodes.address "192.168.210.120:80" --nodes.mode "accept" --nodes.weight 50 \<br /> --nodes '[{"address":"192.168.210.122:80","label":"node2","weight":50,"mode":"accept"}]' \<br /> --nodes '[{"address":"10.0.0.45:80","label":"vpc-node","weight":10,"mode":"accept","subnet_id:1"}]'<br /> Learn more... - CLI: UDP. <br /> linode-cli nodebalancers config-rebuild \<br /> 12345 4567 \<br /> --port 80 \<br /> --protocol udp \<br /> --algorithm ring_hash \<br /> --udp_check_port 80 \<br /> --nodes.label "node1" --nodes.address "192.168.210.120:80" --nodes.mode "accept" --nodes.weight 50 \<br /> --nodes '[{"address":"192.168.210.122:80","label":"node2","weight":50}]' \<br /> --nodes '[{"address":"10.0.0.45:80","label":"vpc-node","weight":10,"mode":"accept","subnet_id:1"}]'<br /> Learn more... - CLI: TCP. <br /> linode-cli nodebalancers config-rebuild \<br /> 12345 4567 \<br /> --port 80 \<br /> --protocol tcp \<br /> --algorithm roundrobin \<br /> --stickiness none \<br /> --proxy_protocol "v2"<br /> --nodes.label "node1" --nodes.address "192.168.210.120:80" --nodes.mode "accept" --nodes.weight 50 \<br /> --nodes '[{"address":"192.168.210.122:80","label":"node2","weight":50,"mode":"accept"}]' \<br /> --nodes '[{"address":"10.0.0.45:80","label":"vpc-node","weight":10,"mode":"accept","subnet_id:1"}]'<br /> Learn more... - CLI: HTTP. <br /> linode-cli nodebalancers config-rebuild \<br /> 12345 4567 \<br /> --port 440 \<br /> --protocol http \<br /> --algorithm roundrobin \<br /> --stickiness none \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works" \<br /> --nodes.label "node1" --nodes.address "192.168.210.120:80" --nodes.mode "accept" --nodes.weight 50 \<br /> --nodes '[{"address":"192.168.210.122:80","label":"node2","weight":50,"mode":"accept"}]' \<br /> --nodes '[{"address":"10.0.0.45:80","label":"vpc-node","weight":10,"mode":"accept","subnet_id:1"}]'<br /> Learn more... Learn more... |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
configId | string | The ID of the Config to access. |
nodeBalancerId | string | The ID of the NodeBalancer. (example: {{nodeBalancerId}}) |
page | integer | The page of a collection to return. |
page_size | integer | The number of items to return per page. |
SELECT examples
- get
- list
Returns configuration information for a single port of this NodeBalancer.
Learn more...
Learn more...
SELECT
id,
nodebalancer_id,
algorithm,
check,
check_attempts,
check_body,
check_interval,
check_passive,
check_path,
check_timeout,
cipher_suite,
nodes_status,
port,
protocol,
proxy_protocol,
ssl_cert,
ssl_commonname,
ssl_fingerprint,
ssl_key,
stickiness,
udp_check_port,
udp_session_timeout
FROM linode.nodebalancers.configurations
WHERE nodeBalancerId = '{{ nodeBalancerId }}' -- required
AND configId = '{{ configId }}' -- required
;
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.
Learn more...
Learn more...
SELECT
id,
nodebalancer_id,
algorithm,
check,
check_attempts,
check_body,
check_interval,
check_passive,
check_path,
check_timeout,
cipher_suite,
nodes_status,
port,
protocol,
proxy_protocol,
ssl_cert,
ssl_commonname,
ssl_fingerprint,
ssl_key,
stickiness,
udp_check_port,
udp_session_timeout
FROM linode.nodebalancers.configurations
WHERE nodeBalancerId = '{{ nodeBalancerId }}' -- required
AND page = '{{ page }}'
AND page_size = '{{ page_size }}'
;
INSERT examples
- create
- Manifest
Creates a NodeBalancer configuration, which allows the NodeBalancer to accept traffic on a new port. You will need to add NodeBalancer nodes to the new configuration before it can actually serve requests.
> 🚧
>
> You can configure UDP on the same NodeBalancer that also uses TCP, HTTP, or HTTPS, but only when managing it through the API. If UDP is configured and you make changes to the TCP, HTTP or HTTPS settings in Cloud Manager, the existing UDP configuration will be overwritten. This is because Cloud Manager doesn't currently support UDP. CLI: HTTPS.
<br /> linode-cli nodebalancers config-create 12345 \<br /> --port 443 \<br /> --protocol https \<br /> --algorithm roundrobin \<br /> --stickiness http_cookie \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works" \<br /> --check_passive true \<br /> --proxy_protocol "none" \<br /> --ssl_cert "-----BEGIN CERTIFICATE-----<br /> CERTIFICATE_INFORMATION<br /> -----END CERTIFICATE-----" \<br /> --ssl_key "-----BEGIN PRIVATE KEY-----<br /> PRIVATE_KEY_INFORMATION<br /> -----END PRIVATE KEY-----" \<br /> --cipher_suite recommended<br />
Learn more...
- CLI: UDP.
<br /> linode-cli nodebalancers config-create 12345 \<br /> --port 80 \<br /> --protocol udp \<br /> --algorithm ring_hash \<br /> --stickiness session \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works" \<br /> --udp_check_port 80<br />
Learn more...
- CLI: TCP.
<br /> linode-cli nodebalancers config-create 12345 \<br /> --port 80 \<br /> --protocol tcp \<br /> --algorithm roundrobin \<br /> --stickiness none \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works" \<br /> --proxy_protocol "v2"<br />
Learn more...
- CLI: HTTP.
<br /> linode-cli nodebalancers config-create 12345 \<br /> --port 440 \<br /> --protocol http \<br /> --algorithm roundrobin \<br /> --stickiness http_cookie \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works"<br />
Learn more...
Learn more...
INSERT INTO linode.nodebalancers.configurations (
algorithm,
check,
check_attempts,
check_body,
check_interval,
check_path,
check_timeout,
nodes,
port,
protocol,
stickiness,
udp_check_port,
nodeBalancerId
)
SELECT
'{{ algorithm }}',
'{{ check }}',
{{ check_attempts }},
'{{ check_body }}',
{{ check_interval }},
'{{ check_path }}',
{{ check_timeout }},
'{{ nodes }}' /* required */,
{{ port }},
'{{ protocol }}',
'{{ stickiness }}',
{{ udp_check_port }},
'{{ nodeBalancerId }}'
RETURNING
id,
nodebalancer_id,
algorithm,
check,
check_attempts,
check_body,
check_interval,
check_passive,
check_path,
check_timeout,
cipher_suite,
nodes_status,
port,
protocol,
proxy_protocol,
ssl_cert,
ssl_commonname,
ssl_fingerprint,
ssl_key,
stickiness,
udp_check_port,
udp_session_timeout
;
# Description fields are for documentation purposes
- name: configurations
props:
- name: nodeBalancerId
value: "{{ nodeBalancerId }}"
description: Required parameter for the configurations resource.
- name: algorithm
value: "{{ algorithm }}"
description: |
The algorithm this UDP NodeBalancer uses to route traffic to backends.
valid_values: ['roundrobin', 'leastconn', 'ring_hash']
default: roundrobin
- name: check
value: "{{ check }}"
description: |
The type of check to perform against backends to ensure they are serving requests. This determines if backends are up or down.
- If `none`, no check is performed.
- `connection` requires only a connection to the backend to succeed.
- `http` and `http_body` rely on the backend serving HTTP, and that the response returned matches what is expected.
valid_values: ['none', 'connection', 'http', 'http_body']
default: none
- name: check_attempts
value: {{ check_attempts }}
description: |
How many times to attempt a check before considering a backend to be down.
default: 3
- name: check_body
value: "{{ check_body }}"
description: |
This value must be present in the response body of the check in order for it to pass. If this value isn't present in the response body of a check request, the backend is considered to be down.
- name: check_interval
value: {{ check_interval }}
description: |
How often, in seconds, to check that backends are up and serving requests.
Must be greater than `check_timeout`.
default: 5
- name: check_path
value: "{{ check_path }}"
description: |
The URL path to check on each backend. If the backend does not respond to this request, it's considered to be down.
- name: check_timeout
value: {{ check_timeout }}
description: |
How long, in seconds, to wait for a check attempt before considering it failed.
Must be less than `check_interval`.
default: 30
- name: nodes
description: |
The NodeBalancer nodes that serve this configuration.
value:
- address: "{{ address }}"
config_id: {{ config_id }}
id: {{ id }}
label: "{{ label }}"
mode: "{{ mode }}"
nodebalancer_id: {{ nodebalancer_id }}
status: "{{ status }}"
subnet_id: {{ subnet_id }}
weight: {{ weight }}
- name: port
value: {{ port }}
description: |
This is the port the NodeBalancer listens on for this configuration. Port numbers must be unique across TCP, HTTP, and HTTPS configurations on a single NodeBalancer. However, ports assigned to TCP, HTTP, or HTTPS configurations can also be reused for UDP configurations. For example, Port 80 can simultaneously serve a TCP and a UDP configuration on the same NodeBalancer, but it can't be shared by both a TCP and an HTTP configuration. Although certain ports are traditionally associated with specific protocols, this isn't strictly enforced, and you may configure your NodeBalancer however you find useful.
default: 80
- name: protocol
value: "{{ protocol }}"
description: |
The protocol the port is configured to serve, `udp` in this case. Review our guide on [Available Protocols](https://www.linode.com/docs/products/networking/nodebalancers/guides/protocols/) for information on protocol features.
valid_values: ['udp']
default: http
- name: stickiness
value: "{{ stickiness }}"
description: |
Controls how session stickiness is handled on this port.
- If set to `none`, connections are assigned a backend server based on the algorithm configured.
- If set to `session`, all packets with the same session identifiers are routed to the same backend server. Two packets are considered part of the same session if they share the same source and destination IP addresses or ports, and are received within a short time window.
- If set to `source_ip`, the NodeBalancer uses the client's source IP address to route all packets from the same client to the same backend server.
valid_values: ['none', 'session', 'source_ip']
default: session
- name: udp_check_port
value: {{ udp_check_port }}
description: |
UDP NodeBalancers use TCP and HTTP active health checks to ensure back-end nodes can receive traffic. You can specify the health check port that the backend node listens on, which may differ from the UDP port used to serve traffic.
default: 80
REPLACE examples
- update
Updates the configuration for a single port on a NodeBalancer.
> 🚧
>
> You can configure UDP on the same NodeBalancer that also uses TCP, HTTP, or HTTPS, but only when managing it through the API. If UDP is configured and you make changes to the TCP, HTTP or HTTPS settings in Cloud Manager, the existing UDP configuration will be overwritten. This is because Cloud Manager doesn't currently support UDP. CLI: HTTPS.
<br /> linode-cli nodebalancers config-update \<br /> 12345 4567 \<br /> --port 443 \<br /> --protocol https \<br /> --algorithm roundrobin \<br /> --stickiness http_cookie \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works" \<br /> --check_passive true \<br /> --proxy_protocol "none" \<br /> --ssl_cert "-----BEGIN CERTIFICATE-----<br /> CERTIFICATE_INFORMATION<br /> -----END CERTIFICATE-----" \<br /> --ssl_key "-----BEGIN PRIVATE KEY-----<br /> PRIVATE_KEY_INFORMATION<br /> -----END PRIVATE KEY-----" \<br /> --cipher_suite recommended<br />
Learn more...
- CLI: UDP.
<br /> linode-cli nodebalancers config-update \<br /> 12345 4567 \<br /> --port 80 \<br /> --protocol udp \<br /> --algorithm ring_hash \<br /> --stickiness session \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works" \<br /> --udp_check_port 80<br />
Learn more...
- CLI: TCP.
<br /> linode-cli nodebalancers config-update \<br /> 12345 4567 \<br /> --port 80 \<br /> --protocol tcp \<br /> --algorithm roundrobin \<br /> --stickiness none \<br /> --stickiness http_cookie \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works" \<br /> --proxy_protocol "v2"<br />
Learn more...
- CLI: HTTP.
<br /> linode-cli nodebalancers config-update \<br /> 12345 4567 \<br /> --port 440 \<br /> --protocol http \<br /> --algorithm roundrobin \<br /> --stickiness http_cookie \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works"<br />
Learn more...
Learn more...
REPLACE linode.nodebalancers.configurations
SET
algorithm = '{{ algorithm }}',
check = '{{ check }}',
check_attempts = {{ check_attempts }},
check_body = '{{ check_body }}',
check_interval = {{ check_interval }},
check_path = '{{ check_path }}',
check_timeout = {{ check_timeout }},
port = {{ port }},
protocol = '{{ protocol }}',
stickiness = '{{ stickiness }}',
udp_check_port = {{ udp_check_port }}
WHERE
nodeBalancerId = '{{ nodeBalancerId }}' --required
AND configId = '{{ configId }}' --required
RETURNING
id,
nodebalancer_id,
algorithm,
check,
check_attempts,
check_body,
check_interval,
check_passive,
check_path,
check_timeout,
cipher_suite,
nodes_status,
port,
protocol,
proxy_protocol,
ssl_cert,
ssl_commonname,
ssl_fingerprint,
ssl_key,
stickiness,
udp_check_port,
udp_session_timeout;
DELETE examples
- delete
Deletes the Config for a port of this NodeBalancer.
This cannot be undone.
Once completed, this NodeBalancer will no longer respond to requests on the given port. This also deletes all associated NodeBalancerNodes, but the Linodes they were routing traffic to will be unchanged and will not be removed.
Learn more...
Learn more...
DELETE FROM linode.nodebalancers.configurations
WHERE nodeBalancerId = '{{ nodeBalancerId }}' --required
AND configId = '{{ configId }}' --required
;
Lifecycle Methods
- rebuild
Rebuilds a NodeBalancer config and its nodes that you have permission to modify.
Use this operation to update a NodeBalancer's config and nodes with a single request.
> 🚧
>
> You can configure UDP on the same NodeBalancer that also uses TCP, HTTP, or HTTPS, but only when managing it through the API. If UDP is configured and you make changes to the TCP, HTTP or HTTPS settings in Cloud Manager, the existing UDP configuration will be overwritten. This is because Cloud Manager doesn't currently support UDP. CLI: HTTPS.
<br /> linode-cli nodebalancers config-rebuild \<br /> 12345 4567 \<br /> --port 443 \<br /> --protocol https \<br /> --algorithm roundrobin \<br /> --stickiness http_cookie \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works" \<br /> --check_passive true \<br /> --proxy_protocol "none" \<br /> --ssl_cert "-----BEGIN CERTIFICATE-----<br /> CERTIFICATE_INFORMATION<br /> -----END CERTIFICATE-----" \<br /> --ssl_key "-----BEGIN PRIVATE KEY-----<br /> PRIVATE_KEY_INFORMATION<br /> -----END PRIVATE KEY-----" \<br /> --cipher_suite recommended \<br /> --nodes.label "node1" --nodes.address "192.168.210.120:80" --nodes.mode "accept" --nodes.weight 50 \<br /> --nodes '[{"address":"192.168.210.122:80","label":"node2","weight":50,"mode":"accept"}]' \<br /> --nodes '[{"address":"10.0.0.45:80","label":"vpc-node","weight":10,"mode":"accept","subnet_id:1"}]'<br />
Learn more...
- CLI: UDP.
<br /> linode-cli nodebalancers config-rebuild \<br /> 12345 4567 \<br /> --port 80 \<br /> --protocol udp \<br /> --algorithm ring_hash \<br /> --udp_check_port 80 \<br /> --nodes.label "node1" --nodes.address "192.168.210.120:80" --nodes.mode "accept" --nodes.weight 50 \<br /> --nodes '[{"address":"192.168.210.122:80","label":"node2","weight":50}]' \<br /> --nodes '[{"address":"10.0.0.45:80","label":"vpc-node","weight":10,"mode":"accept","subnet_id:1"}]'<br />
Learn more...
- CLI: TCP.
<br /> linode-cli nodebalancers config-rebuild \<br /> 12345 4567 \<br /> --port 80 \<br /> --protocol tcp \<br /> --algorithm roundrobin \<br /> --stickiness none \<br /> --proxy_protocol "v2"<br /> --nodes.label "node1" --nodes.address "192.168.210.120:80" --nodes.mode "accept" --nodes.weight 50 \<br /> --nodes '[{"address":"192.168.210.122:80","label":"node2","weight":50,"mode":"accept"}]' \<br /> --nodes '[{"address":"10.0.0.45:80","label":"vpc-node","weight":10,"mode":"accept","subnet_id:1"}]'<br />
Learn more...
- CLI: HTTP.
<br /> linode-cli nodebalancers config-rebuild \<br /> 12345 4567 \<br /> --port 440 \<br /> --protocol http \<br /> --algorithm roundrobin \<br /> --stickiness none \<br /> --check http_body \<br /> --check_interval 90 \<br /> --check_timeout 10 \<br /> --check_attempts 3 \<br /> --check_path "/test" \<br /> --check_body "it works" \<br /> --nodes.label "node1" --nodes.address "192.168.210.120:80" --nodes.mode "accept" --nodes.weight 50 \<br /> --nodes '[{"address":"192.168.210.122:80","label":"node2","weight":50,"mode":"accept"}]' \<br /> --nodes '[{"address":"10.0.0.45:80","label":"vpc-node","weight":10,"mode":"accept","subnet_id:1"}]'<br />
Learn more...
Learn more...
EXEC linode.nodebalancers.configurations.rebuild
@nodeBalancerId='{{ nodeBalancerId }}' --required,
@configId='{{ configId }}' --required
@@json=
'{
"algorithm": "{{ algorithm }}",
"check": "{{ check }}",
"check_attempts": {{ check_attempts }},
"check_body": "{{ check_body }}",
"check_interval": {{ check_interval }},
"check_path": "{{ check_path }}",
"check_timeout": {{ check_timeout }},
"nodes": "{{ nodes }}",
"port": {{ port }},
"protocol": "{{ protocol }}",
"stickiness": "{{ stickiness }}",
"udp_check_port": {{ udp_check_port }}
}'
;