From 50945614505044ad212209f961b49f9f0b9e2713 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 21 Feb 2025 15:46:51 +0100 Subject: [PATCH 01/15] docs(srv): advanced options + autoscaling reworks MTA-5598 --- pages/serverless-containers/concepts.mdx | 2 ++ pages/serverless-containers/quickstart.mdx | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pages/serverless-containers/concepts.mdx b/pages/serverless-containers/concepts.mdx index 6a58e72cdf..a7d71eea91 100644 --- a/pages/serverless-containers/concepts.mdx +++ b/pages/serverless-containers/concepts.mdx @@ -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. diff --git a/pages/serverless-containers/quickstart.mdx b/pages/serverless-containers/quickstart.mdx index 2a23a967bb..d861cad36f 100644 --- a/pages/serverless-containers/quickstart.mdx +++ b/pages/serverless-containers/quickstart.mdx @@ -54,8 +54,8 @@ If you have no existing Serverless Containers resources in your current Project, - Enter a **name** or use the automatically generated one. The name can only contain lowercase alphanumeric characters and dashes. - Enter a **description** (optional). - Choose the smallest **resources** available to allocate to your container. - - Leave the default **scaling** values. - - In the **Advanced options**, set the **Container privacy policy** to **public**. + - Select the **Request concurrency** [autoscaling](/serverless-containers/concepts/#autoscaling) option, then leave the default values. + - In the **Security** tab of the **Advanced options**, set the **Container privacy policies** to **public**. - Verify the estimated cost. Refer to [How to deploy a Container from the Scaleway Registry](/serverless-containers/how-to/deploy-container/) for more information on the different parameters. @@ -91,8 +91,8 @@ If you have no existing Serverless Containers resources in your current Project, - Enter a **name** or use the automatically generated one. The name can only contain lowercase alphanumeric characters and dashes. - Enter a **description** (optional). - Choose the smallest **resources** available to allocate to your container. - - Leave the default **scaling** values. - - In the **Advanced options**, set the **Container privacy policy** to **public**. + - Select the **Request concurrency** [autoscaling](/serverless-containers/concepts/#autoscaling) option, then leave the default values. + - In the **Security** tab of the **Advanced options**, set the **Container privacy policies** to **public**. - Verify the estimated cost. Refer to [How to deploy a Container from an external container registry](/serverless-containers/how-to/deploy-container/) for more information on the different parameters. From ed41fc997bc02ad28ecdd202dd23cea0cacb1c62 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 21 Feb 2025 17:51:38 +0100 Subject: [PATCH 02/15] docs(srv): update --- .../how-to/deploy-container.mdx | 84 ++++++++++++++----- 1 file changed, 64 insertions(+), 20 deletions(-) diff --git a/pages/serverless-containers/how-to/deploy-container.mdx b/pages/serverless-containers/how-to/deploy-container.mdx index 0deb580d54..0bdcb02ab5 100644 --- a/pages/serverless-containers/how-to/deploy-container.mdx +++ b/pages/serverless-containers/how-to/deploy-container.mdx @@ -40,16 +40,38 @@ You can deploy a container from the [Scaleway Container Registry](/container-reg Available memory depends on allocated vCPU, and the maximum ephemeral storage value depends on allocated memory. - - 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. - - Encode your environment variables and secrets to `base64` if they are too large, and contain carriage returns. - - - 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 request 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: + + + - 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. + + Encode your environment variables and secrets to `base64` if they are too large, and contain carriage returns. + + + + - 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. + + + - 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. + + + - 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). + + + - Modify the [ephemeral storage](/serverless-containers/concepts/#ephemeral-storage) according to your needs. + + +7. Verify the **estimated cost**. +8. Click **Deploy container** to finish. ## Deploy from an external container registry @@ -75,13 +97,35 @@ Private external container registries are currently not supported. Available memory depends on allocated vCPU, and maximum ephemeral storage value depends on allocated memory. - - 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. - - Encode your environment variables and secrets to `base64` if they are too large, and contain carriage returns. - - - 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 request 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: + + + - 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. + + Encode your environment variables and secrets to `base64` if they are too large, and contain carriage returns. + + + + - 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. + + + - 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. + + + - 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). + + + - Modify the [ephemeral storage](/serverless-containers/concepts/#ephemeral-storage) according to your needs. + + +7. Verify the **estimated cost**. +8. Click **Deploy container** to finish. From 1afef7326c04fb73a8d5c8bb518a5a94638fb148 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Mon, 24 Feb 2025 14:44:57 +0100 Subject: [PATCH 03/15] docs(srv): update --- pages/serverless-containers/how-to/deploy-container.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/serverless-containers/how-to/deploy-container.mdx b/pages/serverless-containers/how-to/deploy-container.mdx index 0bdcb02ab5..884ab38ebc 100644 --- a/pages/serverless-containers/how-to/deploy-container.mdx +++ b/pages/serverless-containers/how-to/deploy-container.mdx @@ -41,7 +41,7 @@ You can deploy a container from the [Scaleway Container Registry](/container-reg Available memory depends on allocated vCPU, and the maximum ephemeral storage value depends on allocated memory. 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 request received on each active instance of your container. + - **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: @@ -95,10 +95,10 @@ 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. - Available memory depends on allocated vCPU, and maximum ephemeral storage value depends on allocated memory. + Available memory depends on allocated vCPU, and the maximum ephemeral storage value depends on allocated memory. 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 request received on each active instance of your container. + - **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: From 70be835678dab9116daa1c933b897f71750e9824 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Mon, 24 Feb 2025 15:22:07 +0100 Subject: [PATCH 04/15] docs(srv): update --- pages/serverless-containers/quickstart.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/serverless-containers/quickstart.mdx b/pages/serverless-containers/quickstart.mdx index d861cad36f..e46178a2d2 100644 --- a/pages/serverless-containers/quickstart.mdx +++ b/pages/serverless-containers/quickstart.mdx @@ -7,7 +7,7 @@ content: paragraph: Quickstart guide for Scaleway Serverless Containers. tags: containers serverless namespace dates: - validation: 2024-08-13 + validation: 2025-02-24 posted: 2021-05-26 categories: - serverless From 56b8f971301793a8d024902bdc59ee103a48baff Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Tue, 25 Feb 2025 10:21:00 +0100 Subject: [PATCH 05/15] docs(srv): update --- pages/serverless-containers/how-to/deploy-container.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pages/serverless-containers/how-to/deploy-container.mdx b/pages/serverless-containers/how-to/deploy-container.mdx index 884ab38ebc..74ffddefe1 100644 --- a/pages/serverless-containers/how-to/deploy-container.mdx +++ b/pages/serverless-containers/how-to/deploy-container.mdx @@ -123,6 +123,9 @@ Private external container registries are currently not supported. - Sandbox v2 for shorter cold starts (recommended). - Sandbox v1 if you require full compatibility with the Linux system call interface (legacy). + + - Configure + - Modify the [ephemeral storage](/serverless-containers/concepts/#ephemeral-storage) according to your needs. From 62bb55e866daa58d5db872f990d919affd58ba9b Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Tue, 25 Feb 2025 12:05:57 +0100 Subject: [PATCH 06/15] docs(srv): update --- pages/serverless-containers/concepts.mdx | 6 +++--- .../serverless-containers/how-to/deploy-container.mdx | 11 ++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/pages/serverless-containers/concepts.mdx b/pages/serverless-containers/concepts.mdx index a7d71eea91..b8e264daae 100644 --- a/pages/serverless-containers/concepts.mdx +++ b/pages/serverless-containers/concepts.mdx @@ -89,11 +89,11 @@ 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 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/) [specific endpoint via the Scaleway API](https://www.scaleway.com/en/developers/api/serverless-containers/#path-containers-create-a-new-container). ## Instance diff --git a/pages/serverless-containers/how-to/deploy-container.mdx b/pages/serverless-containers/how-to/deploy-container.mdx index 74ffddefe1..8714b65e73 100644 --- a/pages/serverless-containers/how-to/deploy-container.mdx +++ b/pages/serverless-containers/how-to/deploy-container.mdx @@ -66,6 +66,12 @@ You can deploy a container from the [Scaleway Container Registry](/container-reg - Sandbox v2 for shorter cold starts (recommended). - Sandbox v1 if you require full compatibility with the Linux system call interface (legacy). + + - 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) + - Modify the [ephemeral storage](/serverless-containers/concepts/#ephemeral-storage) according to your needs. @@ -124,7 +130,10 @@ Private external container registries are currently not supported. - Sandbox v1 if you require full compatibility with the Linux system call interface (legacy). - - Configure + - 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) - Modify the [ephemeral storage](/serverless-containers/concepts/#ephemeral-storage) according to your needs. From 1c8da0df132d6d9945c494a1a8f7cf44be702d68 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Tue, 25 Feb 2025 14:29:11 +0100 Subject: [PATCH 07/15] docs(srv): update --- .../how-to/deploy-container.mdx | 4 +- .../how-to/manage-a-container.mdx | 96 +++++++++++++++---- 2 files changed, 78 insertions(+), 22 deletions(-) diff --git a/pages/serverless-containers/how-to/deploy-container.mdx b/pages/serverless-containers/how-to/deploy-container.mdx index 8714b65e73..4dc283fd5e 100644 --- a/pages/serverless-containers/how-to/deploy-container.mdx +++ b/pages/serverless-containers/how-to/deploy-container.mdx @@ -44,7 +44,7 @@ You can deploy a container from the [Scaleway Container Registry](/container-reg - **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: +6. In the **Advanced options** section, set the following: - 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. @@ -107,7 +107,7 @@ Private external container registries are currently not supported. - **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: +6. In the **Advanced options** section, set the following: - 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. diff --git a/pages/serverless-containers/how-to/manage-a-container.mdx b/pages/serverless-containers/how-to/manage-a-container.mdx index 3610373142..dbdb932882 100644 --- a/pages/serverless-containers/how-to/manage-a-container.mdx +++ b/pages/serverless-containers/how-to/manage-a-container.mdx @@ -28,34 +28,90 @@ This page shows you how to manage a container, should you need to verify or edit 1. Click **Containers** in the **Serverless** section of the side menu. The Containers page displays. 2. Click the relevant containers namespace. -3. Click the name of the container you want to manage. -4. Check or edit any of the following information as required, on the **Deployment** tab: +3. Click the name of the container you want to manage, then select the **Settings** tab. +4. In the **Container image** section: - Select the **Scaleway** Container Registry. - Choose an **image** from your Container Registry. Select the required Container Registry namespace from the drop-down list, and then select the container and tag. - - Choose the **Port** your container is listening on. We recommend configuring your container to listen on the **PORT** environment variable. - - Choose the **resources** to be allocated to your container at runtime. These define the performance characteristics of your container. - - Set your **scaling** preferences, or leave them at default values. The Scaleway platform autoscales the number of available instances of your container to match the incoming load, depending on the settings you define here. - - Define any **environment variables** you want to inject into your container. For each environment variable, click **+Add new variable** and enter the key/value pair. - - Add **secrets** for your container. Secrets are environment variables which are injected into your container, but the values are not retained or displayed by Scaleway after initial validation. - - Set the desired **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**). - - Click **Advanced Options** if you wish to set a custom timeout for your container. -5. Click **Deploy container** to save any changes you have made. + - Choose the [port](/serverless-containers/concepts/#port) your container is listening on. We recommend configuring your container to listen on the **PORT** environment variable. +5. In the **Resources** section, select the vCPU and memory to allocate to your container at runtime. These values define the performance characteristics of your container. +6. Set your [autoscaling](/serverless-containers/) 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. +7. In the **Advanced options** section, check or edit any of the following: + + + - 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. + + Encode your environment variables and secrets to `base64` if they are too large, and contain carriage returns. + + + + - 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. + + + - 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. + + + - 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). + + + - 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) + + + - Modify the [ephemeral storage](/serverless-containers/concepts/#ephemeral-storage) according to your needs. + + +8. Click **Deploy container** to save any changes you have made. ### Manage a deployment from an external container registry 1. Click **Containers** in the **Serverless** section of the side menu. The Containers page displays. 2. Click the relevant containers namespace. -3. Click the name of the container you want to manage. -4. Check or edit any of the following information as required, on the **Deployment** tab: +3. Click the name of the container you want to manage, then select the **Settings** tab. +4. In the **Container image** section: - Select the **External** container registry. - Enter the public container **image URL** provided by the external registry. - - Choose the **Port** your container is listening on. We recommend configuring your container to listen on the **PORT** environment variable. - - Choose the **resources** to be allocated to your container at runtime. These define the performance characteristics of your container. - - Set your **scaling** preferences, or leave them at default values. The Scaleway platform autoscales the number of available instances of your container to match the incoming load, depending on the settings you define here. - - Define any **environment variables** you want to inject into your container. For each environment variable, click **+Add new variable** and enter the key/value pair. - - Add **secrets** for your container. Secrets are environment variables which are injected into your container, but the values are not retained or displayed by Scaleway after initial validation. - - Set the desired **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**). - - Click **Advanced Options** if you wish to set a custom timeout for your container. -5. Click **Deploy container** to save any changes you have made. + - Choose the [port](/serverless-containers/concepts/#port) your container is listening on. We recommend configuring your container to listen on the **PORT** environment variable. +5. In the **Resources** section, select the vCPU and memory to allocate to your container at runtime. These values define the performance characteristics of your container. +6. Set your [autoscaling](/serverless-containers/) 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. +7. In the **Advanced options** section, check or edit any of the following: + + + - 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. + + Encode your environment variables and secrets to `base64` if they are too large, and contain carriage returns. + + + + - 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. + + + - 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. + + + - 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). + + + - 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) + + + - Modify the [ephemeral storage](/serverless-containers/concepts/#ephemeral-storage) according to your needs. + + +8. Click **Deploy container** to save any changes you have made. From ced56eab37bfdb81727e7f1f00b9994b2a6b6f0a Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Tue, 25 Feb 2025 15:17:00 +0100 Subject: [PATCH 08/15] docs(srv): update --- .../containers-autoscaling.mdx | 40 ++++++++++++++++--- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/pages/serverless-containers/reference-content/containers-autoscaling.mdx b/pages/serverless-containers/reference-content/containers-autoscaling.mdx index e7bed35ece..ea4734fc35 100644 --- a/pages/serverless-containers/reference-content/containers-autoscaling.mdx +++ b/pages/serverless-containers/reference-content/containers-autoscaling.mdx @@ -18,11 +18,19 @@ categories: [Autoscaling](/serverless-containers/concepts/#autoscaling) offers several benefits, including improved responsiveness and cost efficiency. By automatically adjusting the number of instances of your resource based on current demand, you ensure that your applications can handle varying loads without manual intervention. This not only enhances user experience by maintaining performance levels but also helps in reducing costs by only using resources when necessary. Additionally, autoscaling helps in optimal resource utilization, minimizing the risk of performance degradation during peak times. -## Minimum and maximum scales +Autoscaling can be based on exactly one of the following parameters: -### Minimum scale (min-scale) +- Request concurrency +- CPU percentage +- RAM percentage -This parameter sets the lowest value your resource is allowed to scale down to: +## Request concurrency + +### Minimum and maximum scales + +#### Minimum scale (min-scale) + +This parameter sets the minimum number of instances your resource is allowed to scale down to: - If you set a value of `0`, all instances of your resource will be terminated after 15 minutes of inactivity. @@ -30,7 +38,7 @@ This parameter sets the lowest value your resource is allowed to scale down to: Customizing the minimum scale for Serverless can help ensure that an instance remains pre-allocated and ready to handle requests, reducing delays associated with [cold starts](/serverless-containers/concepts/#cold-start). However, this setting also impacts the costs of your Serverless Container. -### Maximum scale (max-scale) +#### Maximum scale (max-scale) This parameter sets the maximum number of instances of your resource. You should adjust it based on your resource's traffic spikes, keeping in mind that you may wish to limit the max scale to manage costs effectively. @@ -51,4 +59,26 @@ The same autoscaler decides to remove instances when: Redeploying your resource results in the termination of existing instances and a return to the min scale, which you observe when redeploying. - \ No newline at end of file + + +## CPU and RAM percentage + +### Minimum and maximum scales + +#### Minimum scale (min-scale) + +This parameter sets the minimum number of instances your resource is allowed to scale down to. + + +For technical reasons, the minimum scale for CPU/RAM-based autoscaling is `1`. + + +#### Maximum scale (max-scale) + +This parameter sets the maximum number of instances of your resource. You should adjust it based on your resource's CPU or RAM usage spikes, keeping in mind that you may wish to limit the max scale to manage costs effectively. + +### Autoscaler behavior + +The autoscaler decides to start new instances when the existing instances' CPU or RAM usage exceeds the threshold you defined for a certain amount of time. + +The same autoscaler decides to remove existing instances when the CPU or RAM usage of certain instances is reduced, and the remaining instances' usage does not exceed the threshold. \ No newline at end of file From 710fdf98369edfe94cc4d08c2c26d8a549ddd266 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Tue, 25 Feb 2025 16:01:47 +0100 Subject: [PATCH 09/15] docs(srv): update --- .../reference-content/containers-autoscaling.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/serverless-containers/reference-content/containers-autoscaling.mdx b/pages/serverless-containers/reference-content/containers-autoscaling.mdx index ea4734fc35..61b617fd4c 100644 --- a/pages/serverless-containers/reference-content/containers-autoscaling.mdx +++ b/pages/serverless-containers/reference-content/containers-autoscaling.mdx @@ -58,7 +58,7 @@ The same autoscaler decides to remove instances when: - an instance has not responded to a request for more than 15 minutes of inactivity. The instance is only shut down after this interval, once again to absorb any potential new peaks and thus avoid the cold start. These 15 minutes of inactivity are not configurable. -Redeploying your resource results in the termination of existing instances and a return to the min scale, which you observe when redeploying. +Redeploying your resource results in the termination of existing instances and a return to the minimum scale. ## CPU and RAM percentage From 1b007c18e8d89caf616df85aa0effbc3a37c6ca2 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Tue, 25 Feb 2025 16:02:37 +0100 Subject: [PATCH 10/15] docs(srv): update --- pages/serverless-containers/how-to/deploy-container.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/serverless-containers/how-to/deploy-container.mdx b/pages/serverless-containers/how-to/deploy-container.mdx index 4dc283fd5e..73d4796741 100644 --- a/pages/serverless-containers/how-to/deploy-container.mdx +++ b/pages/serverless-containers/how-to/deploy-container.mdx @@ -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 From a9f25de609a18baa6dd156a99903fbd67663f44c Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Tue, 25 Feb 2025 18:01:13 +0100 Subject: [PATCH 11/15] docs(srv): update --- pages/serverless-containers/concepts.mdx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pages/serverless-containers/concepts.mdx b/pages/serverless-containers/concepts.mdx index b8e264daae..b60ca2da78 100644 --- a/pages/serverless-containers/concepts.mdx +++ b/pages/serverless-containers/concepts.mdx @@ -91,7 +91,13 @@ gRPC is supported on Serverless Containers, as long as you have enabled http2 (` ## Health check -To determine the status of a container, the default health check 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 health check rules via the [Scaleway console](/serverless-containers/how-to/manage-a-container/) [specific endpoint via the Scaleway API](https://www.scaleway.com/en/developers/api/serverless-containers/#path-containers-create-a-new-container). From 7c501ce7360c6532ed0fc7fdf1872ad2d1cefce1 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Wed, 26 Feb 2025 12:02:21 +0100 Subject: [PATCH 12/15] Update pages/serverless-containers/concepts.mdx Co-authored-by: Benedikt Rollik --- pages/serverless-containers/concepts.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/serverless-containers/concepts.mdx b/pages/serverless-containers/concepts.mdx index b60ca2da78..59ce8aa66b 100644 --- a/pages/serverless-containers/concepts.mdx +++ b/pages/serverless-containers/concepts.mdx @@ -94,7 +94,7 @@ gRPC is supported on Serverless Containers, as long as you have enabled http2 (` 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 **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`). From 845e9b1cae6afdcca18e1acdbdcae841d49fe8a9 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Wed, 26 Feb 2025 12:02:45 +0100 Subject: [PATCH 13/15] Update pages/serverless-containers/concepts.mdx Co-authored-by: Benedikt Rollik --- pages/serverless-containers/concepts.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/serverless-containers/concepts.mdx b/pages/serverless-containers/concepts.mdx index 59ce8aa66b..573b88ec5c 100644 --- a/pages/serverless-containers/concepts.mdx +++ b/pages/serverless-containers/concepts.mdx @@ -99,7 +99,7 @@ To determine the status of a container, the default health check automatically c - 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 health check rules via the [Scaleway console](/serverless-containers/how-to/manage-a-container/) [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 From 83f7907281d5d420430734cea2f4365ec3401317 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Wed, 26 Feb 2025 13:47:50 +0100 Subject: [PATCH 14/15] Update pages/serverless-containers/concepts.mdx Co-authored-by: Jessica <113192637+jcirinosclwy@users.noreply.github.com> --- pages/serverless-containers/concepts.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/serverless-containers/concepts.mdx b/pages/serverless-containers/concepts.mdx index 573b88ec5c..b8aaed1873 100644 --- a/pages/serverless-containers/concepts.mdx +++ b/pages/serverless-containers/concepts.mdx @@ -96,7 +96,7 @@ To determine the status of a container, the default health check automatically c - 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 **interval** corresponds to the duration in seconds between every check. 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 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). From b2967e50b5478e48b0941cb063a2416c6645b153 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Wed, 26 Feb 2025 13:47:59 +0100 Subject: [PATCH 15/15] Update pages/serverless-containers/concepts.mdx Co-authored-by: Jessica <113192637+jcirinosclwy@users.noreply.github.com> --- pages/serverless-containers/concepts.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/serverless-containers/concepts.mdx b/pages/serverless-containers/concepts.mdx index b8aaed1873..d663d24b12 100644 --- a/pages/serverless-containers/concepts.mdx +++ b/pages/serverless-containers/concepts.mdx @@ -94,7 +94,7 @@ gRPC is supported on Serverless Containers, as long as you have enabled http2 (` 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 **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 the 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 check. Defaults to 10 seconds. - The **path** (HTTP probe type only) corresponds to the endpoint to call you Serverless Container (example: `/health`).