GCLOUD_COMPUTE_BACKEND-SERVICES_ADD-BACKEND(1)

NAME

gcloud compute backend-services add-backend - add a backend to a backend service

SYNOPSIS

gcloud compute backend-services add-backend NAME --instance-group=INSTANCE_GROUP [--balancing-mode=BALANCING_MODE] [--capacity-scaler=CAPACITY_SCALER] [--description=DESCRIPTION] [--max-utilization=MAX_UTILIZATION] [--global | --region=REGION] [--instance-group-region=INSTANCE_GROUP_REGION | --instance-group-zone=INSTANCE_GROUP_ZONE | --zone=ZONE] [--max-connections=MAX_CONNECTIONS | --max-connections-per-instance=MAX_CONNECTIONS_PER_INSTANCE | --max-rate=MAX_RATE | --max-rate-per-instance=MAX_RATE_PER_INSTANCE] [GLOBAL-FLAG ...]

DESCRIPTION
gcloud compute backend-services add-backend is used to add a backend to a backend service. A backend is a group of tasks that can handle requests sent to a backend service. Currently, the group of tasks can be one or more Google Compute Engine virtual machine instances grouped together using an instance group. Traffic is first spread evenly across all virtual machines in the group. When the group is full, traffic is sent to the next nearest group(s) that still have remaining capacity. To modify the parameters of a backend after it has been added to the backend service, use gcloud compute backend-services update-backend or gcloud compute backend-services edit.

POSITIONAL ARGUMENTS

    NAME
        The name of the backend service.

REQUIRED FLAGS

    --instance-group=INSTANCE_GROUP
        The name or URI of a Google Cloud Instance Group.

OPTIONAL FLAGS

    --balancing-mode=BALANCING_MODE
        Defines the strategy for balancing load. RATE and the max rate arguments are available only in backend services with HTTP based protocols. For backend services with TCP/SSL protocol either UTILIZATION or CONNECTION are available. BALANCING_MODE must be one of:

        CONNECTION
            Spreads load based on how many concurrent connections the group can handle. There are two ways to specify max connections: --max-connections which defines the max number of connections for the whole group or --max-connections-per-instance, which defines the max number of connections on a per-instance basis.

        RATE
            Spreads load based on how many requests per second (RPS) the group can handle. There are two ways to specify max RPS: --max-rate which defines the max RPS for the whole group or --max-rate-per-instance, which defines the max RPS on a per-instance basis.

        UTILIZATION
            Relies on the CPU utilization of the instances in the group when balancing load. Use --max-utilization to set a maximum target CPU utilization for each instance. Use --max-rate-per-instance or --max-rate to optionally limit based on RPS in addition to CPU. You can optionally also limit based on connections (for TCP/SSL) in addition to CPU by setting --max-connections or --max-connections-per-instance.

    --capacity-scaler=CAPACITY_SCALER
        A float in the range [0.0, 1.0] that scales the maximum parameters for the group (e.g., max rate). A value of 0.0 will cause no requests to be sent to the group (i.e., it adds the group in a drained state).

    --description=DESCRIPTION
        An optional, textual description for the backend.

    --max-utilization=MAX_UTILIZATION
        The target CPU utilization for the group as a float in the range [0.0, 1.0]. This flag can only be provided when the balancing mode is UTILIZATION.

At most one of these may be specified:

    --global
        If provided, it is assumed the backend service is global.

    --region=REGION
        The 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:

    --instance-group-region=INSTANCE_GROUP_REGION
        The region of the instance group to add to the backend service. If not specified, you will be prompted to select a region. A list of regions can be fetched by running:
        $ gcloud compute regions list
    Overrides the default compute/region property value for this command invocation.

    --instance-group-zone=INSTANCE_GROUP_ZONE
        The zone of the instance group to add to the backend service. If not specified, you will be prompted to select a zone. A list of zones can be fetched by running:
        $ gcloud compute zones list
    Overrides the default compute/zone property value for this command invocation.

    --zone=ZONE
        The zone of the instance group to add to the backend service. DEPRECATED, use --instance-group-zone flag instead. Overrides the default compute/zone property value for this command invocation.

At most one of these may be specified:

    --max-connections=MAX_CONNECTIONS
        Maximum concurrent connections that the group can handle.

    --max-connections-per-instance=MAX_CONNECTIONS_PER_INSTANCE
        The maximum concurrent connections per-instance.

    --max-rate=MAX_RATE
        Maximum requests per second (RPS) that the group can handle.

    --max-rate-per-instance=MAX_RATE_PER_INSTANCE
        The maximum per-instance requests per second (RPS).

GLOBAL FLAGS
Run $ gcloud help for a description of flags available to all commands.