Modifier and Type | Method and Description |
---|---|
Backend |
build() |
Backend.Builder |
clone() |
String |
getBalancingMode()
Specifies the balancing mode for the backend.
|
Float |
getCapacityScaler()
A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or
CONNECTION).
|
String |
getDescription()
An optional description of this resource.
|
String |
getGroup()
The fully-qualified URL of an instance group or network endpoint group (NEG) resource.
|
Integer |
getMaxConnections()
Defines a maximum target for simultaneous connections for the entire backend (instance group
or NEG).
|
Integer |
getMaxConnectionsPerEndpoint()
Defines a maximum target for simultaneous connections for an endpoint of a NEG.
|
Integer |
getMaxConnectionsPerInstance()
Defines a maximum target for simultaneous connections for a single VM in a backend instance
group.
|
Integer |
getMaxRate()
The max requests per second (RPS) of the group.
|
Float |
getMaxRatePerEndpoint()
Defines a maximum target for requests per second (RPS) for an endpoint of a NEG.
|
Float |
getMaxRatePerInstance()
Defines a maximum target for requests per second (RPS) for a single VM in a backend instance
group.
|
Float |
getMaxUtilization()
Defines the maximum average CPU utilization of a backend VM in an instance group.
|
Backend.Builder |
mergeFrom(Backend other) |
Backend.Builder |
setBalancingMode(String balancingMode)
Specifies the balancing mode for the backend.
|
Backend.Builder |
setCapacityScaler(Float capacityScaler)
A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or
CONNECTION).
|
Backend.Builder |
setDescription(String description)
An optional description of this resource.
|
Backend.Builder |
setGroup(String group)
The fully-qualified URL of an instance group or network endpoint group (NEG) resource.
|
Backend.Builder |
setMaxConnections(Integer maxConnections)
Defines a maximum target for simultaneous connections for the entire backend (instance group
or NEG).
|
Backend.Builder |
setMaxConnectionsPerEndpoint(Integer maxConnectionsPerEndpoint)
Defines a maximum target for simultaneous connections for an endpoint of a NEG.
|
Backend.Builder |
setMaxConnectionsPerInstance(Integer maxConnectionsPerInstance)
Defines a maximum target for simultaneous connections for a single VM in a backend instance
group.
|
Backend.Builder |
setMaxRate(Integer maxRate)
The max requests per second (RPS) of the group.
|
Backend.Builder |
setMaxRatePerEndpoint(Float maxRatePerEndpoint)
Defines a maximum target for requests per second (RPS) for an endpoint of a NEG.
|
Backend.Builder |
setMaxRatePerInstance(Float maxRatePerInstance)
Defines a maximum target for requests per second (RPS) for a single VM in a backend instance
group.
|
Backend.Builder |
setMaxUtilization(Float maxUtilization)
Defines the maximum average CPU utilization of a backend VM in an instance group.
|
public Backend.Builder mergeFrom(Backend other)
public String getBalancingMode()
When choosing a balancing mode, you need to consider the loadBalancingScheme, and protocol for the backend service, as well as the type of backend (instance group or NEG).
- If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle. You can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.
If the loadBalancingScheme for the backend service is EXTERNAL (SSL Proxy and TCP Proxy load balancers), you must also specify exactly one of the following parameters: maxConnections, maxConnectionsPerInstance, or maxConnectionsPerEndpoint.
If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.
- If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS). You can use the RATE balancing mode if the protocol for the backend service is HTTP or HTTPS. You must specify exactly one of the following parameters: maxRate, maxRatePerInstance, or maxRatePerEndpoint.
- If the load balancing mode is UTILIZATION, the load is spread based on the CPU utilization of instances in an instance group. You can use the UTILIZATION balancing mode if the loadBalancingScheme of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED and the backends are instance groups. There are no restrictions on the backend service protocol.
public Backend.Builder setBalancingMode(String balancingMode)
When choosing a balancing mode, you need to consider the loadBalancingScheme, and protocol for the backend service, as well as the type of backend (instance group or NEG).
- If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle. You can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.
If the loadBalancingScheme for the backend service is EXTERNAL (SSL Proxy and TCP Proxy load balancers), you must also specify exactly one of the following parameters: maxConnections, maxConnectionsPerInstance, or maxConnectionsPerEndpoint.
If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.
- If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS). You can use the RATE balancing mode if the protocol for the backend service is HTTP or HTTPS. You must specify exactly one of the following parameters: maxRate, maxRatePerInstance, or maxRatePerEndpoint.
- If the load balancing mode is UTILIZATION, the load is spread based on the CPU utilization of instances in an instance group. You can use the UTILIZATION balancing mode if the loadBalancingScheme of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED and the backends are instance groups. There are no restrictions on the backend service protocol.
public Float getCapacityScaler()
This cannot be used for internal load balancing.
public Backend.Builder setCapacityScaler(Float capacityScaler)
This cannot be used for internal load balancing.
public String getDescription()
public Backend.Builder setDescription(String description)
public String getGroup()
- When the loadBalancingScheme for the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the backend can be either an instance group or a NEG. The backends on the backend service must be either all instance groups or all NEGs. You cannot mix instance group and NEG backends on the same backend service.
- When the loadBalancingScheme for the backend service is INTERNAL, the backend must be an instance group in the same region as the backend service. NEGs are not supported.
You must use the fully-qualified URL (starting with https://www.googleapis.com/) to specify the instance group or NEG. Partial URLs are not supported.
public Backend.Builder setGroup(String group)
- When the loadBalancingScheme for the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the backend can be either an instance group or a NEG. The backends on the backend service must be either all instance groups or all NEGs. You cannot mix instance group and NEG backends on the same backend service.
- When the loadBalancingScheme for the backend service is INTERNAL, the backend must be an instance group in the same region as the backend service. NEGs are not supported.
You must use the fully-qualified URL (starting with https://www.googleapis.com/) to specify the instance group or NEG. Partial URLs are not supported.
public Integer getMaxConnections()
Not available if the backend's balancingMode is RATE. If the loadBalancingScheme is INTERNAL, then maxConnections is not supported, even though the backend requires a balancing mode of CONNECTION.
public Backend.Builder setMaxConnections(Integer maxConnections)
Not available if the backend's balancingMode is RATE. If the loadBalancingScheme is INTERNAL, then maxConnections is not supported, even though the backend requires a balancing mode of CONNECTION.
public Integer getMaxConnectionsPerEndpoint()
Not available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerEndpoint even though its backends require a balancing mode of CONNECTION.
public Backend.Builder setMaxConnectionsPerEndpoint(Integer maxConnectionsPerEndpoint)
Not available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerEndpoint even though its backends require a balancing mode of CONNECTION.
public Integer getMaxConnectionsPerInstance()
Not available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerInstance even though its backends require a balancing mode of CONNECTION.
public Backend.Builder setMaxConnectionsPerInstance(Integer maxConnectionsPerInstance)
Not available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerInstance even though its backends require a balancing mode of CONNECTION.
public Integer getMaxRate()
This cannot be used for internal load balancing.
public Backend.Builder setMaxRate(Integer maxRate)
This cannot be used for internal load balancing.
public Float getMaxRatePerEndpoint()
If the backend's balancingMode is RATE, you must specify either this parameter, maxRate, or maxRatePerInstance.
Not available if the backend's balancingMode is CONNECTION.
public Backend.Builder setMaxRatePerEndpoint(Float maxRatePerEndpoint)
If the backend's balancingMode is RATE, you must specify either this parameter, maxRate, or maxRatePerInstance.
Not available if the backend's balancingMode is CONNECTION.
public Float getMaxRatePerInstance()
If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is RATE, you must specify either this parameter, maxRate, or maxRatePerEndpoint.
Not available if the backend's balancingMode is CONNECTION.
public Backend.Builder setMaxRatePerInstance(Float maxRatePerInstance)
If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is RATE, you must specify either this parameter, maxRate, or maxRatePerEndpoint.
Not available if the backend's balancingMode is CONNECTION.
public Float getMaxUtilization()
This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections, or maxConnectionsPerInstance.
public Backend.Builder setMaxUtilization(Float maxUtilization)
This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections, or maxConnectionsPerInstance.
public Backend build()
public Backend.Builder clone()
Copyright © 2019 Google LLC. All rights reserved.