NavigationContentFooter
Jump toSuggest an edit

Containers - Concepts

Reviewed on 14 November 2024

Cold Start

Cold start is the time a Container takes to handle a request when it is called for the first time.

Startup process steps are:

  • Downloading the container image to our infrastructure
  • Starting the container. Optimize your container startup speed to minimize this step (e.g., avoid waiting for slow connections or downloading large objects at startup)
  • Waiting for the container to listen on the configured port.

How to reduce cold starts

Concurrency

Concurrency defines the number of simultaneous requests a single instance of your container can handle at the same time. Once the number of incoming requests exceeds this value, your container scales according to your parameters.

Refer to the dedicated documentation for more information on container concurrency.

Container

A container is a package of software that includes all dependencies: code, runtime, configuration, and system libraries so that it can run on any host system. Scaleway provides custom Docker images that are entirely handled for you in the cloud. With Containers, you can rely on your favorite technologies such as Django, or Ruby on Rails.

Container Registry

Container Registry is the place where your images are stored before being deployed.

CRON trigger

A CRON trigger is a mechanism used to automatically invoke a Serverless Function at a specific time on a recurring schedule. It works similarly to a traditional Linux cron job, using the * * * * * format, and uses the UTC time zone. Refer to our cron schedules reference for more information.

Environment variables

An environment variable is a variable whose value is set outside the program, typically through functionality built into the operating system, or microservice. An environment variable is made up of a name/value pair, and any number may be created and available for reference at a point in time.

Ephemeral storage

In addition to vCPU and RAM, Serverless Containers also provide a storage volume for the duration of the task. This storage space allows to hold the data retrieved by the job, and disappears once the execution is complete. The maximum size of the ephemeral storage is tied to the allocated memory.

GB-s

Unit used to measure the resource consumption of a container. It reflects the amount of memory consumed over time.

Image

An image is a blueprint from which an arbitrary number of brand-new containers can be started. You can start a container from an image, perform operations in it, and save another image based on the latest state of the container.

JWT Token

JWT (JSON Web Token) is an access token you can create from the console or API to enable an application to access your Private Container. Consult the Developer documentation for more details.

mvCPU

A vCPU (Virtual Central Processing Unit) is equivalent to 1000 mvCPU.

Namespace

A namespace is a project that allows you to group your containers. Containers in the same namespace can share environment variables and access tokens, defined at the namespace level.

NATS trigger

A NATS trigger is a mechanism that connects a container to a NATS subject and invokes the container automatically whenever a message is published to the subject.

For each message that is sent to a NATS subject, the NATS trigger reads the message and invokes the associated container with the message as the input parameter. The container can then process the message and perform any required actions, such as updating a database or sending a notification.

Port

The port parameter specifies the network port that your container listens on for incoming requests. If your application or container is set up to listen on a different port, you must specify it using the port parameter when deploying your container to Serverless Containers. It must reflect the port configuration within your container for your service to function correctly.

The value defined in the port parameter will then be passed to your container during the deployment inside the PORT environment variable.

Privacy policy

A container’s privacy policy defines whether a container may be invoked anonymously (public) or only via an authentication mechanism provided by the Scaleway API (private).

Sandbox

A sandbox is an isolation area for your container. Serverless Containers offer two sandboxing environments:

  • v2 - Recommended for faster cold starts.
  • v1 - Legacy sandboxing with slower cold starts, but fully supports Linux system call interface.

Scale to zero

One of the advantages of Serverless Containers is that when your container is not triggered, it does not consume any resources, which enables great savings.

Scaling

Serverless Containers make scaling your application transparent, up to 20 instances of your container can be run at the same time.

Secrets

Secrets are an extra-secure type of environment variable. They are environment variables that are injected into your container and stored securely, but not displayed in the console after initial validation.

Serverless

Serverless allows you to deploy your Functions (FaaS) and Containerized Applications (CaaS) in a managed infrastructure. Scaleway ensures the deployment, availability, and scalability of all your projects.

Serverless Framework

Serverless.com (Serverless Framework) is a tool that allows you to deploy serverless applications without having to manage Serverless Container’s API call. Write and deploy a YAML configuration file, everything else is handled automatically, even the image building.

SQS trigger

An SQS (Simple Queue Service) trigger is a mechanism that connects a container to an SQS queue and invokes the container automatically whenever a message is added to the queue.

For each message that is sent to an SQS queue, the SQS trigger reads the message and invokes the associated container with the message as the input parameter. The container can then process the message and perform any required actions, such as updating a database or sending a notification.

Stateless application

A stateless application is a computer program that does not save client data between sessions. Data generated in one session is not saved for use in the next session with that client. All applications deployed on Serverless Containers are stateless.

Timeout

The timeout is the maximum length of time your container can spend processing a request before being stopped. This value must be in the range 10s to 900s.

vCPU

vCPU is the abbreviation for virtual Centralized Processing Unit. A vCPU represents a portion or share of the underlying physical CPU assigned to a particular container. The performance of a vCPU is determined by the percentage of time spent on the physical processor’s core. It is possible to allocate different resource allowances on specific vCPUs for specific containers or virtual machines.

vCPU-s

Unit used to measure the resource consumption of a container. It reflects the amount of vCPU used over time.

Protocol

Serverless Containers supports http1 (default) and http2 (h2c). In some cases, for example, while deploying a container using gRPC, you may need to upgrade the protocol for it to work.

API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2024 – Scaleway