Skip to main content

Service Default Quotas

Default Quotas for the Service

  • Service Provider defines default quotas for the service when creating it.
  • The critical for Resource Conflict detection quotas are:
    • CPU Limit
    • Memory Limit
    • Storage Disk Limit
  • The critical quotas are mandatory fields to fill
  • Ensure that all default/critical quotas corresponding to Service's consumption. In case defined values are less that Service needs - it leads to terminate Service on the Unit by System accordingly
  • The default quotas are checked when the new version is uploaded, the upload failed if the default quotas are absent (for the services, implemented before the critical quotas become mandatory), and there is a notification that the reason for failure is absent default critical quotas Service mandatory fields

Quotas for the service version

  • Service Provider fills quotas values when creating/updating the service version
  • the list of quotas available to provide:
    • CPU Limit (DMIPS)
    • Memory Limit (kB)
    • Upload Speed Limit (Kibits/s)
    • Upload Limit (kB)
    • Download Speed Limit (Kibits/s)
    • Download Limit (kB per 24h)
    • State Disk Limit (kB)
    • Storage Disk Limit (kB)
    • Temporary Folder Limit (kB)
  • All quotas for the Service Version are optional (config.yaml)
  • The upload of service version is failed when the quotas for the service version are higher than default quotas
  • If some quotas value for the service version is unfilled, the default quota is considered

Validate quotas for service version

Limit possible resource usage by many services (instances) at a time.

  • The quotas values for the service version and are available for Fleet Owner on the validation step
  • Fleet Owner validates and approves or refuses the quotas for the service within the update validation procedure, using a validation set Service validation batch

Detect possible resource conflicts before deploying the service on the unit

To Guarantee resources for the services:

  • Critical Service Version Quotas are treated like a resource consumption during resource conflict detection
  • Priority should be used when the resource conflict happens
  • On the Cloud side the resource conflict detector checks the availability of required resources on the unit for the service before deployment. In case resources on the Unit are not enough for min_instances of Service Version - this service version will not be deployed to the Unit
  • Set quotes for the service for CPU Limit, Memory Limit, State Disk Limit, Storage Disk Limit, and Storage Disk Limit are treated as required resources, and also the availability on the unit is checked before the service deployment
  • When the Unit is online, the Unit informs the Cloud about the available resources (total & available for the services)
  • When the Unit becomes online, only the services approved by the Conflict Detector are deployed

"Pre-release" mode for service creation

For testing purpose services:

  • Service Provider can select the pre-release mode for the service version using SemVer specification (https://semver.org/#semantic-versioning-specification-semver)
  • The version field in config.yaml file is mandatory
  • In Pre-release mode there is an option to select "isResourceLimits" attribute (via config.yaml) Service config with version
  • Pre-release version is marked as pre-release on UI
  • When "isResourceLimits" parameter is set, it's visible on UI Service history Service info
  • When "isResourceLimits" set as true, the service version has no resource limits and also has no resource reservations - Conflict Detector for Resources/Quotas will not be run
  • Pre-release mode is active within the scope of validation set only, the update can be validated, but can't be rolled out to the units outside the validation set

Service Version deployment flow with Default Quotas and Resource Limitation

FOFOSPSPAosCloudAosCloudAosCoreAosCoreUnit status with Available Resources on the UnitCreate Service with Critical Default Quotas (CPU, Memory, Storage)Write service, sign and upload service versionCheck that quotas of service version less than default from the servicealt[service without default quotas]Mark service version as failed if the default quotas are absent[quotas for the service version are higher than default quotas]Mark service version as failed when the quotas for the service version are higher than default quotasSet quotas to the service version from the service in case they are not definde into config.yamlMark service version as readyCreate Validation Batch with showing Quotas (from -> to)Approve Validation BatchPrepare Desired list of Service Versionsalt[service version: Pre-release mode and isResourceLimits == true]Process available resources on the Unit and required recources for Service InstancesFilter Service Versions that are not allowed to deploy on the Unit due to resource conflicts (not enough CPU or Memory or Storage)alt[unit is online]Deploy all approved Service Vesions to the UnitSend Unit Status