Class: Google::Apis::ComputeBeta::BackendServiceFailoverPolicy

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/compute_beta/classes.rb,
generated/google/apis/compute_beta/representations.rb,
generated/google/apis/compute_beta/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



2966
2967
2968
# File 'generated/google/apis/compute_beta/classes.rb', line 2966

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)


2942
2943
2944
# File 'generated/google/apis/compute_beta/classes.rb', line 2942

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)


2951
2952
2953
# File 'generated/google/apis/compute_beta/classes.rb', line 2951

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)


2964
2965
2966
# File 'generated/google/apis/compute_beta/classes.rb', line 2964

def failover_ratio
  @failover_ratio
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2971
2972
2973
2974
2975
# File 'generated/google/apis/compute_beta/classes.rb', line 2971

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