Class: Google::Apis::ComputeAlpha::ConsistentHashLoadBalancerSettings

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/compute_alpha/classes.rb,
generated/google/apis/compute_alpha/representations.rb,
generated/google/apis/compute_alpha/representations.rb

Overview

This message defines settings for a consistent hash style load balancer.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ConsistentHashLoadBalancerSettings

Returns a new instance of ConsistentHashLoadBalancerSettings.



5121
5122
5123
# File 'generated/google/apis/compute_alpha/classes.rb', line 5121

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

The information about the HTTP Cookie on which the hash function is based for load balancing policies that use a consistent hash. Corresponds to the JSON property httpCookie



5105
5106
5107
# File 'generated/google/apis/compute_alpha/classes.rb', line 5105

def http_cookie
  @http_cookie
end

#http_header_nameString

The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD. Corresponds to the JSON property httpHeaderName

Returns:

  • (String)


5111
5112
5113
# File 'generated/google/apis/compute_alpha/classes.rb', line 5111

def http_header_name
  @http_header_name
end

#minimum_ring_sizeFixnum

The minimum number of virtual nodes to use for the hash ring. Defaults to 1024. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node. Corresponds to the JSON property minimumRingSize

Returns:

  • (Fixnum)


5119
5120
5121
# File 'generated/google/apis/compute_alpha/classes.rb', line 5119

def minimum_ring_size
  @minimum_ring_size
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5126
5127
5128
5129
5130
# File 'generated/google/apis/compute_alpha/classes.rb', line 5126

def update!(**args)
  @http_cookie = args[:http_cookie] if args.key?(:http_cookie)
  @http_header_name = args[:http_header_name] if args.key?(:http_header_name)
  @minimum_ring_size = args[:minimum_ring_size] if args.key?(:minimum_ring_size)
end