Skip to content

Commit 3a65552

Browse files
thomas-tacquetjcirinosclwyRoRoJ
authored
feat(serverless): add comparaison table (#4031)
* feat(serverless): add comparaison table * Apply suggestions from code review Co-authored-by: Jessica <[email protected]> Co-authored-by: Rowena Jones <[email protected]> * Update macros/serverless/difference-jobs-functions-containers.mdx --------- Co-authored-by: Jessica <[email protected]> Co-authored-by: Rowena Jones <[email protected]>
1 parent 351dc6c commit 3a65552

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

macros/serverless/difference-jobs-functions-containers.mdx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,34 @@ macro: difference-jobs-functions-containers
44

55
## Differences between Functions, Containers, and Jobs
66

7+
### Considerations
8+
9+
* **Serverless Containers** offers more flexibility by allowing you to deploy any containerized application. It is suitable for stateless services and can handle more complex applications with configurable concurrency and no maximum execution time.
10+
* **Serverless Functions** is ideal for lightweight, event-driven code where you do not manage the underlying infrastructure. It is limited to specific languages and not suitable for long-running processes.
11+
* **Serverless Jobs** is designed for executing batch jobs or tasks that need to run to completion. It is ideal for data processing tasks, migrations, or any workload that does not fit the request-response model.
12+
13+
### Comparison table
14+
15+
| **Criteria** | **Serverless Functions** | **Serverless Containers** | **Serverless Jobs** |
16+
|------------------------------------|---------------------------------------------------------------------|---------------------------------------------------------------------|---------------------------------------------------------|
17+
| **Use case** | Event-driven functions responding to events or HTTP requests | Stateless HTTP containers handling web services or APIs | Processing tasks that run to completion |
18+
| **Scaling** | Automatically scales based on incoming events | Automatically scales based on incoming events | Manually specified number of job executions |
19+
| **Maximum execution time** | Up to 15 minutes per request | Up to 15 minutes per request | 24 hours |
20+
| **Concurrency** | Single request per instance | Configurable concurrency per instance | Not applicable |
21+
| **Pricing model** | Pay based on execution time and invocations | Pay based on vCPU and memory usage | Pay based on vCPU and memory usage |
22+
| **Triggers** | HTTP requests, scheduled (CRONs), messaging events (NATS, SQS, SNS) | HTTP requests, scheduled (CRONs), messaging events (NATS, SQS, SNS) | Manual invocation or scheduled |
23+
| **Language support** | Node, PHP, Python, Go, Rust | Any language/runtime within a container | Any language/runtime within a container |
24+
| **Infrastructure management** | Fully managed, handles provisioning and scaling automatically | Fully managed, handles provisioning and scaling automatically | Fully managed, abstracts away infrastructure management |
25+
| **Cold-starts** | There may be startup latency on new instances | There may be startup latency on new instances | Not applicable (jobs starts when scheduled or invoked) |
26+
| **Supports custom containers** | No, deploy code in supported languages only | Yes, deploy any containerized application | Yes, deploy any containerized application |
27+
| **Long-running processes** | Not suitable for long running tasks | Not suitable for long running tasks | Ideal for long running processes |
28+
| **Networking** | No VPC support at the moment | No VPC support at the moment | No VPC support at the moment |
29+
| **Secret manager integration** | Only via local secrets | Only via local secrets | Yes |
30+
| **Customisable ephemeral storage** | Yes | Yes | Yes |
31+
| **Scaling from and to zero** | Yes | Yes | Not applicable |
32+
33+
## Details
34+
735
### Serverless Jobs
836

937
Serverless Jobs are designed for batch computing workloads, particularly large-scale and asynchronous tasks, like data processing, image rendering, or complex computations.

0 commit comments

Comments
 (0)