Class: Google::Apis::ComputeBeta::WeightedBackendService
- Inherits:
-
Object
- Object
- Google::Apis::ComputeBeta::WeightedBackendService
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/compute_beta/classes.rb,
lib/google/apis/compute_beta/representations.rb,
lib/google/apis/compute_beta/representations.rb
Overview
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
Instance Attribute Summary collapse
-
#backend_service ⇒ String
The full or partial URL to the default BackendService resource.
-
#header_action ⇒ Google::Apis::ComputeBeta::HttpHeaderAction
The request and response header transformations that take effect before the request is passed along to the selected backendService.
-
#weight ⇒ Fixnum
Specifies the fraction of traffic sent to a backend service, computed asweight / (sum of all weightedBackendService weights in routeAction).
Instance Method Summary collapse
-
#initialize(**args) ⇒ WeightedBackendService
constructor
A new instance of WeightedBackendService.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ WeightedBackendService
Returns a new instance of WeightedBackendService.
75509 75510 75511 |
# File 'lib/google/apis/compute_beta/classes.rb', line 75509 def initialize(**args) update!(**args) end |
Instance Attribute Details
#backend_service ⇒ String
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
thisbackendServiceWeight.
Corresponds to the JSON property backendService
75487 75488 75489 |
# File 'lib/google/apis/compute_beta/classes.rb', line 75487 def backend_service @backend_service end |
#header_action ⇒ Google::Apis::ComputeBeta::HttpHeaderAction
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
75493 75494 75495 |
# File 'lib/google/apis/compute_beta/classes.rb', line 75493 def header_action @header_action end |
#weight ⇒ Fixnum
Specifies the fraction of traffic sent to a backend service,
computed asweight / (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.
Don't configure session affinity if you're using weighted traffic
splitting. If you do, the weighted traffic splitting configuration takes
precedence.
The value must be from 0 to 1000.
Corresponds to the JSON property weight
75507 75508 75509 |
# File 'lib/google/apis/compute_beta/classes.rb', line 75507 def weight @weight end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
75514 75515 75516 75517 75518 |
# File 'lib/google/apis/compute_beta/classes.rb', line 75514 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 |