Class: Google::Apis::ComputeBeta::BackendServiceFailoverPolicy
- Inherits:
-
Object
- Object
- Google::Apis::ComputeBeta::BackendServiceFailoverPolicy
- 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
-
#disable_connection_drain_on_failover ⇒ Boolean
(also: #disable_connection_drain_on_failover?)
On failover or failback, this field indicates whether connection drain will be honored.
-
#drop_traffic_if_unhealthy ⇒ Boolean
(also: #drop_traffic_if_unhealthy?)
This option is used only when no healthy VMs are detected in the primary and backup instance groups.
-
#failover_ratio ⇒ Float
The value of the field must be in [0, 1].
Instance Method Summary collapse
-
#initialize(**args) ⇒ BackendServiceFailoverPolicy
constructor
A new instance of BackendServiceFailoverPolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ BackendServiceFailoverPolicy
Returns a new instance of BackendServiceFailoverPolicy
2895 2896 2897 |
# File 'generated/google/apis/compute_beta/classes.rb', line 2895 def initialize(**args) update!(**args) end |
Instance Attribute Details
#disable_connection_drain_on_failover ⇒ Boolean 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
2871 2872 2873 |
# File 'generated/google/apis/compute_beta/classes.rb', line 2871 def disable_connection_drain_on_failover @disable_connection_drain_on_failover end |
#drop_traffic_if_unhealthy ⇒ Boolean 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
2880 2881 2882 |
# File 'generated/google/apis/compute_beta/classes.rb', line 2880 def drop_traffic_if_unhealthy @drop_traffic_if_unhealthy end |
#failover_ratio ⇒ Float
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
2893 2894 2895 |
# File 'generated/google/apis/compute_beta/classes.rb', line 2893 def failover_ratio @failover_ratio end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2900 2901 2902 2903 2904 |
# File 'generated/google/apis/compute_beta/classes.rb', line 2900 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 |