Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions pages/serverless-containers/concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Autoscaling parameters are [min-scale](/serverless-containers/concepts/#min-scal
* **CPU usage:** to scale based on CPU percentage, suitable for intensive CPU workloads.
* **RAM usage** to scale based on RAM percentage, suitable for memory intensive workloads.

Refer to the [dedicated documentation](/serverless-containers/reference-content/containers-autoscaling/) for more information on autoscaling.

## Cold start

Cold start is the time a Container takes to handle a request when it is called for the first time.
Expand Down Expand Up @@ -87,11 +89,17 @@ Unit used to measure the resource consumption of a container. It reflects the am

gRPC is supported on Serverless Containers, as long as you have enabled http2 (`h2c`) protocol.

## Healthcheck
## Health check

To determine the status of a container, the default healthcheck automatically checks if basic requirements are met, to define the status as `ready`.
To determine the status of a container, the default health check automatically checks if basic requirements are met, to define the status as `ready`. You can customize the following elements to better fit your use case:
- The **probe type** defines the type of check to perform to define if your container is ready:
- The **TCP** probe will check if the TCP connection of your Serverless Container is opened on the specified port
- The **HTTP** probe allows you to define a custom path to your Serverless Container to get the readiness status. It can be useful to check if all requirements are met, such as the connection to database, etc.
- The **failure threshold** corresponds to the maximum number of checks that can fail before declaring the Serverless Container in error. Defaults to 30.
- The **interval** corresponds to the duration in seconds between every checks. Defaults to 10 seconds.
- The **path** (HTTP probe type only) corresponds to the endpoint to call you Serverless Container (example: `/health`).

You can define custom healthcheck rules with a [specific endpoint via the Scaleway API](https://www.scaleway.com/en/developers/api/serverless-containers/#path-containers-create-a-new-container).
You can define custom health check rules via the [Scaleway console](/serverless-containers/how-to/manage-a-container/) or set a [specific endpoint via the Scaleway API](https://www.scaleway.com/en/developers/api/serverless-containers/#path-containers-create-a-new-container).

## Instance

Expand Down
100 changes: 78 additions & 22 deletions pages/serverless-containers/how-to/deploy-container.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ content:
paragraph: Deploy containers from the Scaleway Container Registry or from external public registries.
tags: deploy container create scaleway-registry docker image external registry public
dates:
validation: 2024-11-05
validation: 2025-02-25
posted: 2021-05-26
categories:
- serverless
Expand Down Expand Up @@ -40,16 +40,44 @@ You can deploy a container from the [Scaleway Container Registry](/container-reg
<Message type="note">
Available memory depends on allocated vCPU, and the maximum ephemeral storage value depends on allocated memory.
</Message>
- Set your [scaling](/serverless-containers/concepts/#scaling) preferences, or leave them at default values. The Scaleway platform automatically scales the number of available instances of your container to match the incoming load, depending on the settings you define here.
- Click **Advanced options** to define any [environment variables](/serverless-containers/concepts/#environment-variables) you want to inject into your container. For each environment variable, click **+Add variable** and enter the key/value pair.
- Add [secrets](/serverless-containers/concepts/#secrets) for your container. Secrets are environment variables that are injected into your container, but the values are not retained or displayed by Scaleway after initial validation.
<Message type="note">
Encode your environment variables and secrets to `base64` if they are too large, and contain carriage returns.
</Message>
- Set the desired [privacy policy](/serverless-containers/concepts/#privacy-policy) for your container. This defines whether container invocation may be done anonymously (**public**) or only via an authentication mechanism provided by the [Scaleway API](https://www.scaleway.com/en/developers/api/serverless-containers/#authentication) (**private**).
- Set a custom [timeout](/serverless-containers/concepts/#timeout) for your container.
- Verify the **estimated cost**.
5. Click **Deploy container** to finish.
5. Set your [autoscaling](/serverless-containers/concepts/#autoscaling) preferences:
- **Request concurrency**: your container automatically scales up/down within the minimum and maximum values entered based on the number of concurrent requests received on each active instance of your container.
- **CPU percentage**: your container automatically scales up/down within the minimum and maximum values entered based on the CPU load.
- **RAM percentage**: your container automatically scales up/down within the minimum and maximum values entered based on the RAM used.
6. In the **Advanced options** section, set the following:
<Tabs>
<TabsTab label="Data">
- Declare [environment variables](/serverless-containers/concepts/#environment-variables) you want to inject into your container. For each environment variable, click **+Add variable** and enter the key/value pair.
- Declare [secrets](/serverless-containers/concepts/#secrets) for your container. Secrets are environment variables that are injected into your container, but the values are not retained or displayed by Scaleway after initial validation.
<Message type="note">
Encode your environment variables and secrets to `base64` if they are too large, and contain carriage returns.
</Message>
</TabsTab>
<TabsTab label="Security">
- Set the desired [privacy policy](/serverless-containers/concepts/#privacy-policy) for your container. This defines whether container invocation may be done anonymously (**public**) or only via an authentication mechanism provided by the [Scaleway API](https://www.scaleway.com/en/developers/api/serverless-containers/#authentication) (**private**).
- Tick the box under **HTTPS connections only** to prevent your container from being called from insecure HTTP connections.
</TabsTab>
<TabsTab label="Requests">
- Set a custom [timeout](/serverless-containers/concepts/#timeout) for the duration of the requests received by your container.
- Tick the box under [HTTP protocol](/serverless-containers/concepts/#protocol) to listen to HTTP/2 requests if it is required by your application. Otherwise, we recommend you use HTTP/1.
</TabsTab>
<TabsTab label="Performances">
- Select a [sandbox](/serverless-containers/concepts/#sandbox) version:
- Sandbox v2 for shorter cold starts (recommended).
- Sandbox v1 if you require full compatibility with the Linux system call interface (legacy).
</TabsTab>
<TabsTab label="Health checks">
- Update the [health check](/serverless-containers/concepts/#health-check) behavior according to your needs:
- **Probe type**: TCP, or HTTP
- **Health checks intervals**: 5s - 120s (default: 30s)
- **Failure threshold**: 3 - 50 (default: 10)
</TabsTab>
<TabsTab label="Storage">
- Modify the [ephemeral storage](/serverless-containers/concepts/#ephemeral-storage) according to your needs.
</TabsTab>
</Tabs>
7. Verify the **estimated cost**.
8. Click **Deploy container** to finish.

## Deploy from an external container registry

Expand All @@ -73,15 +101,43 @@ Private external container registries are currently not supported.
- Choose a **name** for your container and, optionally, a **description**. The name must only contain alphanumeric characters and dashes.
- Choose the **resources** to be allocated to your container at runtime. These define the performance characteristics of your container.
<Message type="note">
Available memory depends on allocated vCPU, and maximum ephemeral storage value depends on allocated memory.
</Message>
- Set your [scaling](/serverless-containers/concepts/#scaling) preferences, or leave them at default values. The Scaleway platform automatically scales the number of available instances of your container to match the incoming load, depending on the settings you define here.
- Click **Advanced options** to define any [environment variables](/serverless-containers/concepts/#environment-variables) you want to inject into your container. For each environment variable, click **+Add variable** and enter the key/value pair.
- Add [secrets](/serverless-containers/concepts/#secrets) for your container. Secrets are environment variables that are injected into your container, but the values are not retained or displayed by Scaleway after initial validation.
<Message type="note">
Encode your environment variables and secrets to `base64` if they are too large, and contain carriage returns.
Available memory depends on allocated vCPU, and the maximum ephemeral storage value depends on allocated memory.
</Message>
- Set the desired [privacy policy](/serverless-containers/concepts/#privacy-policy) for your container. This defines whether container invocation may be done anonymously (**public**) or only via an authentication mechanism provided by the [Scaleway API](https://www.scaleway.com/en/developers/api/serverless-containers/#authentication) (**private**).
- Set a custom [timeout](/serverless-containers/concepts/#timeout) for your container.
- Verify the **estimated cost**.
5. Click **Deploy container** to finish.
5. Set your [autoscaling](/serverless-containers/concepts/#autoscaling) preferences:
- **Request concurrency**: your container automatically scales up/down within the minimum and maximum values entered based on the number of concurrent requests received on each active instance of your container.
- **CPU percentage**: your container automatically scales up/down within the minimum and maximum values entered based on the CPU load.
- **RAM percentage**: your container automatically scales up/down within the minimum and maximum values entered based on the RAM used.
6. In the **Advanced options** section, set the following:
<Tabs>
<TabsTab label="Data">
- Declare [environment variables](/serverless-containers/concepts/#environment-variables) you want to inject into your container. For each environment variable, click **+Add variable** and enter the key/value pair.
- Declare [secrets](/serverless-containers/concepts/#secrets) for your container. Secrets are environment variables that are injected into your container, but the values are not retained or displayed by Scaleway after initial validation.
<Message type="note">
Encode your environment variables and secrets to `base64` if they are too large, and contain carriage returns.
</Message>
</TabsTab>
<TabsTab label="Security">
- Set the desired [privacy policy](/serverless-containers/concepts/#privacy-policy) for your container. This defines whether container invocation may be done anonymously (**public**) or only via an authentication mechanism provided by the [Scaleway API](https://www.scaleway.com/en/developers/api/serverless-containers/#authentication) (**private**).
- Tick the box under **HTTPS connections only** to prevent your container from being called from insecure HTTP connections.
</TabsTab>
<TabsTab label="Requests">
- Set a custom [timeout](/serverless-containers/concepts/#timeout) for the duration of the requests received by your container.
- Tick the box under [HTTP protocol](/serverless-containers/concepts/#protocol) to listen to HTTP/2 requests if it is required by your application. Otherwise, we recommend you use HTTP/1.
</TabsTab>
<TabsTab label="Performances">
- Select a [sandbox](/serverless-containers/concepts/#sandbox) version:
- Sandbox v2 for shorter cold starts (recommended).
- Sandbox v1 if you require full compatibility with the Linux system call interface (legacy).
</TabsTab>
<TabsTab label="Health checks">
- Update the [health check](/serverless-containers/concepts/#health-check) behavior according to your needs:
- **Probe type**: TCP, or HTTP
- **Health checks intervals**: 5s - 120s (default: 30s)
- **Failure threshold**: 3 - 50 (default: 10)
</TabsTab>
<TabsTab label="Storage">
- Modify the [ephemeral storage](/serverless-containers/concepts/#ephemeral-storage) according to your needs.
</TabsTab>
</Tabs>
7. Verify the **estimated cost**.
8. Click **Deploy container** to finish.
Loading