Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Application Load Balancer
  • Getting started
  • Access management
  • Pricing policy
  • Terraform reference
    • Authentication with the API
      • Overview
        • Overview
        • Get
        • List
        • Create
        • Update
        • Delete
        • AddBackend
        • RemoveBackend
        • UpdateBackend
        • ListOperations
  • Monitoring metrics
  • Audit Trails events
  • L7 load balancer logs
  • Release notes

In this article:

  • HTTP request
  • Path parameters
  • Body parameters
  • HttpBackend
  • LoadBalancingConfig
  • TargetGroupsBackend
  • StorageBucketBackend
  • HealthCheck
  • StreamHealthCheck
  • Payload
  • HttpHealthCheck
  • GrpcHealthCheck
  • SecureTransportSettings
  • ValidationContext
  • BackendTls
  • GrpcBackend
  • StreamBackend
  • Response
  • UpdateBackendMetadata
  • Status
  • BackendGroup
  • HttpBackendGroup
  • HttpBackend
  • LoadBalancingConfig
  • TargetGroupsBackend
  • StorageBucketBackend
  • HealthCheck
  • StreamHealthCheck
  • Payload
  • HttpHealthCheck
  • GrpcHealthCheck
  • SecureTransportSettings
  • ValidationContext
  • BackendTls
  • ConnectionSessionAffinity
  • HeaderSessionAffinity
  • CookieSessionAffinity
  • GrpcBackendGroup
  • GrpcBackend
  • StreamBackendGroup
  • StreamBackend
  1. API reference
  2. REST
  3. BackendGroup
  4. UpdateBackend

Application Load Balancer API, REST: BackendGroup.UpdateBackend

Written by
Yandex Cloud
Updated at January 14, 2025
  • HTTP request
  • Path parameters
  • Body parameters
  • HttpBackend
  • LoadBalancingConfig
  • TargetGroupsBackend
  • StorageBucketBackend
  • HealthCheck
  • StreamHealthCheck
  • Payload
  • HttpHealthCheck
  • GrpcHealthCheck
  • SecureTransportSettings
  • ValidationContext
  • BackendTls
  • GrpcBackend
  • StreamBackend
  • Response
  • UpdateBackendMetadata
  • Status
  • BackendGroup
  • HttpBackendGroup
  • HttpBackend
  • LoadBalancingConfig
  • TargetGroupsBackend
  • StorageBucketBackend
  • HealthCheck
  • StreamHealthCheck
  • Payload
  • HttpHealthCheck
  • GrpcHealthCheck
  • SecureTransportSettings
  • ValidationContext
  • BackendTls
  • ConnectionSessionAffinity
  • HeaderSessionAffinity
  • CookieSessionAffinity
  • GrpcBackendGroup
  • GrpcBackend
  • StreamBackendGroup
  • StreamBackend

Updates the specified backend.

HTTP requestHTTP request

POST https://alb.api.cloud.yandex.net/apploadbalancer/v1/backendGroups/{backendGroupId}:updateBackend

Path parametersPath parameters

Field

Description

backendGroupId

string

Required field. ID of the backend group to update the backend in.

Body parametersBody parameters

{
  "updateMask": "string",
  // Includes only one of the fields `http`, `grpc`, `stream`
  "http": {
    "name": "string",
    "backendWeight": "string",
    "loadBalancingConfig": {
      "panicThreshold": "string",
      "localityAwareRoutingPercent": "string",
      "strictLocality": "boolean",
      "mode": "string"
    },
    "port": "string",
    // Includes only one of the fields `targetGroups`, `storageBucket`
    "targetGroups": {
      "targetGroupIds": [
        "string"
      ]
    },
    "storageBucket": {
      "bucket": "string"
    },
    // end of the list of possible fields
    "healthchecks": [
      {
        "timeout": "string",
        "interval": "string",
        "intervalJitterPercent": "string",
        "healthyThreshold": "string",
        "unhealthyThreshold": "string",
        "healthcheckPort": "string",
        // Includes only one of the fields `stream`, `http`, `grpc`
        "stream": {
          "send": {
            // Includes only one of the fields `text`
            "text": "string"
            // end of the list of possible fields
          },
          "receive": {
            // Includes only one of the fields `text`
            "text": "string"
            // end of the list of possible fields
          }
        },
        "http": {
          "host": "string",
          "path": "string",
          "useHttp2": "boolean",
          "expectedStatuses": [
            "string"
          ]
        },
        "grpc": {
          "serviceName": "string"
        },
        // end of the list of possible fields
        // Includes only one of the fields `plaintext`, `tls`
        "plaintext": "object",
        "tls": {
          "sni": "string",
          "validationContext": {
            // Includes only one of the fields `trustedCaId`, `trustedCaBytes`
            "trustedCaId": "string",
            "trustedCaBytes": "string"
            // end of the list of possible fields
          }
        }
        // end of the list of possible fields
      }
    ],
    "tls": {
      "sni": "string",
      "validationContext": {
        // Includes only one of the fields `trustedCaId`, `trustedCaBytes`
        "trustedCaId": "string",
        "trustedCaBytes": "string"
        // end of the list of possible fields
      }
    },
    "useHttp2": "boolean"
  },
  "grpc": {
    "name": "string",
    "backendWeight": "string",
    "loadBalancingConfig": {
      "panicThreshold": "string",
      "localityAwareRoutingPercent": "string",
      "strictLocality": "boolean",
      "mode": "string"
    },
    "port": "string",
    // Includes only one of the fields `targetGroups`
    "targetGroups": {
      "targetGroupIds": [
        "string"
      ]
    },
    // end of the list of possible fields
    "healthchecks": [
      {
        "timeout": "string",
        "interval": "string",
        "intervalJitterPercent": "string",
        "healthyThreshold": "string",
        "unhealthyThreshold": "string",
        "healthcheckPort": "string",
        // Includes only one of the fields `stream`, `http`, `grpc`
        "stream": {
          "send": {
            // Includes only one of the fields `text`
            "text": "string"
            // end of the list of possible fields
          },
          "receive": {
            // Includes only one of the fields `text`
            "text": "string"
            // end of the list of possible fields
          }
        },
        "http": {
          "host": "string",
          "path": "string",
          "useHttp2": "boolean",
          "expectedStatuses": [
            "string"
          ]
        },
        "grpc": {
          "serviceName": "string"
        },
        // end of the list of possible fields
        // Includes only one of the fields `plaintext`, `tls`
        "plaintext": "object",
        "tls": {
          "sni": "string",
          "validationContext": {
            // Includes only one of the fields `trustedCaId`, `trustedCaBytes`
            "trustedCaId": "string",
            "trustedCaBytes": "string"
            // end of the list of possible fields
          }
        }
        // end of the list of possible fields
      }
    ],
    "tls": {
      "sni": "string",
      "validationContext": {
        // Includes only one of the fields `trustedCaId`, `trustedCaBytes`
        "trustedCaId": "string",
        "trustedCaBytes": "string"
        // end of the list of possible fields
      }
    }
  },
  "stream": {
    "name": "string",
    "backendWeight": "string",
    "loadBalancingConfig": {
      "panicThreshold": "string",
      "localityAwareRoutingPercent": "string",
      "strictLocality": "boolean",
      "mode": "string"
    },
    "port": "string",
    // Includes only one of the fields `targetGroups`
    "targetGroups": {
      "targetGroupIds": [
        "string"
      ]
    },
    // end of the list of possible fields
    "healthchecks": [
      {
        "timeout": "string",
        "interval": "string",
        "intervalJitterPercent": "string",
        "healthyThreshold": "string",
        "unhealthyThreshold": "string",
        "healthcheckPort": "string",
        // Includes only one of the fields `stream`, `http`, `grpc`
        "stream": {
          "send": {
            // Includes only one of the fields `text`
            "text": "string"
            // end of the list of possible fields
          },
          "receive": {
            // Includes only one of the fields `text`
            "text": "string"
            // end of the list of possible fields
          }
        },
        "http": {
          "host": "string",
          "path": "string",
          "useHttp2": "boolean",
          "expectedStatuses": [
            "string"
          ]
        },
        "grpc": {
          "serviceName": "string"
        },
        // end of the list of possible fields
        // Includes only one of the fields `plaintext`, `tls`
        "plaintext": "object",
        "tls": {
          "sni": "string",
          "validationContext": {
            // Includes only one of the fields `trustedCaId`, `trustedCaBytes`
            "trustedCaId": "string",
            "trustedCaBytes": "string"
            // end of the list of possible fields
          }
        }
        // end of the list of possible fields
      }
    ],
    "tls": {
      "sni": "string",
      "validationContext": {
        // Includes only one of the fields `trustedCaId`, `trustedCaBytes`
        "trustedCaId": "string",
        "trustedCaBytes": "string"
        // end of the list of possible fields
      }
    },
    "enableProxyProtocol": "boolean",
    "keepConnectionsOnHostHealthFailure": "boolean"
  }
  // end of the list of possible fields
}

