Class: Google::Apis::ComputeAlpha::BackendServiceFailoverPolicy

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

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) ⇒ BackendServiceFailoverPolicy

Returns a new instance of BackendServiceFailoverPolicy



2928
2929
2930
# File 'generated/google/apis/compute_alpha/classes.rb', line 2928

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

Instance Attribute Details

#disable_connection_drain_on_failoverBoolean Also known as: disable_connection_drain_on_failover?

On failover or failback, this field indicates whether connection drain will be honored. Setting this to true has the following effect: connections to the old active pool are not drained. Connections to the new active pool use the timeout of 10 min (currently fixed). Setting to false has the following effect: both old and new connections will have a drain timeout of 10 min. This can be set to true only if the protocol is TCP. The default is false. Corresponds to the JSON property disableConnectionDrainOnFailover

Returns:

  • (Boolean)


2904
2905
2906
# File 'generated/google/apis/compute_alpha/classes.rb', line 2904

def disable_connection_drain_on_failover
  @disable_connection_drain_on_failover
end

#drop_traffic_if_unhealthyBoolean Also known as: drop_traffic_if_unhealthy?

This option is used only when no healthy VMs are detected in the primary and backup instance groups. When set to true, traffic is dropped. When set to false, new connections are sent across all VMs in the primary group. The default is false. Corresponds to the JSON property dropTrafficIfUnhealthy

Returns:

  • (Boolean)


2913
2914
2915
# File 'generated/google/apis/compute_alpha/classes.rb', line 2913

def drop_traffic_if_unhealthy
  @drop_traffic_if_unhealthy
end

#failover_ratioFloat

The value of the field must be in [0, 1]. If the ratio of the healthy VMs in the primary backend is at or below this number, traffic arriving at the load- balanced IP will be directed to the failover backend. In case where 'failoverRatio' is not set or all the VMs in the backup backend are unhealthy, the traffic will be directed back to the primary backend in the "force" mode, where traffic will be spread to the healthy VMs with the best effort, or to all VMs when no VM is healthy. This field is only used with l4 load balancing. Corresponds to the JSON property failoverRatio

Returns:

  • (Float)


2926
2927
2928
# File 'generated/google/apis/compute_alpha/classes.rb', line 2926

def failover_ratio
  @failover_ratio
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2933
2934
2935
2936
2937
# File 'generated/google/apis/compute_alpha/classes.rb', line 2933

def update!(**args)
  @disable_connection_drain_on_failover = args[:disable_connection_drain_on_failover] if args.key?(:disable_connection_drain_on_failover)
  @drop_traffic_if_unhealthy = args[:drop_traffic_if_unhealthy] if args.key?(:drop_traffic_if_unhealthy)
  @failover_ratio = args[:failover_ratio] if args.key?(:failover_ratio)
end