Class: Google::Apis::AppengineV1::AutomaticScaling

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

Overview

Automatic scaling is based on request rate, response latencies, and other application metrics.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AutomaticScaling

Returns a new instance of AutomaticScaling.



406
407
408
# File 'lib/google/apis/appengine_v1/classes.rb', line 406

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

Instance Attribute Details

#cool_down_periodString

The time period that the Autoscaler (https://cloud.google.com/compute/docs/ autoscaler/) should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. Only applicable in the App Engine flexible environment. Corresponds to the JSON property coolDownPeriod

Returns:

  • (String)


336
337
338
# File 'lib/google/apis/appengine_v1/classes.rb', line 336

def cool_down_period
  @cool_down_period
end

#cpu_utilizationGoogle::Apis::AppengineV1::CpuUtilization

Target scaling by CPU usage. Corresponds to the JSON property cpuUtilization



341
342
343
# File 'lib/google/apis/appengine_v1/classes.rb', line 341

def cpu_utilization
  @cpu_utilization
end

#disk_utilizationGoogle::Apis::AppengineV1::DiskUtilization

Target scaling by disk usage. Only applicable in the App Engine flexible environment. Corresponds to the JSON property diskUtilization



347
348
349
# File 'lib/google/apis/appengine_v1/classes.rb', line 347

def disk_utilization
  @disk_utilization
end

#max_concurrent_requestsFixnum

Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value. Corresponds to the JSON property maxConcurrentRequests

Returns:

  • (Fixnum)


353
354
355
# File 'lib/google/apis/appengine_v1/classes.rb', line 353

def max_concurrent_requests
  @max_concurrent_requests
end

#max_idle_instancesFixnum

Maximum number of idle instances that should be maintained for this version. Corresponds to the JSON property maxIdleInstances

Returns:

  • (Fixnum)


358
359
360
# File 'lib/google/apis/appengine_v1/classes.rb', line 358

def max_idle_instances
  @max_idle_instances
end

#max_pending_latencyString

Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it. Corresponds to the JSON property maxPendingLatency

Returns:

  • (String)


364
365
366
# File 'lib/google/apis/appengine_v1/classes.rb', line 364

def max_pending_latency
  @max_pending_latency
end

#max_total_instancesFixnum

Maximum number of instances that should be started to handle requests for this version. Corresponds to the JSON property maxTotalInstances

Returns:

  • (Fixnum)


370
371
372
# File 'lib/google/apis/appengine_v1/classes.rb', line 370

def max_total_instances
  @max_total_instances
end

#min_idle_instancesFixnum

Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service. Corresponds to the JSON property minIdleInstances

Returns:

  • (Fixnum)


376
377
378
# File 'lib/google/apis/appengine_v1/classes.rb', line 376

def min_idle_instances
  @min_idle_instances
end

#min_pending_latencyString

Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it. Corresponds to the JSON property minPendingLatency

Returns:

  • (String)


382
383
384
# File 'lib/google/apis/appengine_v1/classes.rb', line 382

def min_pending_latency
  @min_pending_latency
end

#min_total_instancesFixnum

Minimum number of running instances that should be maintained for this version. Corresponds to the JSON property minTotalInstances

Returns:

  • (Fixnum)


387
388
389
# File 'lib/google/apis/appengine_v1/classes.rb', line 387

def min_total_instances
  @min_total_instances
end

#network_utilizationGoogle::Apis::AppengineV1::NetworkUtilization

Target scaling by network usage. Only applicable in the App Engine flexible environment. Corresponds to the JSON property networkUtilization



393
394
395
# File 'lib/google/apis/appengine_v1/classes.rb', line 393

def network_utilization
  @network_utilization
end

#request_utilizationGoogle::Apis::AppengineV1::RequestUtilization

Target scaling by request utilization. Only applicable in the App Engine flexible environment. Corresponds to the JSON property requestUtilization



399
400
401
# File 'lib/google/apis/appengine_v1/classes.rb', line 399

def request_utilization
  @request_utilization
end

#standard_scheduler_settingsGoogle::Apis::AppengineV1::StandardSchedulerSettings

Scheduler settings for standard environment. Corresponds to the JSON property standardSchedulerSettings



404
405
406
# File 'lib/google/apis/appengine_v1/classes.rb', line 404

def standard_scheduler_settings
  @standard_scheduler_settings
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
# File 'lib/google/apis/appengine_v1/classes.rb', line 411

def update!(**args)
  @cool_down_period = args[:cool_down_period] if args.key?(:cool_down_period)
  @cpu_utilization = args[:cpu_utilization] if args.key?(:cpu_utilization)
  @disk_utilization = args[:disk_utilization] if args.key?(:disk_utilization)
  @max_concurrent_requests = args[:max_concurrent_requests] if args.key?(:max_concurrent_requests)
  @max_idle_instances = args[:max_idle_instances] if args.key?(:max_idle_instances)
  @max_pending_latency = args[:max_pending_latency] if args.key?(:max_pending_latency)
  @max_total_instances = args[:max_total_instances] if args.key?(:max_total_instances)
  @min_idle_instances = args[:min_idle_instances] if args.key?(:min_idle_instances)
  @min_pending_latency = args[:min_pending_latency] if args.key?(:min_pending_latency)
  @min_total_instances = args[:min_total_instances] if args.key?(:min_total_instances)
  @network_utilization = args[:network_utilization] if args.key?(:network_utilization)
  @request_utilization = args[:request_utilization] if args.key?(:request_utilization)
  @standard_scheduler_settings = args[:standard_scheduler_settings] if args.key?(:standard_scheduler_settings)
end