Field

Description

updateMask

string (field-mask)

A comma-separated names off ALL fields to be updated.
Only the specified fields will be changed. The others will be left untouched.
If the field is specified in updateMask and no value for that field was sent in the request,
the field's value will be reset to the default. The default value for most fields is null or 0.

If updateMask is not sent in the request, all fields' values will be updated.
Fields specified in the request will be updated to provided values.
The rest of the fields will be reset to the default.

http

HttpBackend

New settings for the HTTP backend.

Includes only one of the fields http, grpc, stream.

Name of the backend to update (required) and new settings for the backend.

grpc

GrpcBackend

New settings for the gRPC backend.

Includes only one of the fields http, grpc, stream.

Name of the backend to update (required) and new settings for the backend.

stream

StreamBackend

New settings for the stream (TCP) backend.

Includes only one of the fields http, grpc, stream.

Name of the backend to update (required) and new settings for the backend.

HttpBackendHttpBackend

An HTTP backend resource.

Field

Description

name

string

Required field. Name of the backend.

backendWeight

string (int64)

Backend weight. Traffic is distributed between backends of a backend group according to their weights.

Weights must be set either for all backends in a group or for none of them.
Setting no weights is the same as setting equal non-zero weights for all backends.

If the weight is non-positive, traffic is not sent to the backend.

loadBalancingConfig

LoadBalancingConfig

Load balancing configuration for the backend.

port

string (int64)

Port used by all targets to receive traffic.

targetGroups

TargetGroupsBackend

Target groups that belong to the backend. For details about target groups, see
documentation.

Includes only one of the fields targetGroups, storageBucket.

Reference to targets that belong to the backend.

A backend may be a set of target groups or an Object Storage bucket. For details about backend types, see
documentation.

storageBucket

StorageBucketBackend

Object Storage bucket to use as the backend. For details about buckets, see
documentation.

If a bucket is used as a backend, the list of bucket objects and the objects themselves must be publicly
accessible. For instructions, see documentation.

Includes only one of the fields targetGroups, storageBucket.

Reference to targets that belong to the backend.

A backend may be a set of target groups or an Object Storage bucket. For details about backend types, see
documentation.

healthchecks[]

HealthCheck

Health checks to perform on targets from target groups.
For details about health checking, see documentation.

If no health checks are specified, active health checking is not performed.

tls

BackendTls

Settings for TLS connections between load balancer nodes and backend targets.

If specified, the load balancer establishes HTTPS (HTTP over TLS) connections with targets
and compares received certificates with the one specified in BackendTls.validationContext.
If not specified, the load balancer establishes unencrypted HTTP connections with targets.

useHttp2

boolean

Enables HTTP/2 usage in connections between load balancer nodes and backend targets.

Default value: false, HTTP/1.1 is used.

LoadBalancingConfigLoadBalancingConfig

A load balancing configuration resource.

Field

Description

panicThreshold

string (int64)

Threshold for panic mode.

If percentage of healthy backends in the group drops below threshold,
panic mode will be activated and traffic will be routed to all backends, regardless of their health check status.
This helps to avoid overloading healthy backends.
For details about panic mode, see documentation.

If the value is 0, panic mode will never be activated and traffic is routed only to healthy backends at all times.

Default value: 0.

localityAwareRoutingPercent

