Class: Google::Cloud::AppEngine::V1::TrafficSplit

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/appengine/v1/service.rb

Overview

Traffic routing configuration for versions within a single service. Traffic splits define how traffic directed to the service is assigned to versions.

Defined Under Namespace

Modules: ShardBy Classes: AllocationsEntry

Instance Attribute Summary collapse

Instance Attribute Details

#allocations::Google::Protobuf::Map{::String => ::Float}

Returns Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the service may not have any traffic allocation. Services that have traffic allocated cannot be deleted until either the service is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.

Returns:

  • (::Google::Protobuf::Map{::String => ::Float})

    Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the service may not have any traffic allocation. Services that have traffic allocated cannot be deleted until either the service is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'proto_docs/google/appengine/v1/service.rb', line 90

class TrafficSplit
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::Float]
  class AllocationsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Available sharding mechanisms.
  module ShardBy
    # Diversion method unspecified.
    UNSPECIFIED = 0

    # Diversion based on a specially named cookie, "GOOGAPPUID." The cookie
    # must be set by the application itself or no diversion will occur.
    COOKIE = 1

    # Diversion based on applying the modulus operation to a fingerprint
    # of the IP address.
    IP = 2

    # Diversion based on weighted random assignment. An incoming request is
    # randomly routed to a version in the traffic split, with probability
    # proportional to the version's traffic share.
    RANDOM = 3
  end
end

#shard_by::Google::Cloud::AppEngine::V1::TrafficSplit::ShardBy

Returns Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.

Returns:



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'proto_docs/google/appengine/v1/service.rb', line 90

class TrafficSplit
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::Float]
  class AllocationsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Available sharding mechanisms.
  module ShardBy
    # Diversion method unspecified.
    UNSPECIFIED = 0

    # Diversion based on a specially named cookie, "GOOGAPPUID." The cookie
    # must be set by the application itself or no diversion will occur.
    COOKIE = 1

    # Diversion based on applying the modulus operation to a fingerprint
    # of the IP address.
    IP = 2

    # Diversion based on weighted random assignment. An incoming request is
    # randomly routed to a version in the traffic split, with probability
    # proportional to the version's traffic share.
    RANDOM = 3
  end
end