Class: Google::Apis::ComputeV1::ConsistentHashLoadBalancerSettings

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

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ConsistentHashLoadBalancerSettings

Returns a new instance of ConsistentHashLoadBalancerSettings.



7753
7754
7755
# File 'lib/google/apis/compute_v1/classes.rb', line 7753

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



7737
7738
7739
# File 'lib/google/apis/compute_v1/classes.rb', line 7737

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 toHEADER_FIELD. Corresponds to the JSON property httpHeaderName

Returns:

  • (String)


7743
7744
7745
# File 'lib/google/apis/compute_v1/classes.rb', line 7743

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

  1. 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)


7751
7752
7753
# File 'lib/google/apis/compute_v1/classes.rb', line 7751

def minimum_ring_size
  @minimum_ring_size
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7758
7759
7760
7761
7762
# File 'lib/google/apis/compute_v1/classes.rb', line 7758

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