string (int64)

Percentage of traffic that a load balancer node sends to healthy backends in its availability zone.
The rest is divided equally between other zones. For details about zone-aware routing, see
documentation.

If there are no healthy backends in an availability zone, all the traffic is divided between other zones.

If strictLocality is true, the specified value is ignored.
A load balancer node sends all the traffic within its availability zone, regardless of backends' health.

Default value: 0.

strictLocality

boolean

Specifies whether a load balancer node should only send traffic to backends in its availability zone,
regardless of their health, and ignore backends in other zones.

If set to true and there are no healthy backends in the zone, the node in this zone will respond
to incoming traffic with errors.
For details about strict locality, see documentation.

If strict_locality is true, the value specified in localityAwareRoutingPercent is ignored.

Default value: false.

mode

enum (LoadBalancingMode)

Load balancing mode for the backend.

For details about load balancing modes, see
documentation.

  • ROUND_ROBIN: Round robin load balancing mode.

    All endpoints of the backend take their turns to receive requests attributed to the backend.

  • RANDOM: Random load balancing mode. Default value.

    For a request attributed to the backend, an endpoint that receives it is picked at random.

  • LEAST_REQUEST: Least request load balancing mode.

    To pick an endpoint that receives a request attributed to the backend, the power of two choices algorithm is used;
    that is, two endpoints are picked at random, and the request is sent to the one which has the fewest active
    requests.

  • MAGLEV_HASH: Maglev hashing load balancing mode.

    Each endpoint is hashed, and a hash table with 65537 rows is filled accordingly, so that every endpoint occupies
    the same amount of rows. An attribute of each request is also hashed by the same function (if session affinity is
    enabled for the backend group, the attribute to hash is specified in session affinity configuration). The row
    with the same number as the resulting value is looked up in the table to determine the endpoint that receives
    the request.

    If the backend group with session affinity enabled contains more than one backend with positive weight, endpoints
    for backends with MAGLEV_HASH load balancing mode are picked at RANDOM instead.

TargetGroupsBackendTargetGroupsBackend

A resource for target groups that belong to the backend.

Field

Description

targetGroupIds[]

string

List of ID's of target groups that belong to the backend.

To get the ID's of all available target groups, make a TargetGroupService.List request.

StorageBucketBackendStorageBucketBackend

A resource for Object Storage bucket used as a backend. For details about the concept,
see documentation.

Field

Description

bucket

string

Required field. Name of the bucket.

HealthCheckHealthCheck

A health check resource.
For details about the concept, see documentation.

Field

Description

timeout

string (duration)

Required field. Health check timeout.

The timeout is the time allowed for the target to respond to a check.
If the target doesn't respond in time, the check is considered failed.

interval

string (duration)

Required field. Base interval between consecutive health checks.

intervalJitterPercent

string

healthyThreshold

string (int64)

Number of consecutive successful health checks required to mark an unhealthy target as healthy.

Both 0 and 1 values amount to one successful check required.

The value is ignored when a load balancer is initialized; a target is marked healthy after one successful check.

Default value: 0.

unhealthyThreshold

string (int64)

Number of consecutive failed health checks required to mark a healthy target as unhealthy.

Both 0 and 1 values amount to one unsuccessful check required.

The value is ignored if a health check is failed due to an HTTP 503 Service Unavailable response from the target
(not applicable to TCP stream health checks). The target is immediately marked unhealthy.

Default value: 0.

healthcheckPort

string (int64)

Port used for health checks.

If not specified, the backend port (HttpBackend.port or GrpcBackend.port) is used for health checks.

stream

StreamHealthCheck

TCP stream health check settings.

Includes only one of the fields stream, http, grpc.

Protocol-specific health check settings.

The protocols of the backend and of its health check may differ,
e.g. a gRPC health check may be specified for an HTTP backend.

http

HttpHealthCheck

HTTP health check settings.

Includes only one of the fields stream, http, grpc.

Protocol-specific health check settings.

The protocols of the backend and of its health check may differ,
e.g. a gRPC health check may be specified for an HTTP backend.

grpc

GrpcHealthCheck

gRPC health check settings.

Includes only one of the fields stream, http, grpc.

Protocol-specific health check settings.

The protocols of the backend and of its health check may differ,
e.g. a gRPC health check may be specified for an HTTP backend.

plaintext

object

Includes only one of the fields plaintext, tls.

Optional transport protocol for health checks.
When not set, health checks use the same protocol as the proxied traffic.
Use this when health checks' protocol settings differ from their backend, e.g. plaintext health checks for a TLS backend.

tls

SecureTransportSettings

Includes only one of the fields plaintext, tls.

Optional transport protocol for health checks.
When not set, health checks use the same protocol as the proxied traffic.
Use this when health checks' protocol settings differ from their backend, e.g. plaintext health checks for a TLS backend.

StreamHealthCheckStreamHealthCheck

A resource for TCP stream health check settings.

Field

Description

send

Payload

Message sent to targets during TCP data transfer.

If not specified, no data is sent to the target.

receive

Payload

Data that must be contained in the messages received from targets for a successful health check.

If not specified, no messages are expected from targets, and those that are received are not checked.

PayloadPayload

A health check payload resource.

Field

Description

text

string

Payload text.

Includes only one of the fields text.

Payload.

HttpHealthCheckHttpHealthCheck

A resource for HTTP health check settings.

Field

Description

host

string

Value for the HTTP/1.1 Host header or the HTTP/2 :authority pseudo-header used in requests to targets.

path

string

Required field. HTTP path used in requests to targets: request URI for HTTP/1.1 request line
or value for the HTTP/2 :path pseudo-header.

useHttp2

boolean

Enables HTTP/2 usage in health checks.

Default value: false, HTTP/1.1 is used.

expectedStatuses[]

string (int64)

A list of HTTP response statuses considered healthy.
By default only 200 HTTP status code considered healthy.

GrpcHealthCheckGrpcHealthCheck

A resource for gRPC health check settings.

Field

Description

serviceName

string

Name of the gRPC service to be checked.

If not specified, overall health is checked.

For details about the concept, see GRPC Health Checking Protocol.

SecureTransportSettingsSecureTransportSettings

