Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(serverless): add comparaison table #4031

Merged
merged 3 commits into from
Nov 26, 2024
Merged
Changes from 1 commit
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
28 changes: 28 additions & 0 deletions macros/serverless/difference-jobs-functions-containers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,34 @@ macro: difference-jobs-functions-containers

## Differences between Functions, Containers, and Jobs

### Considerations

* **Serverless Containers** offers more flexibility by allowing you to deploy any containerized application. It's suitable for stateless services and can handle more complex applications with configurable concurrency and no maximum execution time.
thomas-tacquet marked this conversation as resolved.
Show resolved Hide resolved
* **Serverless Functions** is ideal for lightweight, event-driven code where you don't manage the underlying infrastructure. It's limited to specific languages and is not suitable for long-running processes.
thomas-tacquet marked this conversation as resolved.
Show resolved Hide resolved
* **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 doesn't fit the request-response model.
thomas-tacquet marked this conversation as resolved.
Show resolved Hide resolved

### Comparaison table
thomas-tacquet marked this conversation as resolved.
Show resolved Hide resolved

| **Criteria** | **Serverless Functions** | **Serverless Containers** | **Serverless Jobs** |
|------------------------------------|---------------------------------------------------------------------|---------------------------------------------------------------------|---------------------------------------------------------|
| **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 |
| **Scaling** | Automatically scales based on incoming events | Automatically scales based on incoming events | Manually specified number of job executions |
| **Maximun execution time** | Up to 15 minutes per request | Up to 15 minutes per request | 24 hours |
thomas-tacquet marked this conversation as resolved.
Show resolved Hide resolved
| **Concurrency** | Single request per instance | Configurable concurrency per instance | Not applicable |
| **Pricing model** | Pay per exeuction time and invocations | Pay per vCPU and memory usage | Pay per vCPU and memory usage |
thomas-tacquet marked this conversation as resolved.
Show resolved Hide resolved
RoRoJ marked this conversation as resolved.
Show resolved Hide resolved
| **Triggers** | HTTP requests, scheduled (CRONs), messaging events (NATS, SQS, SNS) | HTTP requests, scheduled (CRONs), messaging events (NATS, SQS, SNS) | Manual invocation or scheduled |
| **Language support** | Node, PHP, Python, Go, Rust | Any language/runtime within a container | Any language/runtime within a container |
| **Infrastructure management** | Fully managed, handles provisionning and scaling automatically | Fully managed, handles provisionning and scaling automatically | Fully managed, abstracts away infrastructure management |
thomas-tacquet marked this conversation as resolved.
Show resolved Hide resolved
| **Cold-starts** | Can have startup latency on new instances | Can have startup latency on new instances | No applicable (jobs starts when scheduled or invoked) |
RoRoJ marked this conversation as resolved.
Show resolved Hide resolved
thomas-tacquet marked this conversation as resolved.
Show resolved Hide resolved
| **Supports custom containers** | No, deploy code in supported languages only | Yes, deploy any containerized application | Yes, deploy any containerized application |
| **Long-running Processes** | Not suitable for long running tasks | Not suitable for long running tasks | Ideal for long running processes |
thomas-tacquet marked this conversation as resolved.
Show resolved Hide resolved
| **Networking** | No VPC support at the moment | No VPC support at the moment | No VPC support at the moment |
| **Secret manager integration** | Only via local secrets | Only via local secrets | Yes |
| **Customisable ephemeral storage** | Yes | Yes | Yes |
| **Scaling from and to zero** | Yes | Yes | Not applicable |

## Details

### Serverless Jobs

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