Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI Studio
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Cloud Functions
  • Comparison with other Yandex Cloud services
    • Overview
    • Function
    • Invoking a function
    • Asynchronous function invocation
    • Long-lived functions
    • Function termination notifications
    • Networking
      • Overview
      • Environment
      • Execution context
      • Preloaded runtime environment
    • Mounting external resources to a function file system
    • Builder
    • Dead Letter Queue
    • Function logs
    • Backups
    • Quotas and limits
  • Tools
  • Pricing policy
  • Access management
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • FAQ

In this article:

  • Initializing a runtime environment
  • Updating a runtime environment
  1. Concepts
  2. Runtime environment
  3. Preloaded runtime environment

Preloaded runtime environment

Written by
Yandex Cloud
Updated at August 18, 2023
  • Initializing a runtime environment
  • Updating a runtime environment

A preloaded runtime environment is a special environment that enables you to reduce the cold start time of functions and to receive runtime updates automatically.

Preloaded runtime environments are usually those which have the latest major version. For more information, see the table Runtime environments. If a new major version of a runtime environment is added to Cloud Functions as a preloaded one, the previous version will no longer be preloaded after a while. A notification will be sent to users who are using the old version, specifying the period available for switching to the new major version.

Note

Cloud Functions does not guarantee that the preload option is used for all runtime environments that support it. For such runtime environments, functions with a regular runtime environment can be invoked.

To use preloaded runtime environments as regular ones, add the following user-defined environment variables:

  • X_YCF_NO_RUNTIME_POOL set to 1.
  • LD_PRELOAD or LD_LIBRARY_PATH when using dynamic libraries.

Initializing a runtime environmentInitializing a runtime environment

When a function is deployed with a cold start invocation in a normal runtime environment, Cloud Functions starts the interpreter after receiving the function invocation request. Therefore, request processing time includes:

  • Interpreter start time.
  • Cloud Functions runtime component initialization time.

When a function is deployed with a cold start invocation in a preloaded runtime environment, the interpreter and the runtime components start before the request is processed. This reduces the response time.

Note

When the interpreter starts, custom environment variables are unknown to the preloaded runtime. They are set programmatically before the function code is initialized.

Updating a runtime environmentUpdating a runtime environment

If, when creating a function version, you select a runtime environment version with the preload option support, it will be automatically updated to the latest minor version available in Cloud Functions. The available minor runtime environment version usually lags behind the global minor version.

For example, if Python 3.11 is selected as a preloaded runtime environment, Cloud Functions may use 3.11.1 as a minor version while the current global minor version is 3.11.4. After a while, the currently used minor version 3.11.1 will be automatically updated to 3.11.2, then to 3.11.3, etc.

If a runtime environment stops being preloaded, it is no longer updated and is rolled back to the minor version valid at the time of function version creation. If Python 3.12 is added to Cloud Functions as a preloaded runtime environment, the minor runtime environment version 3.11.4 will be rolled back to 3.11.1, which was valid in Cloud Functions when creating a function version in the example above.

Note

A runtime environment's major version is not updated automatically.

If you select a regular runtime environment when creating a function version, you need to create a new function version with a new runtime environment version to update it.

Was the article helpful?

Previous
Execution context
Next
Mounting external resources to a function file system
© 2025 Direct Cursus Technology L.L.C.