Transport settings to be used instead of the settings configured per-cluster

Field

Description

sni

string

SNI string for TLS connections.

validationContext

ValidationContext

Validation context for backend TLS connections.

ValidationContextValidationContext

A TLS validation context resource.

Field

Description

trustedCaId

string

Includes only one of the fields trustedCaId, trustedCaBytes.

TLS certificate issued by a trusted certificate authority (CA).

trustedCaBytes

string

X.509 certificate contents in PEM format.

Includes only one of the fields trustedCaId, trustedCaBytes.

TLS certificate issued by a trusted certificate authority (CA).

BackendTlsBackendTls

A resource for backend TLS settings.

Field

Description

sni

string

Server Name Indication (SNI) string for TLS connections.

validationContext

ValidationContext

Validation context for TLS connections.

GrpcBackendGrpcBackend

A gRPC backend resource.

Field

Description

name

string

Required field. Name of the backend.

backendWeight

string (int64)

Backend weight. Traffic is distributed between backends of a backend group according to their weights.

Weights must be set either for all backends of a group or for none of them.
Setting no weights is the same as setting equal non-zero weights for all backends.

If the weight is non-positive, traffic is not sent to the backend.

loadBalancingConfig

LoadBalancingConfig

Load balancing configuration for the backend.

port

string (int64)

Port used by all targets to receive traffic.

targetGroups

TargetGroupsBackend

Target groups that belong to the backend.

Includes only one of the fields targetGroups.

Reference to targets that belong to the backend. For now, targets are referenced via target groups.

healthchecks[]

HealthCheck

Health checks to perform on targets from target groups.
For details about health checking, see documentation.

If no health checks are specified, active health checking is not performed.

tls

BackendTls

Settings for TLS connections between load balancer nodes and backend targets.

If specified, the load balancer establishes HTTPS (HTTP over TLS) connections with targets
and compares received certificates with the one specified in BackendTls.validationContext.
If not specified, the load balancer establishes unencrypted HTTP connections with targets.

StreamBackendStreamBackend

A stream (TCP) backend resource.

Field

Description

name

string

Name of the backend.

backendWeight

string (int64)

Backend weight. Traffic is distributed between backends of a backend group according to their weights.

Weights must be set either for all backends in a group or for none of them.
Setting no weights is the same as setting equal non-zero weights for all backends.

If the weight is non-positive, traffic is not sent to the backend.

loadBalancingConfig

LoadBalancingConfig

Load balancing configuration for the backend.

port

string (int64)

Port used by all targets to receive traffic.

targetGroups

TargetGroupsBackend

Target groups that belong to the backend. For details about target groups, see
documentation.

Includes only one of the fields targetGroups.

Reference to targets that belong to the backend.

healthchecks[]

HealthCheck

Health checks to perform on targets from target groups.
For details about health checking, see documentation.

If no health checks are specified, active health checking is not performed.

tls

BackendTls

Settings for TLS connections between load balancer nodes and backend targets.

If specified, the load balancer establishes TLS-encrypted TCP connections with targets and compares received
certificates with the one specified in BackendTls.validationContext.
If not specified, the load balancer establishes unencrypted TCP connections with targets.

enableProxyProtocol

boolean

If set, proxy protocol will be enabled for this backend.

keepConnectionsOnHostHealthFailure

boolean

If a backend host becomes unhealthy (as determined by the configured health checks),
keep connections to the failed host.

ResponseResponse

HTTP Code: 200 - OK

