gcloud_alpha_compute_backend-services_update-backend (1)
NAME
- gcloud alpha compute backend-services update-backend - update an existing backend in a backend service
SYNOPSIS
-
gcloud alpha compute backend-services update-backend BACKEND_SERVICE_NAME ([--instance-group=INSTANCE_GROUP : --instance-group-region=INSTANCE_GROUP_REGION | --instance-group-zone=INSTANCE_GROUP_ZONE] | [--network-endpoint-group=NETWORK_ENDPOINT_GROUP : --network-endpoint-group-zone=NETWORK_ENDPOINT_GROUP_ZONE]) [--balancing-mode=BALANCING_MODE] [--capacity-scaler=CAPACITY_SCALER] [--description=DESCRIPTION] [--failover] [--max-utilization=MAX_UTILIZATION] [--global | --region=REGION] [--max-connections=MAX_CONNECTIONS | --max-connections-per-endpoint=MAX_CONNECTIONS_PER_ENDPOINT | --max-connections-per-instance=MAX_CONNECTIONS_PER_INSTANCE | --max-rate=MAX_RATE | --max-rate-per-endpoint=MAX_RATE_PER_ENDPOINT | --max-rate-per-instance=MAX_RATE_PER_INSTANCE] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) gcloud alpha compute backend-services update-backend
Backends are named by their associated instances groups or network endpoint groups, and one of the --network-endpoint-group or --instance-group flags is required to identify the backend that you are modifying. You cannot "change" the instance group or network endpoint group associated with a backend, but you can accomplish something similar with backend-services remove-backend and backend-services add-backend.
gcloud compute backend-services edit can also be used to update a backend if the use of a text editor is desired.
POSITIONAL ARGUMENTS
-
- BACKEND_SERVICE_NAME
-
Name of the backend service to operate on.
REQUIRED FLAGS
-
-
Exactly one of these must be specified:
-
-
Instance Group
-
- --instance-group=INSTANCE_GROUP
-
Name of the instance group to update in the backend service. This flag must be
specified if any of the other arguments in this group are specified.
-
At most one of these may be specified:
-
- --instance-group-region=INSTANCE_GROUP_REGION
-
Region of the instance group to update in the backend service. If not specified,
you may be prompted to select a region.
To avoid prompting when this flag is omitted, you can set the compute/region property:
- $ gcloud config set compute/region REGION
A list of regions can be fetched by running:
- $ gcloud compute regions list
To unset the property, run:
- $ gcloud config unset compute/region
Alternatively, the region can be stored in the environment variable CLOUDSDK_COMPUTE_REGION.
- --instance-group-zone=INSTANCE_GROUP_ZONE
-
Zone of the instance group to update in the backend service. If not specified
and the compute/zone property isn't set, you may be prompted to
select a zone.
To avoid prompting when this flag is omitted, you can set the compute/zone property:
- $ gcloud config set compute/zone ZONE
A list of zones can be fetched by running:
- $ gcloud compute zones list
To unset the property, run:
- $ gcloud config unset compute/zone
Alternatively, the zone can be stored in the environment variable CLOUDSDK_COMPUTE_ZONE.
-
-
-
Network Endpoint Group
-
- --network-endpoint-group=NETWORK_ENDPOINT_GROUP
-
Name of the network endpoint group to update in the backend service. This flag
must be specified if any of the other arguments in this group are specified.
- --network-endpoint-group-zone=NETWORK_ENDPOINT_GROUP_ZONE
-
Zone of the network endpoint group to update in the backend service. If not
specified and the compute/zone property isn't set, you may be
prompted to select a zone.
To avoid prompting when this flag is omitted, you can set the compute/zone property:
- $ gcloud config set compute/zone ZONE
A list of zones can be fetched by running:
- $ gcloud compute zones list
To unset the property, run:
- $ gcloud config unset compute/zone
Alternatively, the zone can be stored in the environment variable CLOUDSDK_COMPUTE_ZONE.
-
-
Instance Group
-
-
Exactly one of these must be specified:
OPTIONAL FLAGS
-
- --balancing-mode=BALANCING_MODE
-
Defines the strategy for balancing load. BALANCING_MODE must be one of:
-
- CONNECTION
- Spreads load based on how many concurrent connections the backend can handle. This balancing mode is only available to backend services that use SSL, TCP, or UDP protocols. For backend services with --load-balancing-scheme EXTERNAL, you must specify exactly one of these additional parameters: --max-connections, --max-connections-per-instance, or --max-connections-per-endpoint. For backend services with --load-balancing-scheme INTERNAL, you must omit all of these parameters.
- RATE
- Spreads load based on how many HTTP requests per second (RPS) the backend can handle. This balancing mode is only available to backend services that use HTTP, HTTPS, or HTTP/2 protocols. You must specify exactly one of these additional parameters: --max-rate, --max-rate-per-instance, or--max-rate-per-endpoint.
- UTILIZATION
- Spreads load based on the CPU utilization of instances in a backend instance group. This balancing mode is only available to backend services with --load-balancing-scheme EXTERNAL and instance group backends. There is no restriction on the backend service protocol. The following additional parameters may be specified: --max-utilization, --max-rate, --max-rate-per-instance, --max-connections, --max-connections-per-instance. For valid combinations, see --max-utilization below.
-
- --capacity-scaler=CAPACITY_SCALER
-
A setting that applies to all balancing modes. This value is multiplied by the
balancing mode value to set the current max usage of the instance group.
Acceptable values are 0.0 (0%) through 1.0 (100%). Setting this
value to 0.0 (0%) drains the backend service. Note that draining a backend
service only prevents new connections to instances in the group. All existing
connections are allowed to continue until they close by normal means.
- --description=DESCRIPTION
-
An optional, textual description for the backend.
- --failover
-
Designates whether this is a failover backend. More than one failover backend
can be configured for a given BackendService. Not compatible with the --global
flag
- --max-utilization=MAX_UTILIZATION
-
Defines the maximum target for average CPU utilization of the backend instance
in the backend instance group. Acceptable values are 0.0 (0%) through 1.0
(100%). Available for all backend service protocols, with
--balancing-mode=UTILIZATION.
For backend services that use SSL, TCP, or UDP protocols, you may specify either --max-connections or --max-connections-per-instance, either by themselves or one in conjunction with --max-utilization. In other words, the following configuration options are supported:-
- ---
- no additional parameter
- ---
- just --max-utilization
- ---
- just --max-connections
- ---
- just --max-connections-per-instance
- ---
- both --max-utilization and --max-connections
- ---
-
both --max-utilization and --max-connections-per-instance
-
The meanings for --max-connections and
--max-connections-per-instance are the same as for
--balancing-mode=CONNECTION. If one is used in conjunction with
--max-utilization, instances are considered at capacity when either
maximum utilization or maximum connections is reached.
For backend services that use HTTP, HTTPS, or HTTP/2 protocols, you may specify
either --max-rate or --max-rate-per-instance, either by
themselves or one in conjunction with --max-utilization. In other
words, the following configuration options are supported:
-
- *
- no additional parameter
- *
- just --max-utilization
- *
- just --max-rate
- *
- just --max-rate-per-instance
- *
- both --max-utilization and --max-rate
- *
-
both --max-utilization and --max-rate-per-instance
The meanings for --max-rate and --max-rate-per-instance are
the same as for --balancing-mode=RATE. If one is used in conjunction with
--max-utilization, instances are considered at capacity when
either maximum utilization or the maximum rate is reached.
-
-
At most one of these may be specified:
-
- --global
-
If set, the backend service is global.
- --region=REGION
-
Region of the backend service to operate on. Overrides the default
compute/region property value for this command invocation.
-
-
At most one of these may be specified:
-
-
At most one of these may be specified:
-
- --max-connections=MAX_CONNECTIONS
-
Maximum concurrent connections that the backend can handle. Valid for instance
group and network endpoint group backends.
- --max-connections-per-endpoint=MAX_CONNECTIONS_PER_ENDPOINT
-
Only valid for network endpoint group backends. Defines a maximum number of
connections per endpoint if all endpoints are healthy. When one or more
endpoints are unhealthy, an effective maximum number of connections per healthy
endpoint is calculated by multiplying MAX_CONNECTIONS_PER_ENDPOINT by the number
of endpoints in the network endpoint group, then dividing by the number of
healthy endpoints.
- --max-connections-per-instance=MAX_CONNECTIONS_PER_INSTANCE
-
Only valid for instance group backends. Defines a maximum number of concurrent
connections per instance if all instances in the instance group are healthy.
When one or more instances are unhealthy, an effective maximum number of
connections per healthy instance is calculated by multiplying
MAX_CONNECTIONS_PER_INSTANCE by the number of instances in the instance group,
then dividing by the number of healthy instances.
-
-
At most one of these may be specified:
-
- --max-rate=MAX_RATE
-
Maximum number of HTTP requests per second (RPS) that the backend can handle.
Valid for instance group and network endpoint group backends. Must not be
defined if the backend is a managed instance group using autoscaling based on
load balancing.
- --max-rate-per-endpoint=MAX_RATE_PER_ENDPOINT
-
Only valid for network endpoint group backends. Defines a maximum number of HTTP
requests per second (RPS) per endpoint if all endpoints are healthy. When one or
more endpoints are unhealthy, an effective maximum rate per healthy endpoint is
calculated by multiplying MAX_RATE_PER_ENDPOINT by the number of endpoints in
the network endpoint group, then dividing by the number of healthy endpoints.
- --max-rate-per-instance=MAX_RATE_PER_INSTANCE
-
Only valid for instance group backends. Defines a maximum number of HTTP
requests per second (RPS) per instance if all instances in the instance group
are healthy. When one or more instances are unhealthy, an effective maximum RPS
per healthy instance is calculated by multiplying MAX_RATE_PER_INSTANCE by the
number of instances in the instance group, then dividing by the number of
healthy instances. This parameter is compatible with managed instance group
backends that use autoscaling based on load balancing.
-
-
At most one of these may be specified:
-
-
At most one of these may be specified:
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
NOTES
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you will have to apply for early access and have your projects registered on the API whitelist to use it. To do so, contact Support at cloud.google.com/support These variants are also available:
- $ gcloud compute backend-services update-backend $ gcloud beta compute backend-services update-backend