Backend

A backend (also sometimes called an origin server) is a server identified by IP address or hostname, from which Fastly will fetch your content. There can be multiple backends attached to a service, but each backend is specific to one service. By default, the first backend added to a service configuration will be used for all requests (provided it meets any conditions attached to it). If multiple backends are defined for a service, the first one that has no attached conditions, or whose conditions are satisfied for the current request, will be used, unless that behavior is modified using the auto_loadbalance field described below. These endpoints can be used with static backends only, not dynamic backends.

Data model

addressstringA hostname, IPv4, or IPv6 address for the backend. This is the preferred way to specify the location of your backend.
auto_loadbalancebooleanWhether or not this backend should be automatically load balanced. If true, all backends with this setting that don't have a request_condition will be selected based on their weight.
between_bytes_timeoutintegerMaximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using bereq.between_bytes_timeout.
client_certstringUnused.
commentstringA freeform descriptive note.
connect_timeoutintegerMaximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic 503 response will be presented instead. May be set at runtime using bereq.connect_timeout.
first_byte_timeoutintegerMaximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent. If exceeded, the connection is aborted and a synthetic 503 response will be presented instead. May be set at runtime using bereq.first_byte_timeout.
healthcheckstringThe name of the healthcheck to use with this backend.
hostnamestringThe hostname of the backend. May be used as an alternative to address to set the backend location.
ipv4stringIPv4 address of the backend. May be used as an alternative to address to set the backend location.
ipv6stringIPv6 address of the backend. May be used as an alternative to address to set the backend location.
keepalive_timeintegerHow long in seconds to keep a persistent connection to the backend between requests.
max_connintegerMaximum number of concurrent connections this backend will accept.
max_tls_versionstringMaximum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic 503 error response will be generated.
min_tls_versionstringMinimum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic 503 error response will be generated.
namestringThe name of the backend.
override_hoststringIf set, will replace the client-supplied HTTP Host header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing bereq.http.Host in VCL.
portintegerPort on which the backend server is listening for connections from Fastly. Setting port to 80 or 443 will also set use_ssl automatically (to false and true respectively), unless explicitly overridden by setting use_ssl in the same request.
request_conditionstringName of a Condition, which if satisfied, will select this backend during a request. If set, will override any auto_loadbalance setting. By default, the first backend added to a service is selected for all requests.
share_keystringValue that when shared across backends will enable those backends to share the same health check.
shieldstringIdentifier of the POP to use as a shield.
ssl_ca_certstringCA certificate attached to origin.
ssl_cert_hostnamestringOverrides ssl_hostname, but only for cert verification. Does not affect SNI at all.
ssl_check_certbooleanBe strict on checking SSL certs. [Default true]
ssl_ciphersstringList of OpenSSL ciphers to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic 503 error response will be generated.
ssl_client_certstringClient certificate attached to origin.
ssl_client_keystringClient key attached to origin.
ssl_hostnamestringDeprecated. Use ssl_cert_hostname and ssl_sni_hostname to configure certificate validation.
ssl_sni_hostnamestringOverrides ssl_hostname, but only for SNI in the handshake. Does not affect cert validation at all.
tcp_keepalive_enablebooleanWhether to enable TCP keepalives for backend connections. Varnish defaults to using keepalives if this is unspecified.
tcp_keepalive_intervalintegerInterval in seconds between subsequent keepalive probes.
tcp_keepalive_probesintegerNumber of unacknowledged probes to send before considering the connection dead.
tcp_keepalive_timeintegerInterval in seconds between the last data packet sent and the first keepalive probe.
use_sslbooleanWhether or not to require TLS for connections to this backend.
weightintegerWeight used to load balance this backend against others. May be any positive integer. If auto_loadbalance is true, the chance of this backend being selected is equal to its own weight over the sum of all weights for backends that have auto_loadbalance set to true.
created_atstringDate and time in ISO 8601 format. Read-only.
deleted_atstringDate and time in ISO 8601 format. Read-only.
lockedbooleanIndicates whether the version of the service this backend is attached to accepts edits. Read-only.
service_idstringAlphanumeric string identifying the service. Read-only.
updated_atstringDate and time in ISO 8601 format. Read-only.
versionintegerInteger identifying a service version. Read-only.

Endpoints

List backends

GET/service/service_id/version/version_id/backend

Create a backend

POST/service/service_id/version/version_id/backend

Describe a backend

GET/service/service_id/version/version_id/backend/backend_name

Update a backend

PUT/service/service_id/version/version_id/backend/backend_name

Delete a backend

DELETE/service/service_id/version/version_id/backend/backend_name