{
  "id": "string",
  "description": "string",
  "createdAt": "string",
  "createdBy": "string",
  "modifiedAt": "string",
  "done": "boolean",
  "metadata": {
    "backendGroupId": "string",
    "backendName": "string"
  },
  // Includes only one of the fields `error`, `response`
  "error": {
    "code": "integer",
    "message": "string",
    "details": [
      "object"
    ]
  },
  "response": {
    "id": "string",
    "name": "string",
    "description": "string",
    "folderId": "string",
    "labels": "object",
    // Includes only one of the fields `http`, `grpc`, `stream`
    "http": {
      "backends": [
        {
          "name": "string",
          "backendWeight": "string",
          "loadBalancingConfig": {
            "panicThreshold": "string",
            "localityAwareRoutingPercent": "string",
            "strictLocality": "boolean",
            "mode": "string"
          },
          "port": "string",
          // Includes only one of the fields `targetGroups`, `storageBucket`
          "targetGroups": {
            "targetGroupIds": [
              "string"
            ]
          },
          "storageBucket": {
            "bucket": "string"
          },
          // end of the list of possible fields
          "healthchecks": [
            {
              "timeout": "string",
              "interval": "string",
              "intervalJitterPercent": "string",
              "healthyThreshold": "string",
              "unhealthyThreshold": "string",
              "healthcheckPort": "string",
              // Includes only one of the fields `stream`, `http`, `grpc`
              "stream": {
                "send": {
                  // Includes only one of the fields `text`
                  "text": "string"
                  // end of the list of possible fields
                },
                "receive": {
                  // Includes only one of the fields `text`
                  "text": "string"
                  // end of the list of possible fields
                }
              },
              "http": {
                "host": "string",
                "path": "string",
                "useHttp2": "boolean",
                "expectedStatuses": [
                  "string"
                ]
              },
              "grpc": {
                "serviceName": "string"
              },
              // end of the list of possible fields
              // Includes only one of the fields `plaintext`, `tls`
              "plaintext": "object",
              "tls": {
                "sni": "string",
                "validationContext": {
                  // Includes only one of the fields `trustedCaId`, `trustedCaBytes`
                  "trustedCaId": "string",
                  "trustedCaBytes": "string"
                  // end of the list of possible fields
                }
              }
              // end of the list of possible fields
            }
          ],
          "tls": {
            "sni": "string",
            "validationContext": {
              // Includes only one of the fields `trustedCaId`, `trustedCaBytes`
              "trustedCaId": "string",
              "trustedCaBytes": "string"
              // end of the list of possible fields
            }
          },
          "useHttp2": "boolean"
        }
      ],
      // Includes only one of the fields `connection`, `header`, `cookie`
      "connection": {
        "sourceIp": "boolean"
      },
      "header": {
        "headerName": "string"
      },
      "cookie": {
        "name": "string",
        "ttl": "string"
      }
      // end of the list of possible fields
    },
    "grpc": {
      "backends": [
        {
          "name": "string",
          "backendWeight": "string",
          "loadBalancingConfig": {
            "panicThreshold": "string",
            "localityAwareRoutingPercent": "string",
            "strictLocality": "boolean",
            "mode": "string"
          },
          "port": "string",
          // Includes only one of the fields `targetGroups`
          "targetGroups": {
            "targetGroupIds": [
              "string"
            ]
          },
          // end of the list of possible fields
          "healthchecks": [
            {
              "timeout": "string",
              "interval": "string",
              "intervalJitterPercent": "string",
              "healthyThreshold": "string",
              "unhealthyThreshold": "string",
              "healthcheckPort": "string",
              // Includes only one of the fields `stream`, `http`, `grpc`
              "stream": {
                "send": {
                  // Includes only one of the fields `text`
                  "text": "string"
                  // end of the list of possible fields
                },
                "receive": {
                  // Includes only one of the fields `text`
                  "text": "string"
                  // end of the list of possible fields
                }
              },
              "http": {
                "host": "string",
                "path": "string",
                "useHttp2": "boolean",
                "expectedStatuses": [
                  "string"
                ]
              },
              "grpc": {
                "serviceName": "string"
              },
              // end of the list of possible fields
              // Includes only one of the fields `plaintext`, `tls`
              "plaintext": "object",
              "tls": {
                "sni": "string",
                "validationContext": {
                  // Includes only one of the fields `trustedCaId`, `trustedCaBytes`
                  "trustedCaId": "string",
                  "trustedCaBytes": "string"
                  // end of the list of possible fields
                }
              }
              // end of the list of possible fields
            }
          ],
          "tls": {
            "sni": "string",
            "validationContext": {
              // Includes only one of the fields `trustedCaId`, `trustedCaBytes`
              "trustedCaId": "string",
              "trustedCaBytes": "string"
              // end of the list of possible fields
            }
          }
        }
      ],
      // Includes only one of the fields `connection`, `header`, `cookie`
      "connection": {
        "sourceIp": "boolean"
      },
      "header": {
        "headerName": "string"
      },
      "cookie": {
        "name": "string",
        "ttl": "string"
      }
      // end of the list of possible fields
    },
    "stream": {
      "backends": [
        {
          "name": "string",
          "backendWeight": "string",
          "loadBalancingConfig": {
            "panicThreshold": "string",
            "localityAwareRoutingPercent": "string",
            "strictLocality": "boolean",
            "mode": "string"
          },
          "port": "string",
          // Includes only one of the fields `targetGroups`
          "targetGroups": {
            "targetGroupIds": [
              "string"
            ]
          },
          // end of the list of possible fields
          "healthchecks": [
            {
              "timeout": "string",
              "interval": "string",
              "intervalJitterPercent": "string",
              "healthyThreshold": "string",
              "unhealthyThreshold": "string",
              "healthcheckPort": "string",
              // Includes only one of the fields `stream`, `http`, `grpc`
              "stream": {
                "send": {
                  // Includes only one of the fields `text`
                  "text": "string"
                  // end of the list of possible fields
                },
                "receive": {
                  // Includes only one of the fields `text`
                  "text": "string"
                  // end of the list of possible fields
                }
              },
              "http": {
                "host": "string",
                "path": "string",
                "useHttp2": "boolean",
                "expectedStatuses": [
                  "string"
                ]
              },
              "grpc": {
                "serviceName": "string"
              },
              // end of the list of possible fields
              // Includes only one of the fields `plaintext`, `tls`
              "plaintext": "object",
              "tls": {
                "sni": "string",
                "validationContext": {
                  // Includes only one of the fields `trustedCaId`, `trustedCaBytes`
                  "trustedCaId": "string",
                  "trustedCaBytes": "string"
                  // end of the list of possible fields
                }
              }
              // end of the list of possible fields
            }
          ],
          "tls": {
            "sni": "string",
            "validationContext": {
              // Includes only one of the fields `trustedCaId`, `trustedCaBytes`
              "trustedCaId": "string",
              "trustedCaBytes": "string"
              // end of the list of possible fields
            }
          },
          "enableProxyProtocol": "boolean",
          "keepConnectionsOnHostHealthFailure": "boolean"
        }
      ],
      // Includes only one of the fields `connection`
      "connection": {
        "sourceIp": "boolean"
      }
      // end of the list of possible fields
    },
    // end of the list of possible fields
    "createdAt": "string"
  }
  // end of the list of possible fields
}

An Operation resource. For more information, see Operation.

Field

Description

id

string

ID of the operation.

description

string

Description of the operation. 0-256 characters long.

createdAt

string (date-time)

Creation timestamp.

String in RFC3339 text format. The range of possible values is from
0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the
Protocol Buffers reference.
In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

createdBy

string

ID of the user or service account who initiated the operation.

modifiedAt

string (date-time)

The time when the Operation resource was last modified.

String in RFC3339 text format. The range of possible values is from
0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the
Protocol Buffers reference.
In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

done

boolean

If the value is false, it means the operation is still in progress.
If true, the operation is completed, and either error or response is available.

metadata

UpdateBackendMetadata

Service-specific metadata associated with the operation.
It typically contains the ID of the target resource that the operation is performed on.
Any method that returns a long-running operation should document the metadata type, if any.

error

Status

The error result of the operation in case of failure or cancellation.

Includes only one of the fields error, response.

The operation result.
If done == false and there was no failure detected, neither error nor response is set.
If done == false and there was a failure detected, error is set.
If done == true, exactly one of error or response is set.

response

BackendGroup

The normal response of the operation in case of success.
If the original method returns no data on success, such as Delete,
the response is google.protobuf.Empty.
If the original method is the standard Create/Update,
the response should be the target resource of the operation.
Any method that returns a long-running operation should document the response type, if any.

Includes only one of the fields error, response.

The operation result.
If done == false and there was no failure detected, neither error nor response is set.
If done == false and there was a failure detected, error is set.
If done == true, exactly one of error or response is set.

