Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
Yandex Serverless Containers
  • Comparison with other Yandex Cloud services
  • Getting started
  • Step-by-step instructions
  • Concepts
    • Overview
    • Container
    • Invoking a container
    • Networking
    • Runtime environments
    • Trigger
    • Dead Letter Queue
    • Container logs
    • Backups
    • Quotas and limits
  • Practical guidelines
  • Access management
  • Pricing policy
  • Containers API reference
  • API Triggers reference
  • Questions and answers
  1. Concepts
  2. Runtime environments

Runtime environment

Written by
Yandex Cloud
  • Supported languages and images
  • Container response
  • Environment variables
  • File system
  • Container instance resources
    • CPU
    • RAM
  • Metadata service

The application is run in a virtual environment.

Runtime environment characteristics:

  • Operating system: Ubuntu 18.04 LTS.
  • Linux kernel: 4.19.
  • Architecture: AMD64.

Supported languages and images

You can write your application in any programming language and have it use any image that meets the following requirements:

  • The executables are compiled under Linux x86_64.
  • Available image formats: Docker Image Manifest V 2, Schema 2 and OCI Image Format.

Container response

The application must retrieve the number of the port for receiving requests, from the PORT environment variable. The variable value is set by the service automatically.

After receiving a request, a container instance must send a response within the timeout specified in the Timeout field of the container revision settings. It includes the container instance launch time. Otherwise, the request terminates returning a 504 error.

Environment variables

The table provides a list of environment variables defined in the Serverless Containers runtime and available to an application. You cannot override these.

Key Value
PORT Network port the runtime uses to send HTTP requests to an application.

You can add other environment variables when you create a container revision or build a Docker image. The limit for maximum environment variable size, including variable names, is 4 KB.

You cannot calculate environment variables. Environment variable values are string constants. You can only calculate these within application code.

You can retrieve environment variables using standard programming language tools.

File system

The container image files and directories are readable on the virtual environment file system. The file system is writable. The space available for writing is limited. For more detail, please see Quotas and limits.

The file system is stored in RAM. Data written to the file system is not saved when a container instance is stopped.

Container instance resources

CPU

A CPU resource is allocated whenever a container instance is processing at least one request. Currently, no more than 1 vCPU is available.

RAM

Each container instance is allocated RAM. The default is 128 MB.

For example, RAM is consumed for:

  • File system writes.
  • Container process launches.
  • Request processing.

Metadata service

The metadata service is available inside the container's virtual runtime environment. Using it, you can get an IAM token for a service account if you specified the service account when creating the container revision.

Was the article helpful?

Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
In this article:
  • Supported languages and images
  • Container response
  • Environment variables
  • File system
  • Container instance resources
  • CPU
  • RAM
  • Metadata service