Setting the number of concurrent container instance calls
The number of concurrent container instance calls (concurrency) cannot exceed the relevant quota.
- In the management console
, go to the folder with your container. - Go to Serverless Containers.
- Select the container.
- Navigate to the Editor tab.
- Set the number of concurrent container instance calls under Settings.
- Click Create revision.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
To set the number of concurrent container instance calls, run this command:
yc serverless container revision deploy \
--container-id <container_ID> \
--image <Docker_image_URL> \
--concurrency 2 \
--service-account-id <service_account_ID>
Where:
--container-id: Container ID. To find out the ID, get a list of containers.--image: Docker image URL.--concurrency: Maximum number of concurrent requests to a single container instance.--service-account-id: ID of the service account with permissions to download a Docker image.
Result:
done (3s)
id: bbalbpl7k8hmn********
container_id: bbab5i36nvda********
created_at: "2026-04-01T13:46:38.069Z"
image:
image_url: cr.yandex/crpp35hht729********/ubuntu:hello
image_digest: sha256:f6f34c6cf5f56e594e9828274592f1cc4d9383b1689057ccaf188d41********
resources:
memory: "134217728"
cores: "1"
core_fraction: "100"
execution_timeout: 3s
concurrency: "2"
service_account_id: aje07l4q4vmo********
status: ACTIVE
log_options:
folder_id: b1gc1t4cb638********
runtime:
http: {}
metadata_options: {}
To learn more about the command, see the CLI reference.
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the relevant documentation on the Terraform
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
-
To set the number of concurrent requests to a single container instance, describe the
concurrencyparameter in the configuration file.Here is an example of the configuration file structure:
resource "yandex_serverless_container" "container" { name = "container" service_account_id = "ajeh91ebakk1********" memory = 128 concurrency = 2 image { url = "cr.yandex/crpnj09pj62e********/ubuntu:hello" } }Where:
name: Container name.service_account_id: ID of the service account with permissions to download a Docker image.memory: Required memory. The default value is 128 MB.concurrency: Maximum number of concurrent requests to a single container instance.url: Docker image URL.
For more information about the
yandex_serverless_containerproperties, see this provider guide. -
Run a check using the following command:
terraform planA list of resource parameters will be displayed in the terminal. This is a test step: the resource will not be changed. Otherwise, Terraform will show any detected errors.
-
Apply the configuration changes:
terraform apply -
Confirm changing the resources by entering
yesin the terminal window and pressing Enter.
To set the number of concurrent container instance calls, use the deployRevision REST API method for the Container resource or the ContainerService/DeployRevision gRPC API call.