Need advice about which tool to choose?Ask the StackShare community!

AWS Lambda

23.9K
18.6K
+ 1
432
Celery

1.6K
1.6K
+ 1
280
Add tool

AWS Lambda vs Celery: What are the differences?

Introduction

In this article, we will explore the key differences between AWS Lambda and Celery. Both AWS Lambda and Celery are popular technologies used for executing code in a distributed and scalable manner. However, they have some fundamental differences that set them apart from each other. Let's dive into the key differences.

  1. Scaling Methodology: AWS Lambda scales automatically based on the incoming request load. It allocates resources dynamically and ensures that each request is processed independently and in parallel. On the other hand, Celery provides manual scaling by allowing users to configure the number of workers and concurrent tasks. It requires the users to manage the scaling of workers based on the anticipated load.

  2. Event-Driven vs Task Queue: AWS Lambda is an event-driven computing service that allows developers to execute code in response to events like file uploads, database changes, or API calls. It focuses on executing specific functions in response to events, making it widely used in serverless architectures. Celery, on the other hand, is a distributed task queue that enables developers to queue and execute tasks asynchronously. It provides a broader scope for task management and coordination.

  3. Execution Environment: AWS Lambda provides a managed environment where users can write and execute functions using various programming languages supported by AWS. It takes care of provisioning and managing the infrastructure required to execute the functions. Celery, on the other hand, requires users to set up their execution environment, including message brokers like RabbitMQ or Redis, and worker processes. It gives users more control over the execution environment setup.

  4. Vendor Lock-in: AWS Lambda is a cloud service provided by Amazon Web Services (AWS) and is tightly integrated with other AWS services. Users may become vendor-locked when using Lambda as it requires utilizing the AWS ecosystem. On the other hand, Celery is an open-source technology that can be used with various message brokers and backends. It provides more flexibility and avoids vendor lock-in.

  5. Pricing Model: AWS Lambda follows a pay-as-you-go pricing model, where users are charged based on the number of requests and the amount of compute time used. It provides a detailed billing structure and automatic scalability based on demand. Celery, being an open-source technology, does not have any direct pricing associated with it. However, users need to consider the infrastructure costs for hosting the message broker and worker processes.

  6. Deployment and Management: AWS Lambda provides a seamless deployment experience as it is integrated with other AWS services like AWS CloudFormation or AWS Serverless Application Model (SAM). It simplifies the management of serverless applications and automates deployment. Celery, being a self-hosted technology, requires users to manage deployment and infrastructure on their own. It requires additional efforts for deployment and configuration management.

In summary, AWS Lambda and Celery differ in their scaling methodology, execution environment, event-driven vs task queue approach, vendor lock-in, pricing model, and deployment/management experience.

Advice on AWS Lambda and Celery
Needs advice
on
CeleryCelery
and
RabbitMQRabbitMQ

I am just a beginner at these two technologies.

Problem statement: I am getting lakh of users from the sequel server for whom I need to create caches in MongoDB by making different REST API requests.

Here these users can be treated as messages. Each REST API request is a task.

I am confused about whether I should go for RabbitMQ alone or Celery.

If I have to go with RabbitMQ, I prefer to use python with Pika module. But the challenge with Pika is, it is not thread-safe. So I am not finding a way to execute a lakh of API requests in parallel using multiple threads using Pika.

If I have to go with Celery, I don't know how I can achieve better scalability in executing these API requests in parallel.

See more
Replies (1)
Recommends
on
rqrqRedisRedis

For large amounts of small tasks and caches I have had good luck with Redis and RQ. I have not personally used celery but I am fairly sure it would scale well, and I have not used RabbitMQ for anything besides communication between services. If you prefer python my suggestions should feel comfortable.

Sorry I do not have a more information

See more
Decisions about AWS Lambda and Celery

When adding a new feature to Checkly rearchitecting some older piece, I tend to pick Heroku for rolling it out. But not always, because sometimes I pick AWS Lambda . The short story:

  • Developer Experience trumps everything.
  • AWS Lambda is cheap. Up to a limit though. This impact not only your wallet.
  • If you need geographic spread, AWS is lonely at the top.
