ScalingConfig

class oci.generative_ai.models.ScalingConfig(**kwargs)

Bases: object

The auto scaling configuration for the Hosted Application. Defines the minimum and maximum number of replicas. When unspecified, the service applies service-defined default scaling values.

Attributes

SCALING_TYPE_CONCURRENCY A constant which can be used with the scaling_type property of a ScalingConfig.
SCALING_TYPE_CPU A constant which can be used with the scaling_type property of a ScalingConfig.
SCALING_TYPE_MEMORY A constant which can be used with the scaling_type property of a ScalingConfig.
SCALING_TYPE_REQUESTS_PER_SECOND A constant which can be used with the scaling_type property of a ScalingConfig.
max_replica Gets the max_replica of this ScalingConfig.
min_replica Gets the min_replica of this ScalingConfig.
scaling_type [Required] Gets the scaling_type of this ScalingConfig.
target_concurrency_threshold Gets the target_concurrency_threshold of this ScalingConfig.
target_cpu_threshold Gets the target_cpu_threshold of this ScalingConfig.
target_memory_threshold Gets the target_memory_threshold of this ScalingConfig.
target_rps_threshold Gets the target_rps_threshold of this ScalingConfig.

Methods

__init__(**kwargs) Initializes a new ScalingConfig object with values from keyword arguments.
SCALING_TYPE_CONCURRENCY = 'CONCURRENCY'

A constant which can be used with the scaling_type property of a ScalingConfig. This constant has a value of “CONCURRENCY”

SCALING_TYPE_CPU = 'CPU'

A constant which can be used with the scaling_type property of a ScalingConfig. This constant has a value of “CPU”

SCALING_TYPE_MEMORY = 'MEMORY'

A constant which can be used with the scaling_type property of a ScalingConfig. This constant has a value of “MEMORY”

SCALING_TYPE_REQUESTS_PER_SECOND = 'REQUESTS_PER_SECOND'

A constant which can be used with the scaling_type property of a ScalingConfig. This constant has a value of “REQUESTS_PER_SECOND”

__init__(**kwargs)

Initializes a new ScalingConfig object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • min_replica (int) – The value to assign to the min_replica property of this ScalingConfig.
  • max_replica (int) – The value to assign to the max_replica property of this ScalingConfig.
  • scaling_type (str) – The value to assign to the scaling_type property of this ScalingConfig. Allowed values for this property are: “CPU”, “MEMORY”, “CONCURRENCY”, “REQUESTS_PER_SECOND”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • target_cpu_threshold (int) – The value to assign to the target_cpu_threshold property of this ScalingConfig.
  • target_memory_threshold (int) – The value to assign to the target_memory_threshold property of this ScalingConfig.
  • target_concurrency_threshold (int) – The value to assign to the target_concurrency_threshold property of this ScalingConfig.
  • target_rps_threshold (int) – The value to assign to the target_rps_threshold property of this ScalingConfig.
max_replica

Gets the max_replica of this ScalingConfig. Maximum number of replicas allowed.

Returns:The max_replica of this ScalingConfig.
Return type:int
min_replica

Gets the min_replica of this ScalingConfig. Minimum number of replicas to keep running.

Returns:The min_replica of this ScalingConfig.
Return type:int
scaling_type

[Required] Gets the scaling_type of this ScalingConfig. scaling type for application.

Allowed values for this property are: “CPU”, “MEMORY”, “CONCURRENCY”, “REQUESTS_PER_SECOND”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The scaling_type of this ScalingConfig.
Return type:str
target_concurrency_threshold

Gets the target_concurrency_threshold of this ScalingConfig. number of simultaneous requests that can be processed by each replica.

Returns:The target_concurrency_threshold of this ScalingConfig.
Return type:int
target_cpu_threshold

Gets the target_cpu_threshold of this ScalingConfig. Scale up if average CPU utilization exceeds this threshold.

Returns:The target_cpu_threshold of this ScalingConfig.
Return type:int
target_memory_threshold

Gets the target_memory_threshold of this ScalingConfig. Scale up if average memory utilization exceeds this threshold.

Returns:The target_memory_threshold of this ScalingConfig.
Return type:int
target_rps_threshold

Gets the target_rps_threshold of this ScalingConfig. requests-per-second per replica of an application.

Returns:The target_rps_threshold of this ScalingConfig.
Return type:int