Resource: BackendService
Represents a Backend Service resource.
A backend service defines how Google Cloud load balancers distribute traffic. The backend service configuration contains a set of values, such as the protocol used to connect to backends, various distribution and session settings, health checks, and timeouts. These settings provide fine-grained control over how your load balancer behaves. Most of the settings have default values that allow for easy configuration if you need to get started quickly.
Backend services in Google Compute Engine can be either regionally or globally scoped.
For more information, see Backend Services.
JSON representation |
---|
{ "kind": string, "id": string, "creationTimestamp": string, "name": string, "description": string, "selfLink": string, "backends": [ { object ( |
Fields | |
---|---|
kind |
[Output Only] Type of resource. Always
for backend services. |
id |
[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
creation |
[Output Only] Creation timestamp in RFC3339 text format. |
name |
Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression |
description |
An optional description of this resource. Provide this property when you create the resource. |
self |
[Output Only] Server-defined URL for the resource. |
backends[] |
The list of backends that serve this BackendService. |
health |
The list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks (legacy) resource for health checking this backend service. Not all backend services support legacy health checks. See Load balancer guide. Currently, at most one health check can be specified for each backend service. Backend services with instance group or zonal NEG backends must have a health check. Backend services with internet or serverless NEG backends must not have a health check. |
timeout |
The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings. The default is 30 seconds. The full range of timeout values allowed goes from 1 through 2,147,483,647 seconds. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. Instead, use
. |
port |
Deprecated in favor of
. The TCP port to connect on the backend. The default value is
. For internal passthrough Network Load Balancers and external passthrough Network Load Balancers, omit
. |
protocol |
The protocol this BackendService uses to communicate with backends. Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancers or for Traffic Director for more information. Must be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy. |
fingerprint |
Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the
, otherwise the request will fail with error
. To see the latest fingerprint, make a
request to retrieve a BackendService. A base64-encoded string. |
port |
A named port on a backend instance group representing the port for communication to the backend VMs in that group. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs. For internal passthrough Network Load Balancers and external passthrough Network Load Balancers, omit
. |
enable |
If
, enables Cloud CDN for the backend service of a global external Application Load Balancer. |
session |
Type of session affinity to use. The default is
. Only
and
are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: Session Affinity. |
affinity |
Lifetime of cookies in seconds. This setting is applicable to Application Load Balancers and Traffic Director and requires GENERATED_COOKIE or HTTP_COOKIE session affinity. If set to
, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value is two weeks (
). Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. |
region |
[Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. |
failover |
Requires at least one backend instance group to be defined as a backup (failover) backend. For load balancers that have configurable failover: Internal passthrough Network Load Balancers and external passthrough Network Load Balancers. |
load |
Specifies the load balancer type. A backend service created for one type of load balancer cannot be used with another. For more information, refer to Choosing a load balancer. |
connection |
|
iap |
The configurations for Identity-Aware Proxy on this resource. Not available for internal passthrough Network Load Balancers and external passthrough Network Load Balancers. |
cdn |
Cloud CDN configuration for this BackendService. Only available for specified load balancer types. |
custom |
Headers that the load balancer adds to proxied requests. See Creating custom headers. |
custom |
Headers that the load balancer adds to proxied responses. See Creating custom headers. |
security |
[Output Only] The resource URL for the security policy associated with this backend service. |
edge |
[Output Only] The resource URL for the edge security policy associated with this backend service. |
log |
This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. |
security |
This field specifies the security settings that apply to this backend service. This field is applicable to a global backend service with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. |
locality |
The load balancing algorithm used within the scope of the locality. The possible values are:
This field is applicable to either: If
is not configured—that is, if session affinity remains at the default value of
—then the default value for
is
. If session affinity is set to a value other than
, then the default value for
is
. Only
and
are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. |
consistent |
Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field is only applicable when
is set to
or
. This field is applicable to either:
|
circuit |
|
outlier |
Settings controlling the ejection of unhealthy backend endpoints from the load balancing pool of each individual proxy instance that processes the traffic for the given backend service. If not set, this feature is considered disabled. Results of the outlier detection algorithm (ejection of endpoints from the load balancing pool and returning them back to the pool) are executed independently by each proxy instance of the load balancer. In most cases, more than one proxy instance handles the traffic received by a backend service. Thus, it is possible that an unhealthy endpoint is detected and ejected by only some of the proxies, and while this happens, other proxies may continue to send requests to the same unhealthy endpoint until they detect and eject the unhealthy endpoint. Applicable backend endpoints can be:
Applicable backend service types can be:
Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. |
network |
The URL of the network to which this backend service belongs. This field can only be specified when the load balancing scheme is set to
. |
subsetting |
|
connection |
Connection Tracking configuration for this BackendService. Connection tracking policy settings are only available for external passthrough Network Load Balancers and internal passthrough Network Load Balancers. |
max |
Specifies the default maximum duration (timeout) for streams to this service. Duration is computed from the beginning of the stream until the response has been completely processed, including all retries. A stream that does not complete in this duration is closed. If not specified, there will be no timeout limit, i.e. the maximum duration is infinite. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. This field is only allowed when the
of the backend service is
. |
compression |
Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. |
service |
URL to
resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global. |
service |
URLs of
resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty. |
locality |
A list of locality load-balancing policies to be used in order of preference. When you use localityLbPolicies, you must set at least one value for either the localityLbPolicies[].policy or the localityLbPolicies[].customPolicy field. localityLbPolicies overrides any value set in the localityLbPolicy field. For an example of how to use this field, see Define a list of preferred policies. Caution: This field and its children are intended for use in a service mesh that includes gRPC clients only. Envoy proxies can't use backend services that have this configuration. |
ip |
Specifies a preference for traffic sent from the proxy to the backend (or from the client to the backend for proxyless gRPC). The possible values are:
This field is applicable to either:
|
metadatas |
Deployment metadata associated with the resource to be set by a GKE hub controller and read by the backend RCTH |
used |
[Output Only] regionBackendServices.list of resources referencing given backend service. |
strong |
Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the
is set to
. |
Methods |
|
---|---|
|
The method compute.v1.RegionBackendServicesService.Delete is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.RegionBackendServicesService.Get is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.RegionBackendServicesService.GetHealth is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.RegionBackendServicesService.GetPolicy is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.RegionBackendServicesService.Insert is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.RegionBackendServicesService.List is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.RegionBackendServicesService.ListUsable is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.RegionBackendServicesService.Patch is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.RegionBackendServicesService.SetPolicy is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.RegionBackendServicesService.SetSecurityPolicy is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.RegionBackendServicesService.TestPermissions is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.RegionBackendServicesService.Update is not available in this (s3nsapis.fr) universe. |