class Google::Apis::AppengineV1beta5::TrafficSplit
Configuration for traffic splitting for versions within a single service. Traffic splitting allows traffic directed to the service to be assigned to one of several versions in a fractional way, enabling experiments and canarying new builds, for example.
Attributes
Mapping from service version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version may only be specified once, but some versions in the service may not have any traffic allocation. Services that have traffic allocated in this field may not be deleted until the service is deleted, or their traffic allocation is removed. Allocations must sum to 1. Supports precision up to two decimal places for IP-based splits and up to three decimal places for cookie-based splits. Corresponds to the JSON property `allocations` @return [Hash<String,Float>]
Which mechanism should be used as a selector when choosing a version to send a request to. The traffic selection algorithm will be stable for either type until allocations are changed. Corresponds to the JSON property `shardBy` @return [String]
Public Class Methods
# File generated/google/apis/appengine_v1beta5/classes.rb, line 1409 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File generated/google/apis/appengine_v1beta5/classes.rb, line 1414 def update!(**args) @shard_by = args[:shard_by] if args.key?(:shard_by) @allocations = args[:allocations] if args.key?(:allocations) end