NavigationContentFooter
Suggest an edit

Differences between Serverless Jobs, Containers and Functions

Reviewed on 03 July 2024Published on 13 November 2023

Differences between Functions, Containers, and Jobs

Considerations

  • 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.
  • 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.
  • 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.

Comparison table

CriteriaServerless FunctionsServerless ContainersServerless Jobs
Use caseEvent-driven functions responding to events or HTTP requestsStateless HTTP containers handling web services or APIsProcessing tasks that run to completion
ScalingAutomatically scales based on incoming eventsAutomatically scales based on incoming eventsManually specified number of job executions
Maximum execution timeUp to 15 minutes per requestUp to 15 minutes per request24 hours
ConcurrencySingle request per instanceConfigurable concurrency per instanceNot applicable
Pricing modelPay based on execution time and invocationsPay based on vCPU and memory usagePay based on vCPU and memory usage
TriggersHTTP requests, scheduled (CRONs), messaging events (NATS, SQS, SNS)HTTP requests, scheduled (CRONs), messaging events (NATS, SQS, SNS)Manual invocation or scheduled
Language supportNode, PHP, Python, Go, RustAny language/runtime within a containerAny language/runtime within a container
Infrastructure managementFully managed, handles provisioning and scaling automaticallyFully managed, handles provisioning and scaling automaticallyFully managed, abstracts away infrastructure management
Cold-startsThere may be startup latency on new instancesThere may be startup latency on new instancesNot applicable (jobs starts when scheduled or invoked)
Supports custom containersNo, deploy code in supported languages onlyYes, deploy any containerized applicationYes, deploy any containerized application
Long-running processesNot suitable for long running tasksNot suitable for long running tasksIdeal for long running processes
NetworkingNo VPC support at the momentNo VPC support at the momentNo VPC support at the moment
Secret manager integrationOnly via local secretsOnly via local secretsYes
Customisable ephemeral storageYesYesYes
Scaling from and to zeroYesYesNot 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.

Choose Scaleway Serverless Jobs:

  • For long-running tasks and resource-intensive applications.
  • To handle numerous jobs concurrently.
  • If you do not need to expose your service on a port.
  • For asynchronous processing.
Note

To run as a Serverless Job, your applications must be containerized, which offers you a lot of choice when configuring your runtime environments.

Serverless Functions

Choose Scaleway Serverless Functions:

  • For stateless and short-lived workloads (< 15 minutes).
  • For event-driven tasks.
  • For optimum performance in lightweight scenarios.
  • For autoscaling applications.
  • For web-facing applications and web servers.
Note

Serverless Functions can only be written in languages available as runtimes.

Serverless Containers

Choose Scaleway Serverless Containers:

  • For stateless, short-lived applications (< 15 minutes).
  • For event-driven tasks.
  • If your programming language is not supported as a Serverless Function runtime.
  • For autoscaling workloads.
Note

To run as a Serverless Container, your application must be containerized, giving you a lot of flexibility to configure your runtime environments.

Was this page helpful?
API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2024 – Scaleway