Skip to content

Commit 138c221

Browse files
feat(serverless): update concepts
1 parent ee1b160 commit 138c221

File tree

3 files changed

+123
-20
lines changed

3 files changed

+123
-20
lines changed

serverless/containers/concepts.mdx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Container Registry is the place where your images are stored before being deploy
4343

4444
## CRON trigger
4545

46-
A CRON trigger is a mechanism used to automatically invoke a Serverless Function at a specific time on a recurring schedule.
46+
A CRON trigger is a mechanism used to automatically invoke a Serverless Container at a specific time on a recurring schedule.
4747

4848
It works similarly to a traditional Linux [cron job](https://en.wikipedia.org/wiki/Cron), using the `* * * * *` format, and uses the **UTC** time zone. Refer to our [cron schedules reference](/serverless/containers/reference-content/cron-schedules/) for more information.
4949

@@ -95,10 +95,18 @@ JWT (JSON Web Token) is an access token you can create from the console or API t
9595

9696
The Serverless infrastructure manages incoming request traffic. In scenarios like sudden traffic spikes or load testing, resources are automatically scaled based on the max scale parameter to handle the load.
9797

98+
## Logging
99+
100+
Serverless offers a built-in logging system based on cockpit to follow the activity of your ressources: [monitoring Serverless Containers](/serverless/containers/how-to/monitor-container/).
101+
98102
## Max scale
99103

100104
This parameter sets the maximum number of container instances. You should adjust it based on your container's traffic spikes, keeping in mind that you may wish to limit the max scale to manage costs effectively.
101105

106+
## Metrics
107+
108+
Performances of your Serverless ressources are natively available: [monitoring Serverless Containers](/serverless/containers/how-to/monitor-container/).
109+
102110
## Min scale
103111

104112
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. However, this setting also impacts the costs of your Serverless Container.
@@ -160,6 +168,12 @@ Serverless allows you to deploy your Functions (FaaS) and Containerized Applicat
160168

161169
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.
162170

171+
## Serverless Function
172+
173+
A Serverless Function are serverless, fully managed compute services that allow you to run small, stateless code snippets or functions in response to HTTP requests or events.
174+
175+
These functions automatically scale based on demand and are designed to be lightweight, event-driven, and easily deployable without worrying about infrastructure management. Functions is built on top of Serverless Containers, meaning you can run your functions packaged in containers and have them scale efficiently.
176+
163177
## Serverless Job
164178

165179
Serverless Jobs are similar to Serverless Containers but are better suited for running longer workloads. See [the comparaison between Serverless products](/serverless/containers/reference-content/difference-jobs-functions-containers) for more information.
@@ -184,6 +198,14 @@ A Serverless Container can have the following statuses:
184198
* **Pending**: your resource is under deployment.
185199
* **Error**: something went wrong during the deployment process. [Check our troubleshooting documentation](/serverless/containers/troubleshooting/cannot-deploy-image) to solve the issue.
186200

201+
## Stateless
202+
203+
Refers to a system or application that does not maintain any persistent state between executions. In a stateless environment, each request or operation is independent, and no information is retained from previous interactions.
204+
205+
This means that each request is treated as a new and isolated event, and there is no need for the system to remember previous states or data once a task is completed. Statelessness is commonly used in serverless architectures where each function execution is independent of others.
206+
207+
To store informations you can use [Scaleway Object Storage](/storage/object/), [Scaleway Managed Databases](/managed-databases/postgresql-and-mysql/), [Scaleway Serverless Databases](/serverless/sql-databases/).
208+
187209
## Terraform
188210

189211
Terraform is a tool for managing infrastructure using code. [Read the Terraform documentation for Serverless Containers](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/container).

serverless/functions/concepts.mdx

Lines changed: 73 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ categories:
1212
- serverless
1313
---
1414

15+
## Build step
16+
17+
Before deploying a Serverless Functions it has to be built, this step occurs on deployment.
18+
19+
Once the Function is built into an image, it will be pushed to [Container Registry](#container-registry)
20+
1521
## Cold Start
1622

1723
Cold Start is the time a function takes to handle a request when it is called for the first time.
@@ -23,33 +29,67 @@ Startup process steps are:
2329

2430
[How to reduce cold starts](/faq/serverless-functions/#how-to-reduce-cold-start-of-serverless-functions)
2531

32+
## Container Registry
33+
34+
Container Registry is the place where your images of your Serverless Functions are stored before being deployed.
35+
2636
## CRON trigger
2737

2838
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](https://en.wikipedia.org/wiki/Cron), using the `* * * * *` format, and uses the **UTC** time zone. Refer to our [cron schedules reference](/serverless/functions/reference-content/cron-schedules/) for more information.
2939

30-
## Environment variables
40+
## Custom domain
41+
42+
By default, a generated endpoint is assigned to your Serverless resource. Custom domains allows you to use your own domain - see our [custom domain documentation](/serverless/functions/how-to/add-a-custom-domain-to-a-function) for full details.
3143

32-
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.
44+
## Endpoint
3345

34-
## Function
46+
An endpoint is the URL generated to access your resource. It can be customized with [custom domains](#custom-domain).
3547

36-
A function defines a procedure on how to change one element into another. The function remains static, while the variables that pass through it can vary.
48+
## Environment variables
49+
50+
Environment variables are key/value pairs injected in your container. They are useful to share information such as configurations with your container. Some names are reserved. [See details about reserved names](/serverless/functions/reference-content/functions-limitations/#configuration-restrictions).
3751

3852
## GB-s
3953

40-
Unit used to measure the resource consumption of a function. It reflects the amount of memory consumed over time.
54+
Unit used to measure the resource consumption of a Function. It reflects the amount of memory consumed over time.
4155

4256
## JWT Token
4357

44-
A JWT (JSON Web Token) is an access token you can create from the console or the API to enable an application to access your Private function.
58+
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. [Find out how to secure a Function](/serverless/functions/how-to/secure-a-function/#restrict-access-to-your-functions).
4559

4660
## Handler
4761

4862
A handler is a routine/function/method that processes specific events. Upon invoking your function, the handler is executed and returns an output. Refer to our [dedicated documentation](/serverless/functions/reference-content/functions-handlers/) for more information on the structure of a handler.
4963

64+
## Instance
65+
66+
A Serverless Function instance handles incoming requests based on factors like the request volume, min scale, and max scale parameters.
67+
68+
## Load balancing
69+
70+
The Serverless infrastructure manages incoming request traffic. In scenarios like sudden traffic spikes or load testing, resources are automatically scaled based on the max scale parameter to handle the load.
71+
72+
## Logging
73+
74+
Serverless offers a built-in logging system based on cockpit to follow the activity of your ressources: [monitoring Serverless Functions](/serverless/functions/how-to/monitor-function/).
75+
76+
## Max scale
77+
78+
This parameter sets the maximum number of function instances. You should adjust it based on your function's traffic spikes, keeping in mind that you may wish to limit the max scale to manage costs effectively.
79+
80+
## Metrics
81+
82+
Performances of your Serverless ressources are natively available: [monitoring Serverless Functions](/serverless/functions/how-to/monitor-function/)).
83+
84+
## Min scale
85+
86+
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. However, this setting also impacts the costs of your Serverless Function.
87+
5088
## Namespace
5189

52-
A namespace is a project that allows you to [group your functions](/serverless/functions/how-to/create-manage-delete-functions-namespace/). Functions in the same namespace can share environment variables and access tokens, defined at the namespace level.
90+
A namespace is a project that allows you to [group your functions](/serverless/functions/how-to/create-manage-delete-functions-namespace/).
91+
92+
Functions in the same namespace can share environment variables and access tokens, defined at the namespace level.
5393

5494
## NATS trigger
5595

@@ -62,6 +102,13 @@ The function can then process the message and perform any required actions, such
62102

63103
A function's privacy policy defines whether a function may be executed anonymously (**public**) or only via an authentication mechanism provided by the [Scaleway API](https://www.scaleway.com/en/developers/api/serverless-functions/#authentication) (**private**).
64104

105+
## Queue trigger
106+
107+
A queue trigger is a mechanism that connects a function to a queue created with [Scaleway Queues](/serverless/messaging/concepts/#queues), and invokes the function automatically whenever a message is added to the queue.
108+
109+
For each message that is sent to a queue, the trigger reads the message and invokes the associated function with the message as the input parameter.
110+
The function can then process the message and perform any required actions, such as updating a database or sending a notification.
111+
65112
## Runtime
66113

67114
The runtime is the execution environment of your function. Regarding Serverless Function, it consists of the languages in which your code is written.
@@ -92,20 +139,31 @@ Serverless allows you to deploy your Functions (FaaS) and Containerized Applicat
92139

93140
Serverless.com (Serverless Framework) is a tool that enables the deployment of serverless applications without having to manage Serverless Function's API call. Just write your configuration in a YAML and deploy, it handles everything.
94141

95-
## Serverless Functions
142+
## Serverless Function
96143

97-
Serverless Functions simplify deploying applications to the Cloud. They only require you to install a piece of business logic, a “function”, on any cloud platform, which executes it on demand. This allows you to focus on backend code without provisioning or maintaining servers.
144+
A Serverless Function are serverless, fully managed compute services that allow you to run small, stateless code snippets or functions in response to HTTP requests or events.
98145

99-
The platform also handles function availability and manages resource allocation for you. For instance, if the system needs to accommodate 100 simultaneous requests, it allocates 100 (or more) copies of your service. If demand drops to two concurrent requests, it destroys the unneeded ones.
146+
These functions automatically scale based on demand and are designed to be lightweight, event-driven, and easily deployable without worrying about infrastructure management. Functions is built on top of Serverless Containers, meaning you can run your functions packaged in containers and have them scale efficiently.
100147

101-
You pay for the resources your functions use, and only when your functions need them.
148+
## Serverless Job
102149

103-
## Queue trigger
150+
Serverless Jobs are similar to Serverless Functions but are better suited for running longer workloads. See [the comparaison between Serverless products](/serverless/functions/reference-content/difference-jobs-functions-containers) for more information.
104151

105-
A queue trigger is a mechanism that connects a function to a queue created with [Scaleway Queues](/serverless/messaging/concepts/#queues), and invokes the function automatically whenever a message is added to the queue.
152+
## Stateless
153+
154+
Refers to a system or application that does not maintain any persistent state between executions. In a stateless environment, each request or operation is independent, and no information is retained from previous interactions.
155+
156+
This means that each request is treated as a new and isolated event, and there is no need for the system to remember previous states or data once a task is completed. Statelessness is commonly used in serverless architectures where each function execution is independent of others.
157+
158+
To store informations you can use [Scaleway Object Storage](/storage/object/), [Scaleway Managed Databases](/managed-databases/postgresql-and-mysql/), [Scaleway Serverless Databases](/serverless/sql-databases/).
159+
160+
## Status
161+
162+
A Serverless Function can have the following statuses:
163+
* **Ready**: your Serverless Function is operational to serve requests.
164+
* **Pending**: your resource is under deployment.
165+
* **Error**: something went wrong during the deployment process or build of the source code to image. [Check our troubleshooting documentation](/serverless/functions/troubleshooting/function-in-error-state/) to solve the issue.
106166

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

110168
## Timeout
111169

serverless/jobs/concepts.mdx

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ categories:
1212
- serverless
1313
---
1414

15-
## Container image
15+
## Container Registry
1616

17-
A container image is a file that includes all the requirements and instructions of a complete and executable version of an application.
18-
When running a job, the selected image will be pulled to execute your workload. Images can come from public external registries or from the [Scaleway Container Registry](/containers/container-registry/concepts/#container-registry).
17+
Container Registry is the place where your images are stored before being deployed, we recommend using Scaleway Container Registry for optimal integration. [Migration guide](/serverless/containers/api-cli/migrate-external-image-to-scaleway-registry/).
1918

2019
## Environment variables
2120

@@ -45,22 +44,46 @@ The name of a job is part of the [job definition](#job-definition) and is used f
4544

4645
A job run is the execution of a job definition. It can be in a running, succeeded, canceled, or failed status. Each job run has a unique identifier and can be individually monitored using [Cockpit](/observability/cockpit/quickstart/).
4746

47+
## Logging
48+
49+
Serverless offers a built-in logging system based on cockpit to follow the activity of your ressources: [monitoring Serverless Jobs](/serverless/jobs/how-to/monitor-job/).
50+
4851
## Maximum duration
4952

5053
The maximum duration option allows you to define the maximum execution time before your job is automatically killed.
5154

55+
## Metrics
56+
57+
Performances of your Serverless ressources are natively available: [monitoring Serverless Jobs](/serverless/jobs/how-to/monitor-job/).
58+
5259
## Schedule (cron)
5360

5461
A schedule (cron) is a mechanism used to automatically start a Serverless Job at a specific time on a recurring schedule. It works similarly to a traditional Linux cron job, using the `* * * * *` format. Refer to our [cron schedules reference](/serverless/jobs/reference-content/cron-schedules/) for more information.
5562

5663
## Secrets reference
5764

58-
A secret reference is a mechanism that allows you to use a secret stored in [Secret Manager](/identity-and-access-management/secret-manager/) within Serverless Jobs. It allows you to securely reference sensitive data, such as API secret keys, passwords, tokens, or certificates.
65+
A secret reference is a mechanism that allows you to use a secret stored in [Secret Manager](/identity-and-access-management/secret-manager/) within Serverless Jobs. It allows you to securely reference sensitive data, such as API secret keys, passwords, tokens, or certificates.
5966

6067
## Startup command
6168

6269
This optional field allows you to specify a custom command executed upon starting your job if your container image does not have one already, or if you use a public container image.
6370

71+
## Status
72+
73+
A Serverless Job Run can have the following statuses:
74+
* **Succeeded**: your Serverless Job Run finished in a good state.
75+
* **Queued**: your Serverless Job Run is waiting for ressources to run.
76+
* **Error**: your Serverless Job Run finished with an error or timeout. [Check our troubleshooting documentation](/serverless/jobs/troubleshooting/job-in-error-state/) to solve the issue.
77+
* **Canceled**: your Serverless Job Run has been canceled by the user.
78+
79+
## Stateless
80+
81+
Refers to a system or application that does not maintain any persistent state between executions. In a stateless environment, each request or operation is independent, and no information is retained from previous interactions.
82+
83+
This means that each request is treated as a new and isolated event, and there is no need for the system to remember previous states or data once a task is completed. Statelessness is commonly used in serverless architectures where each function execution is independent of others.
84+
85+
To store informations you can use [Scaleway Object Storage](/storage/object/), [Scaleway Managed Databases](/managed-databases/postgresql-and-mysql/), [Scaleway Serverless Databases](/serverless/sql-databases/).
86+
6487
## vCPU-s
6588

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

0 commit comments

Comments
 (0)