UpdateBackendMetadataUpdateBackendMetadata

Field

Description

backendGroupId

string

ID of the backend group that the backend is being updated it.

backendName

string

Name of the backend that is being updated.

StatusStatus

The error result of the operation in case of failure or cancellation.

Field

Description

code

integer (int32)

Error code. An enum value of google.rpc.Code.

message

string

An error message.

details[]

object

A list of messages that carry the error details.

BackendGroupBackendGroup

A backend group resource.
For details about the concept, see documentation.

Field

Description

id

string

ID of the backend group. Generated at creation time.

name

string

Name of the backend group. The name is unique within the folder. The string length in characters is 3-63.

description

string

Description of the backend group. The string is 0-256 characters long.

folderId

string

ID of the folder that the backend group belongs to.

labels

object (map<string, string>)

Backend group labels as key:value pairs.
For details about the concept, see documentation.
The maximum number of labels is 64.

http

HttpBackendGroup

List of HTTP backends that the backend group consists of.

Includes only one of the fields http, grpc, stream.

Backends that the backend group consists of.

grpc

GrpcBackendGroup

List of gRPC backends that the backend group consists of.

Includes only one of the fields http, grpc, stream.

Backends that the backend group consists of.

stream

StreamBackendGroup

List of stream (TCP) backends that the backend group consists of.

Includes only one of the fields http, grpc, stream.

Backends that the backend group consists of.

createdAt

string (date-time)

Creation timestamp.

String in RFC3339 text format. The range of possible values is from
0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the
Protocol Buffers reference.
In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

HttpBackendGroupHttpBackendGroup

An HTTP backend group resource.

Field

Description

backends[]

HttpBackend

List of HTTP backends.

connection

ConnectionSessionAffinity

Connection-based session affinity configuration.

For now, a connection is defined only by an IP address of the client.

Includes only one of the fields connection, header, cookie.

Session affinity configuration for the backend group.

For details about the concept, see
documentation.

If session affinity is configured, the backend group should contain exactly one active backend (i.e. with positive
HttpBackend.backendWeight), its HttpBackend.backendType should be TargetGroupsBackend, and its
[LoadBalancingConfig.load_balancing_mode] should be MAGLEV_HASH. If any of these conditions are not met, session
affinity will not work.

header

HeaderSessionAffinity

HTTP-header-field-based session affinity configuration.

Includes only one of the fields connection, header, cookie.

Session affinity configuration for the backend group.

For details about the concept, see
documentation.

If session affinity is configured, the backend group should contain exactly one active backend (i.e. with positive
HttpBackend.backendWeight), its HttpBackend.backendType should be TargetGroupsBackend, and its
[LoadBalancingConfig.load_balancing_mode] should be MAGLEV_HASH. If any of these conditions are not met, session
affinity will not work.

cookie

CookieSessionAffinity

Cookie-based session affinity configuration.

Includes only one of the fields connection, header, cookie.

Session affinity configuration for the backend group.

For details about the concept, see
documentation.

If session affinity is configured, the backend group should contain exactly one active backend (i.e. with positive
HttpBackend.backendWeight), its HttpBackend.backendType should be TargetGroupsBackend, and its
[LoadBalancingConfig.load_balancing_mode] should be MAGLEV_HASH. If any of these conditions are not met, session
affinity will not work.

HttpBackendHttpBackend

An HTTP backend resource.

Field

Description

name

string

Required field. Name of the backend.

backendWeight

string (int64)

Backend weight. Traffic is distributed between backends of a backend group according to their weights.

Weights must be set either for all backends in a group or for none of them.
Setting no weights is the same as setting equal non-zero weights for all backends.

If the weight is non-positive, traffic is not sent to the backend.

loadBalancingConfig

LoadBalancingConfig

Load balancing configuration for the backend.

port

string (int64)

Port used by all targets to receive traffic.

targetGroups

TargetGroupsBackend

Target groups that belong to the backend. For details about target groups, see
documentation.

Includes only one of the fields targetGroups, storageBucket.

Reference to targets that belong to the backend.

A backend may be a set of target groups or an Object Storage bucket. For details about backend types, see
documentation.

storageBucket

StorageBucketBackend

Object Storage bucket to use as the backend. For details about buckets, see
documentation.

If a bucket is used as a backend, the list of bucket objects and the objects themselves must be publicly
accessible. For instructions, see documentation.

Includes only one of the fields targetGroups, storageBucket.

Reference to targets that belong to the backend.

A backend may be a set of target groups or an Object Storage bucket. For details about backend types, see
documentation.

healthchecks[]

HealthCheck

Health checks to perform on targets from target groups.
For details about health checking, see documentation.

If no health checks are specified, active health checking is not performed.

tls

BackendTls

Settings for TLS connections between load balancer nodes and backend targets.

If specified, the load balancer establishes HTTPS (HTTP over TLS) connections with targets
and compares received certificates with the one specified in BackendTls.validationContext.
If not specified, the load balancer establishes unencrypted HTTP connections with targets.

useHttp2

boolean

Enables HTTP/2 usage in connections between load balancer nodes and backend targets.

Default value: false, HTTP/1.1 is used.

LoadBalancingConfigLoadBalancingConfig

A load balancing configuration resource.

Field

Description

panicThreshold

string (int64)

Threshold for panic mode.

If percentage of healthy backends in the group drops below threshold,
panic mode will be activated and traffic will be routed to all backends, regardless of their health check status.
This helps to avoid overloading healthy backends.
For details about panic mode, see documentation.

If the value is 0, panic mode will never be activated and traffic is routed only to healthy backends at all times.

Default value: 0.

localityAwareRoutingPercent

string (int64)

Percentage of traffic that a load balancer node sends to healthy backends in its availability zone.
The rest is divided equally between other zones. For details about zone-aware routing, see
documentation.

If there are no healthy backends in an availability zone, all the traffic is divided between other zones.

If strictLocality is true, the specified value is ignored.
A load balancer node sends all the traffic within its availability zone, regardless of backends' health.

Default value: 0.

strictLocality

boolean

Specifies whether a load balancer node should only send traffic to backends in its availability zone,
regardless of their health, and ignore backends in other zones.