The setup

Recently, I was doing a brainstorm at a startup here in Berlin on the future of their infrastructure. They were ready to move on from their initial, almost 100% Ec2 + Chef based setup. Everything was on the table. But we crossed out a lot quite quickly:

  • Pure, uncut, self hosted Kubernetes — way too much complexity
  • Managed Kubernetes in various flavors — still too much complexity
  • Zeit — Maybe, but no Docker support
  • Elastic Beanstalk — Maybe, bit old but does the job
  • Heroku
  • Lambda

It became clear a mix of PaaS and FaaS was the way to go. What a surprise! That is exactly what I use for Checkly! But when do you pick which model?

I chopped that question up into the following categories:

  • Developer Experience / DX 🤓
  • Ops Experience / OX 🐂 (?)
  • Cost 💵
  • Lock in 🔐

Read the full post linked below for all details

See more
Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of AWS Lambda
Pros of Celery
  • 129
    No infrastructure
  • 83
    Cheap
  • 70
    Quick
  • 59
    Stateless
  • 47
    No deploy, no server, great sleep
  • 12
    AWS Lambda went down taking many sites with it
  • 6
    Event Driven Governance
  • 6
    Extensive API
  • 6
    Auto scale and cost effective
  • 6
    Easy to deploy
  • 5
    VPC Support
  • 3
    Integrated with various AWS services
  • 99
    Task queue
  • 63
    Python integration
  • 40
    Django integration
  • 30
    Scheduled Task
  • 19
    Publish/subsribe
  • 8
    Various backend broker
  • 6
    Easy to use
  • 5
    Great community
  • 5
    Workflow
  • 4
    Free
  • 1
    Dynamic

Sign up to add or upvote prosMake informed product decisions

Cons of AWS Lambda
Cons of Celery
  • 7
    Cant execute ruby or go
  • 3
    Compute time limited
  • 1
    Can't execute PHP w/o significant effort
  • 4
    Sometimes loses tasks
  • 1
    Depends on broker

Sign up to add or upvote consMake informed product decisions

- No public GitHub repository available -

What is AWS Lambda?

AWS Lambda is a compute service that runs your code in response to events and automatically manages the underlying compute resources for you. You can use AWS Lambda to extend other AWS services with custom logic, or create your own back-end services that operate at AWS scale, performance, and security.

What is Celery?

Celery is an asynchronous task queue/job queue based on distributed message passing. It is focused on real-time operation, but supports scheduling as well.

Need advice about which tool to choose?Ask the StackShare community!

Jobs that mention AWS Lambda and Celery as a desired skillset
What companies use AWS Lambda?
What companies use Celery?
Manage your open source components, licenses, and vulnerabilities
Learn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with AWS Lambda?
What tools integrate with Celery?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

GitHubPythonNode.js+47
55
72666
GitHubDockerAmazon EC2+23
12
6598
JavaScriptGitHubPython+42
53
22082
GitHubPythonSlack+25
7
3205
What are some alternatives to AWS Lambda and Celery?
Serverless
Build applications comprised of microservices that run in response to events, auto-scale for you, and only charge you when they run. This lowers the total cost of maintaining your apps, enabling you to build more logic, faster. The Framework uses new event-driven compute services, like AWS Lambda, Google CloudFunctions, and more.
Azure Functions
Azure Functions is an event driven, compute-on-demand experience that extends the existing Azure application platform with capabilities to implement code triggered by events occurring in virtually any Azure or 3rd party service as well as on-premises systems.
AWS Elastic Beanstalk
Once you upload your application, Elastic Beanstalk automatically handles the deployment details of capacity provisioning, load balancing, auto-scaling, and application health monitoring.
AWS Step Functions
AWS Step Functions makes it easy to coordinate the components of distributed applications and microservices using visual workflows. Building applications from individual components that each perform a discrete function lets you scale and change applications quickly.
Google App Engine
Google has a reputation for highly reliable, high performance infrastructure. With App Engine you can take advantage of the 10 years of knowledge Google has in running massively scalable, performance driven systems. App Engine applications are easy to build, easy to maintain, and easy to scale as your traffic and data storage needs grow.
See all alternatives