Container
Containers enable you to launch an application in a Docker image in Yandex Cloud. After creating a container revision, you can invoke it:
- Over HTTPS.
- Using a trigger.
- Using a Yandex API Gateway extension.
Learn more about invoking a container.
Container revision
You can only create a container revision from a Docker image uploaded to a registry in Yandex Container Registry. No other registries are supported. The revision contains all the information needed to run the container.
Possible revision statuses include:
Active
Obsolete
Invoking a container triggers the active revision. By default, it is the latest revision, but you have the option to change the active revision. When you create a new revision, it automatically becomes active.
Note
To ensure the integrity of version links, you cannot update or delete container revisions.
You need to create a new revision:
- When you upload a new Docker image version to Yandex Container Registry.
- When you modify revision settings.
If a registry or repository containing the Docker image is not public, you need to specify a service account with permission to download the Docker image in the revision settings. For example, the container-registry.images.puller
role to the folder or registry containing the Docker image.
If a service account is specified in the revision settings, the user or the service account creating the revision must have the iam.serviceAccounts.user
role. It confirms the right to use the service account.
Scaling a container
A container instance processes one container invocation at a single point in time. If the container is invoked faster than the instance can process the request, the service scales the container by running additional container instances. This ensures concurrent request processing.
You can change the maximum number of concurrent invocations of a single container instance and specify the number of provisioned container instances.
Scaling settings take effect within five minutes after being configured.
Provisioned instances
A provisioned instance is a container instance that, when started, is guaranteed not to have a cold start. In the provisioned instance before the container is invoked:
- Serverless Containers runtime environment components are initialized.
- The user application is loaded and initialized.
Downtime of provisioned instances and runtime of the container in them are charged additionally.
If the number of container invocations exceeds the number of provisioned instances, Serverless Containers scales the container within the quotas, but unprovisioned instances have a cold start when they are first started.
Provisioned instances count towards the following quotas even when they are not running:
- Number of container instances per availability zone.
- Total RAM for all running container instances per availability zone.
- Number of provisioned container instances per cloud.