If set to true and there are no healthy backends in the zone, the node in this zone will respond
to incoming traffic with errors.
For details about strict locality, see documentation.

If strict_locality is true, the value specified in localityAwareRoutingPercent is ignored.

Default value: false.

mode

enum (LoadBalancingMode)

Load balancing mode for the backend.

For details about load balancing modes, see
documentation.

  • ROUND_ROBIN: Round robin load balancing mode.

    All endpoints of the backend take their turns to receive requests attributed to the backend.

  • RANDOM: Random load balancing mode. Default value.

    For a request attributed to the backend, an endpoint that receives it is picked at random.

  • LEAST_REQUEST: Least request load balancing mode.

    To pick an endpoint that receives a request attributed to the backend, the power of two choices algorithm is used;
    that is, two endpoints are picked at random, and the request is sent to the one which has the fewest active
    requests.

  • MAGLEV_HASH: Maglev hashing load balancing mode.

    Each endpoint is hashed, and a hash table with 65537 rows is filled accordingly, so that every endpoint occupies
    the same amount of rows. An attribute of each request is also hashed by the same function (if session affinity is
    enabled for the backend group, the attribute to hash is specified in session affinity configuration). The row
    with the same number as the resulting value is looked up in the table to determine the endpoint that receives
    the request.

    If the backend group with session affinity enabled contains more than one backend with positive weight, endpoints
    for backends with MAGLEV_HASH load balancing mode are picked at RANDOM instead.

TargetGroupsBackendTargetGroupsBackend

A resource for target groups that belong to the backend.

Field

Description

targetGroupIds[]

string

List of ID's of target groups that belong to the backend.

To get the ID's of all available target groups, make a TargetGroupService.List request.

StorageBucketBackendStorageBucketBackend

A resource for Object Storage bucket used as a backend. For details about the concept,
see documentation.

Field

Description

bucket

string

Required field. Name of the bucket.

HealthCheckHealthCheck

A health check resource.
For details about the concept, see documentation.

Field

Description

timeout

string (duration)

Required field. Health check timeout.

The timeout is the time allowed for the target to respond to a check.
If the target doesn't respond in time, the check is considered failed.

interval

string (duration)

Required field. Base interval between consecutive health checks.

intervalJitterPercent

string

healthyThreshold

string (int64)

Number of consecutive successful health checks required to mark an unhealthy target as healthy.

Both 0 and 1 values amount to one successful check required.

The value is ignored when a load balancer is initialized; a target is marked healthy after one successful check.

Default value: 0.

unhealthyThreshold

string (int64)

Number of consecutive failed health checks required to mark a healthy target as unhealthy.

Both 0 and 1 values amount to one unsuccessful check required.

The value is ignored if a health check is failed due to an HTTP 503 Service Unavailable response from the target
(not applicable to TCP stream health checks). The target is immediately marked unhealthy.

Default value: 0.

healthcheckPort

string (int64)

Port used for health checks.

If not specified, the backend port (HttpBackend.port or GrpcBackend.port) is used for health checks.

stream

StreamHealthCheck

TCP stream health check settings.

Includes only one of the fields stream, http, grpc.

Protocol-specific health check settings.

The protocols of the backend and of its health check may differ,
e.g. a gRPC health check may be specified for an HTTP backend.

http

HttpHealthCheck

HTTP health check settings.

Includes only one of the fields stream, http, grpc.

Protocol-specific health check settings.

The protocols of the backend and of its health check may differ,
e.g. a gRPC health check may be specified for an HTTP backend.

grpc

GrpcHealthCheck

gRPC health check settings.

Includes only one of the fields stream, http, grpc.

Protocol-specific health check settings.

The protocols of the backend and of its health check may differ,
e.g. a gRPC health check may be specified for an HTTP backend.

plaintext

object

Includes only one of the fields plaintext, tls.

Optional transport protocol for health checks.
When not set, health checks use the same protocol as the proxied traffic.
Use this when health checks' protocol settings differ from their backend, e.g. plaintext health checks for a TLS backend.

tls

SecureTransportSettings

Includes only one of the fields plaintext, tls.

Optional transport protocol for health checks.
When not set, health checks use the same protocol as the proxied traffic.
Use this when health checks' protocol settings differ from their backend, e.g. plaintext health checks for a TLS backend.

StreamHealthCheckStreamHealthCheck

A resource for TCP stream health check settings.

Field

Description

send

Payload

Message sent to targets during TCP data transfer.

If not specified, no data is sent to the target.

receive

Payload

Data that must be contained in the messages received from targets for a successful health check.

If not specified, no messages are expected from targets, and those that are received are not checked.

PayloadPayload

A health check payload resource.

Field

Description

text

string

Payload text.

Includes only one of the fields text.

Payload.

HttpHealthCheckHttpHealthCheck

A resource for HTTP health check settings.

Field

Description

host

string

Value for the HTTP/1.1 Host header or the HTTP/2 :authority pseudo-header used in requests to targets.

path

string

Required field. HTTP path used in requests to targets: request URI for HTTP/1.1 request line
or value for the HTTP/2 :path pseudo-header.

useHttp2

boolean

Enables HTTP/2 usage in health checks.

Default value: false, HTTP/1.1 is used.

expectedStatuses[]

string (int64)

A list of HTTP response statuses considered healthy.
By default only 200 HTTP status code considered healthy.

GrpcHealthCheckGrpcHealthCheck

A resource for gRPC health check settings.

Field

Description

serviceName

string

Name of the gRPC service to be checked.

If not specified, overall health is checked.

For details about the concept, see GRPC Health Checking Protocol.

SecureTransportSettingsSecureTransportSettings

Transport settings to be used instead of the settings configured per-cluster

Field

Description

sni

string

SNI string for TLS connections.

validationContext

ValidationContext

Validation context for backend TLS connections.

ValidationContextValidationContext

A TLS validation context resource.

Field

Description

trustedCaId

string

Includes only one of the fields trustedCaId, trustedCaBytes.

TLS certificate issued by a trusted certificate authority (CA).

trustedCaBytes

string

X.509 certificate contents in PEM format.

