dynamic-backend-options
Options for register-dynamic-backend.
resource dynamic-backend-options;F constructor
constructor: func() -> dynamic-backend-options;Constructs an options resource with default values for all other possible fields for the backend, which can be overridden using the other methods provided.
F override-host
override-host: func(value: string);Sets a host header override when contacting this backend.
This will force the value of the “Host” header to the given string when sending out the origin request. If this is not set and no header already exists, the “Host” header will default to the target.
For more information, see the Fastly documentation on override hosts.
F connect-timeout
connect-timeout: func(value: u32);Sets the connection timeout, in milliseconds, for this backend.
Defaults to 1,000ms (1s).
F first-byte-timeout
first-byte-timeout: func(value: u32);Sets a timeout, in milliseconds, that applies between the time of connection and the time we get the first byte back.
Defaults to 15,000ms (15s).
F between-bytes-timeout
between-bytes-timeout: func(value: u32);Sets a timeout, in milliseconds, that applies between any two bytes we receive across the wire.
Defaults to 10,000ms (10s).
F use-tls
use-tls: func(value: bool);Enables or disables TLS to connect to the backend.
When using TLS, Fastly checks the validity of the backend’s certificate, and fails the connection if the certificate is invalid. This check is not optional: an invalid certificate will cause the backend connection to fail (but read on).
By default, the validity check does not require that the certificate hostname matches the
hostname of your request. You can use cert-hostname to request a check of the
certificate hostname.
By default, certificate validity uses a set of public certificate authorities. You can
specify an alternative CA using ca-certificate.
F tls-min-version
tls-min-version: func(value: tls-version);Sets the minimum TLS version for connecting to the backend.
Setting this will enable TLS for the connection as a side effect.
F tls-max-version
tls-max-version: func(value: tls-version);Sets the maximum TLS version for connecting to the backend.
Setting this will enable TLS for the connection as a side effect. (
F cert-hostname
cert-hostname: func(value: string);Defines the hostname that the server certificate should declare, and turn on validation during backend connections.
You should enable this if you are using TLS, and setting this will enable TLS for the connection as a side effect.
If cert-hostname is not provided (default), the server certificate’s hostname may
have any value.
F ca-certificate
ca-certificate: func(value: string);Sets the CA certificate to use when checking the validity of the backend.
Setting this will enable TLS for the connection as a side effect.
If ca-certificate is not provided (default), the backends’s certificate is validated
using a set of public root CAs.
F tls-ciphers
tls-ciphers: func(value: string);Sets the acceptable cipher suites to use for TLS 1.0 - 1.2 connections.
Setting this will enable TLS for the connection as a side effect.
F sni-hostname
sni-hostname: func(value: string);Sets the SNI hostname for the backend connection.
Setting this will enable TLS for the connection as a side effect.
F client-cert
client-cert: func(client-cert: string, key: borrow<secret>);Provides the given client certificate to the server as part of the TLS handshake.
Setting this will enable TLS for the connection as a side effect. Both the certificate and
the key to use should be in standard PEM format; providing the information in another
format will lead to an error. We suggest that (at least the) key should be held in
something like the Fastly secret store for security, with the handle passed to this
function without unpacking it via secret.plaintext; the certificate can be held in a less
secure medium.
(If it is absolutely necessary to get the key from another source, we suggest the use of
secret.from-bytes.
F http-keepalive-time-ms
http-keepalive-time-ms: func(value: u32);Configures up to how long to allow HTTP keepalive connections to remain idle in the connection pool.
F tcp-keepalive-enable
tcp-keepalive-enable: func(value: u32);Configures whether or not to use TCP keepalive on the connection to the backend.
F tcp-keepalive-interval-secs
tcp-keepalive-interval-secs: func(value: u32);Configures how long to wait in between each TCP keepalive probe sent to the backend.
F tcp-keepalive-probes
tcp-keepalive-probes: func(value: u32);Configures up to how many TCP keepalive probes to send to the backend before the connection is considered dead.
F tcp-keepalive-time-secs
tcp-keepalive-time-secs: func(value: u32);Configures how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.
F max-connections
max-connections: func(value: u32);Configures the maximum number of connections to keep in the local connection pool.
0 is unlimited.
Note that this limit is best determined experimentally, since the total number of connections to the backend will depend on POP sizes, HTTP keepalive limits, and the traffic patterns for individual POPs.
F max-use
max-use: func(value: u32);Configures how many times a pooled connection can be used.
0 is unlimited.
F max-lifetime-ms
max-lifetime-ms: func(value: u32);Configures an upper bound for how long an HTTP keepalive connection can be open before we stop trying to reuse it.
0 is unlimited.
F pooling
pooling: func(value: bool);Determines whether or not connections to the same backend should be pooled across different sandboxes.
Fastly considers two backends “the same” if they’re registered with the same name and the exact same settings. In those cases, when pooling is enabled, if one sandbox opens a connection to this backend it will be left open, and can be re-used by a different sandbox. This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).
By default, pooling is enabled for dynamic backends.
F grpc
grpc: func(value: bool);Sets whether or not this backend will be used for gRPC traffic.
Warning: Setting this for backends that will not be used with gRPC may have unpredictable effects. Fastly only currently guarantees that this connection will work for gRPC traffic.
F prefer-ipv6
prefer-ipv6: func(value: bool);Whether to prefer attempting connections to IPv6 addresses over IPv4 addresses when a hostname has both A and AAAA records.
The Compute platform defaults to true, and will attempt IPv6 first if a AAAA record
is present.
F healthcheck
healthcheck: func(value: healthcheck-options);Adds a created healthcheck builder to this dynamic backend to be used when checking if the backend is healthy. A healthcheck can be created with the default HealthcheckBuilder::new(host: String) and additional options can be set through that.