class Google::Apis::ComputeV1::WeightedBackendService

In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple backend services. The volume of traffic for each backend service is proportional to the weight specified in each WeightedBackendService

Attributes

backend_service[RW]

The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the load balancer applies any relevant headerActions specified as part of this backendServiceWeight. Corresponds to the JSON property `backendService` @return [String]

header_action[RW]

The request and response header transformations that take effect before the request is passed along to the selected backendService. Corresponds to the JSON property `headerAction` @return [Google::Apis::ComputeV1::HttpHeaderAction]

weight[RW]

Specifies the fraction of traffic sent to a backend service, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user' s request has been directed to a backend service, subsequent requests are sent to the same backend service as determined by the backend service's session affinity policy. The value must be from 0 to 1000. Corresponds to the JSON property `weight` @return [Fixnum]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/compute_v1/classes.rb, line 41976
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/compute_v1/classes.rb, line 41981
def update!(**args)
  @backend_service = args[:backend_service] if args.key?(:backend_service)
  @header_action = args[:header_action] if args.key?(:header_action)
  @weight = args[:weight] if args.key?(:weight)
end