class Google::Apis::AppengineV1beta4::TrafficSplit
Configuration for traffic splitting for versions within a single module. Traffic splitting allows traffic directed to the module to be assigned to one of several versions in a fractional way, enabling experiments and canarying new builds, for example.
Attributes
Mapping from module version IDs within the module to fractional (0.000, 1] allocations of traffic for that version. Each version may only be specified once, but some versions in the module may not have any traffic allocation. Modules that have traffic allocated in this field may not be deleted until the module 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_v1beta4/classes.rb, line 1424 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File generated/google/apis/appengine_v1beta4/classes.rb, line 1429 def update!(**args) @shard_by = args[:shard_by] if args.key?(:shard_by) @allocations = args[:allocations] if args.key?(:allocations) end