Includes only one of the fields trustedCaId, trustedCaBytes.

TLS certificate issued by a trusted certificate authority (CA).

BackendTlsBackendTls

A resource for backend TLS settings.

Field

Description

sni

string

Server Name Indication (SNI) string for TLS connections.

validationContext

ValidationContext

Validation context for TLS connections.

ConnectionSessionAffinityConnectionSessionAffinity

A resource for connection-based session affinity configuration.

Field

Description

sourceIp

boolean

Specifies whether an IP address of the client is used to define a connection for session affinity.

HeaderSessionAffinityHeaderSessionAffinity

A resource for HTTP-header-field-based session affinity configuration.

Field

Description

headerName

string

Name of the HTTP header field that is used for session affinity.

CookieSessionAffinityCookieSessionAffinity

A resource for cookie-based session affinity configuration.

Field

Description

name

string

Name of the cookie that is used for session affinity.

ttl

string (duration)

Maximum age of cookies that are generated for sessions.

If set to 0, session cookies are used, which are stored by clients in temporary memory and are deleted
on client restarts.

If not set, the balancer does not generate cookies and only uses incoming ones for establishing session affinity.

GrpcBackendGroupGrpcBackendGroup

A gRPC backend group resource.

Field

Description

backends[]

GrpcBackend

List of gRPC backends.

connection

ConnectionSessionAffinity

Connection-based session affinity configuration.

For now, a connection is defined only by an IP address of the client.

Includes only one of the fields connection, header, cookie.

Session affinity configuration for the backend group.

For details about the concept, see
documentation.

If session affinity is configured, the backend group should contain exactly one active backend (i.e. with positive
GrpcBackend.backendWeight), and its [LoadBalancingConfig.load_balancing_mode] should be MAGLEV_HASH. If any of
these conditions are not met, session affinity will not work.

header

HeaderSessionAffinity

HTTP-header-field-based session affinity configuration.

Includes only one of the fields connection, header, cookie.

Session affinity configuration for the backend group.

For details about the concept, see
documentation.

If session affinity is configured, the backend group should contain exactly one active backend (i.e. with positive
GrpcBackend.backendWeight), and its [LoadBalancingConfig.load_balancing_mode] should be MAGLEV_HASH. If any of
these conditions are not met, session affinity will not work.

cookie

CookieSessionAffinity

Cookie-based session affinity configuration.

Includes only one of the fields connection, header, cookie.

Session affinity configuration for the backend group.

For details about the concept, see
documentation.

If session affinity is configured, the backend group should contain exactly one active backend (i.e. with positive
GrpcBackend.backendWeight), and its [LoadBalancingConfig.load_balancing_mode] should be MAGLEV_HASH. If any of
these conditions are not met, session affinity will not work.

GrpcBackendGrpcBackend

A gRPC backend resource.

Field

Description

name

string

Required field. Name of the backend.

backendWeight

string (int64)

Backend weight. Traffic is distributed between backends of a backend group according to their weights.

Weights must be set either for all backends of a group or for none of them.
Setting no weights is the same as setting equal non-zero weights for all backends.

If the weight is non-positive, traffic is not sent to the backend.

loadBalancingConfig

LoadBalancingConfig

Load balancing configuration for the backend.

port

string (int64)

Port used by all targets to receive traffic.

targetGroups

TargetGroupsBackend

Target groups that belong to the backend.

Includes only one of the fields targetGroups.

Reference to targets that belong to the backend. For now, targets are referenced via target groups.

healthchecks[]

HealthCheck

Health checks to perform on targets from target groups.
For details about health checking, see documentation.

If no health checks are specified, active health checking is not performed.

tls

BackendTls

Settings for TLS connections between load balancer nodes and backend targets.

If specified, the load balancer establishes HTTPS (HTTP over TLS) connections with targets
and compares received certificates with the one specified in BackendTls.validationContext.
If not specified, the load balancer establishes unencrypted HTTP connections with targets.

StreamBackendGroupStreamBackendGroup

A stream (TCP) backend group resource.

Field

Description

backends[]

StreamBackend

List of stream (TCP) backends.

connection

ConnectionSessionAffinity

Connection-based session affinity configuration.

For now, a connection is defined only by an IP address of the client.

Includes only one of the fields connection.

Session affinity configuration for the backend group.

For details about the concept, see
documentation.

If session affinity is configured, the backend group should contain exactly one active backend (i.e. with positive
HttpBackend.backendWeight), its HttpBackend.backendType should be TargetGroupsBackend, and its
[LoadBalancingConfig.load_balancing_mode] should be MAGLEV_HASH. If any of these conditions are not met, session
affinity will not work.

StreamBackendStreamBackend

A stream (TCP) backend resource.

Field

Description

name

string

Name of the backend.

backendWeight

string (int64)

Backend weight. Traffic is distributed between backends of a backend group according to their weights.

Weights must be set either for all backends in a group or for none of them.
Setting no weights is the same as setting equal non-zero weights for all backends.

If the weight is non-positive, traffic is not sent to the backend.

loadBalancingConfig

LoadBalancingConfig

Load balancing configuration for the backend.

port

string (int64)

Port used by all targets to receive traffic.

targetGroups

TargetGroupsBackend

Target groups that belong to the backend. For details about target groups, see
documentation.

Includes only one of the fields targetGroups.

Reference to targets that belong to the backend.

healthchecks[]

HealthCheck

Health checks to perform on targets from target groups.
For details about health checking, see documentation.

If no health checks are specified, active health checking is not performed.

tls

BackendTls

Settings for TLS connections between load balancer nodes and backend targets.

If specified, the load balancer establishes TLS-encrypted TCP connections with targets and compares received
certificates with the one specified in BackendTls.validationContext.
If not specified, the load balancer establishes unencrypted TCP connections with targets.

enableProxyProtocol

boolean

If set, proxy protocol will be enabled for this backend.

keepConnectionsOnHostHealthFailure

boolean

If a backend host becomes unhealthy (as determined by the configured health checks),
keep connections to the failed host.

Was the article helpful?

Previous
RemoveBackend
Next
ListOperations
Yandex project
© 2025 Yandex.Cloud LLC