Documentation ¶
Index ¶
- Constants
- type BootShutDownTime
- type ConfigMetrics
- type ContainersConfig
- type CriticalInterval
- type Forecast
- type ForecastedValue
- type InstancesBootShutdownTime
- type Limit
- type MSCCompleteSetting
- type MSCSimpleSetting
- type MaxServiceCapacity
- type PerformanceProfile
- type PoI
- type Policy
- type PolicyMetrics
- type PriceModel
- type Pricing
- type ProcessedForecast
- type RequestCapacitySupply
- type ScalingAction
- type Service
- type ServiceInfo
- type ServicePerformanceProfile
- type ServiceProfile
- type State
- type StateLoadCapacity
- type StructMap
- type VMPrice
- type VMScale
- type VMTimeRecord
- type VmProfile
Constants ¶
const ( ISUNDERPROVISION = "underprovisioning-allowed" MAXUNDERPROVISION = "max-percentage-underprovision" METHOD = "scaling-method" ISHETEREOGENEOUS = "heterogeneous-vms-allowed" ISRESIZEPODS = "pods-resize-allowed" VMTYPES = "vm-types" )
Policy Parameters
const ( DISCARTED = "discarted" SCHEDULED = "scheduled" SELECTED = "selected" )
Policy States
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BootShutDownTime ¶
type BootShutDownTime struct { NumInstances int `json:"NumInstances" bson:"num_instances"` BootTime float64 `json:"BootTime" bson:"boot_time"` ShutDownTime float64 `json:"ShutDownTime" bson:"shutdown_time"` }
Times in seconds
type ConfigMetrics ¶
type ConfigMetrics struct { Cost float64 `json:"cost" bson:"cost"` OverProvision float64 `json:"over_provision" bson:"over_provision"` UnderProvision float64 `json:"under_provision" bson:"under_provision"` RequestsCapacity float64 `json:"requests_capacity" bson:"requests_capacity"` CPUUtilization float64 `json:"cpu_utilization" bson:"cpu_utilization"` MemoryUtilization float64 `json:"mem_utilization" bson:"mem_utilization"` ShadowTimeSec float64 `json:"shadow_time_sec" bson:"shadow_time_sec"` TransitionTimeSec float64 `json:"transition_time_sec" bson:"transition_time_sec"` ElapsedTimeSec float64 `json:"elapsed_time_sec" bson:"elapsed_time_sec"` }
type ContainersConfig ¶
type ContainersConfig struct { Limits Limit `json:"limits" bson:"limits"` MSCSetting MSCSimpleSetting `json:"mscs" bson:"mscs"` VMSet VMScale `json:"vms" bson:"vms"` Cost float64 `json:"cost" bson:"cost"` }
Structure to keep the configuration associated to a set of containers It includes the resource limits per replica, number of replicas, bootTime of the set, a VMSet suitable to deploy the containers set and the cost of the solution
type CriticalInterval ¶
type CriticalInterval struct { TimeStart time.Time `json:"TimeStart"` Requests float64 `json:"Requests"` //max/min point in the interval TimeEnd time.Time `json:"TimeEnd"` TimePeak time.Time }
Critical Interval is the interval of time analyzed to take a scaling decision
type Forecast ¶
type Forecast struct { IDdb bson.ObjectId `bson:"_id"` ServiceName string `json:"service_name" bson:"service_name"` ForecastedValues []ForecastedValue `json:"values" bson:"values"` TimeWindowStart time.Time `json:"start_time" bson:"start_time"` TimeWindowEnd time.Time `json:"end_time" bson:"end_time"` IDPrediction string `json:"id" bson:"id_predictions"` }
Set of values received from the Forecasting component
type ForecastedValue ¶
type ForecastedValue struct { TimeStamp time.Time `json:"timestamp"` Requests float64 `json:"requests"` }
Represent the number of requests for a time T
type InstancesBootShutdownTime ¶
type InstancesBootShutdownTime struct { InstancesValues []BootShutDownTime `json:"InstanceValues" bson:"instances_values"` VMType string `json:"VMType" bson:"vm_type"` }
Times in seconds
type MSCCompleteSetting ¶
type MSCCompleteSetting struct { Replicas int `json:"Replicas"` BootTimeMs float64 `json:"Pod_boot_time_ms"` StandDevBootTimeMS float64 `json:"Sd_Pod_boot_time_ms"` MSCPerSecond MaxServiceCapacity `json:"Maximum_service_capacity_per_sec"` MSCPerMinute MaxServiceCapacity `json:"Maximum_service_capacity_per_min"` }
type MSCSimpleSetting ¶
type MSCSimpleSetting struct { Replicas int `json:"replicas" bson:"replicas"` MSCPerSecond float64 `json:"maximum_service_capacity_per_sec" bson:"maximum_service_capacity_per_sec"` BootTimeSec float64 `json:"pod_boot_time_sec" bson:"pod_boot_time_sec"` StandDevBootTimeSec float64 `json:"sd_pod_boot_time_ms" bson:"sd_pod_boot_time_ms"` }
type MaxServiceCapacity ¶
type PerformanceProfile ¶
type PerformanceProfile struct { ID bson.ObjectId `bson:"_id" json:"id"` MSCSettings []MSCSimpleSetting `json:"mscs" bson:"mscs"` Limit Limit `json:"limits" bson:"limits"` }
type PoI ¶
type PoI struct { Peak bool `json:"peak"` Index int `json:"index"` Left_ips float64 `json:"left_ips"` Right_ips float64 `json:"right_ips"` Widht_heights float64 `json:"widht_heights"` Index_in_interval_right []int `json:"index_in_interval_right"` Index_in_interval_left []int `json:"index_in_interval_left"` Start struct { Index int `json:"index"` Left_ips float64 `json:"left_ips"` Right_ips float64 `json:"right_ips"` Widht_heights float64 `json:"widht_heights"` } `json:"index_left_valley"` End struct { Index int `json:"index"` Left_ips float64 `json:"left_ips"` Right_ips float64 `json:"right_ips"` Widht_heights float64 `json:"widht_heights"` } `json:"index_right_valley"` }
Points of Interest
type Policy ¶
type Policy struct { ID bson.ObjectId ` bson:"_id" json:"id"` Algorithm string `json:"algorithm" bson:"algorithm"` Metrics PolicyMetrics `json:"metrics" bson:"metrics"` Status string `json:"status" bson:"status"` Parameters map[string]string `json:"parameters" bson:"parameters"` ScalingActions []ScalingAction `json:"scaling_actions" bson:"scaling_actions"` TimeWindowStart time.Time `json:"window_time_start" bson:"window_time_start"` TimeWindowEnd time.Time `json:"window_time_end" bson:"window_time_end"` }
Policy states the scaling transitions
type PolicyMetrics ¶
type PolicyMetrics struct { Cost float64 `json:"cost" bson:"cost"` OverProvision float64 `json:"over_provision" bson:"over_provision"` UnderProvision float64 `json:"under_provision" bson:"under_provision"` NumberScalingActions int `json:"n_scaling_actions" bson:"n_scaling_actions"` StartTimeDerivation time.Time `json:"start_derivation_time" bson:"start_derivation_time"` FinishTimeDerivation time.Time `json:"finish_derivation_time" bson:"finish_derivation_time"` DerivationDuration float64 `json:"derivation_duration" bson:"derivation_duration"` NumberVMScalingActions int `json:"num_scale_vms" bson:"num_scale_vms"` NumberContainerScalingActions int `json:"num_scale_containers" bson:"num_scale_containers"` AvgShadowTime float64 `json:"avg_shadow_time_sec" bson:"avg_shadow_time_sec"` AvgTransitionTime float64 `json:"avg_transition_time_sec" bson:"avg_transition_time_sec"` AvgElapsedTime float64 `json:"avg_time_between_scaling_sec" bson:"avg_time_between_scaling_sec"` }
type PriceModel ¶
type PriceModel struct {
VMPrices []VMPrice `yaml:"vm-prices"`
}
type ProcessedForecast ¶
type ProcessedForecast struct {
CriticalIntervals []CriticalInterval
}
ProcessedForecast metadata after processing the time serie
type RequestCapacitySupply ¶
type RequestCapacitySupply struct { IDPrediction string `json:"predictions_id"` StatesCapacity []StateLoadCapacity `json:"values"` URL string `json:"url"` }
type ScalingAction ¶
type ScalingAction struct { TimeStartTransition time.Time `json:"time_start_transition" bson:"time_start_transition"` InitialState State `json:"initial_state" bson:"initial_state"` DesiredState State `json:"desired_state" bson:"desired_state"` TimeStart time.Time `json:"time_start" bson:"time_start"` TimeEnd time.Time `json:"time_end" bson:"time_end"` Metrics ConfigMetrics `json:"metrics" bson:"metrics"` }
Resource configuration
type Service ¶
type Service map[string]ServiceInfo
Service keeps the name and scale of the scaled service
type ServiceInfo ¶
type ServiceInfo struct { Scale int `json:"Replicas"` CPU float64 `json:"Cpu_cores"` Memory float64 `json:"Mem_gb"` }
func (ServiceInfo) Equal ¶
func (conf1 ServiceInfo) Equal(conf2 ServiceInfo) bool
Compare if two container configurations for a given service are equal
type ServicePerformanceProfile ¶
type ServicePerformanceProfile struct { HostInstanceType string `json:"HostInstanceType"` ServiceName string `json:"ServiceName"` MainServiceName string `json:"MainServiceName"` ServiceType string `json:"ServiceType"` TestAPI string `json:"TestAPI"` Profiles []struct { Limits Limit `json:"Limits"` MSCs []MSCCompleteSetting `json:"MSCs"` } `json:"Profiles"` }
Struct used to parse the information received from the performance profiles API
type ServiceProfile ¶
type ServiceProfile struct { ID bson.ObjectId `bson:"_id" json:"id"` Name string `json:"service_name" bson:"service_name"` ServiceType string `json:"service_type" bson:"service_type"` PerformanceProfiles []PerformanceProfile `json:"performance_profiles" bson:"performance_profiles"` }
type State ¶
type State struct { Services Service `json:"Services"` Hash string `json:"Hash"` VMs VMScale `json:"VMs"` }
DesiredState is the metadata of the state expected to scale to
type StateLoadCapacity ¶
type StateLoadCapacity struct { TimeStamp time.Time `json:"timestamp"` Requests float64 `json:"requests"` }
Represent the number of requests for a time T
type VMScale ¶
VMScale is the factor for which a type of VM is scales
func (VMScale) ReplicasCapacity ¶
Function that calculates the capacity to host service replicas for a VM Set
type VMTimeRecord ¶
VMScale is the factor for which a type of VM is scales
type VmProfile ¶
type VmProfile struct { Type string `json:"type" bson:"type"` CPUCores float64 `json:"cpu_cores" bson:"cpu_cores"` Memory float64 `json:"mem_gb" bson:"mem_gb"` OS string `json:"os" bson:"os"` Pricing Pricing `json:"pricing" bson:"pricing"` ReplicasCapacity int `json:"replicas_capacity" bson:"replicas_capacity"` }