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



3544
3545
3546
# File 'generated/google/apis/compute_alpha/classes.rb', line 3544

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)


3520
3521
3522
# File 'generated/google/apis/compute_alpha/classes.rb', line 3520

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)


3529
3530
3531
# File 'generated/google/apis/compute_alpha/classes.rb', line 3529

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)


3542
3543
3544
# File 'generated/google/apis/compute_alpha/classes.rb', line 3542

def failover_ratio
  @failover_ratio
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3549
3550
3551
3552
3553
# File 'generated/google/apis/compute_alpha/classes.rb', line 3549

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