Need advice about which tool to choose?Ask the StackShare community!
AWS Lambda vs Airflow: What are the differences?
AWS Lambda and Airflow are both popular tools for managing and executing workflows in the cloud. Let's explore the key differences between them.
Deployment Model: AWS Lambda is a serverless computing service provided by Amazon Web Services. It allows you to upload your code and automatically run it in response to events. On the other hand, Apache Airflow is an open-source platform that allows you to programmatically author, schedule, and monitor workflows. It provides a more flexible and scalable deployment model compared to Lambda.
Language Support: AWS Lambda supports a variety of programming languages such as Node.js, Python, Java, and C#. It provides built-in runtime environments for each supported language. In contrast, Apache Airflow is primarily written in Python and supports Python-based workflows. While it can execute code written in other languages, it requires additional configuration and dependencies.
Event-Based vs Time-Based Triggers: AWS Lambda is designed to respond to events such as changes to data in an S3 bucket or a new message in an Amazon SQS queue. It allows you to set up event-based triggers to execute your code when specific events occur. On the other hand, Apache Airflow provides time-based triggers that allow you to schedule your workflows to run at specific times or intervals. It provides more control over when your workflows are executed.
Execution Environment: AWS Lambda manages the execution environment for your code. It provisions the necessary computing resources and scales automatically based on the incoming workload. This allows you to focus on writing your code without worrying about infrastructure. In contrast, Apache Airflow requires you to set up and manage your own execution environment, whether it's on-premises or in the cloud. This gives you more control over the resources and configuration of your environment.
Data Processing and Transformation: AWS Lambda is well-suited for small, event-driven tasks such as data processing and transformation. It allows you to write short-lived functions that can process a single event at a time. On the other hand, Apache Airflow is designed to handle complex, data-intensive workflows. It provides a rich set of operators and tools for data processing, transformation, and orchestration. It is more suitable for workflows that involve multiple steps and dependencies.
Scalability and Cost: AWS Lambda automatically scales your functions based on incoming workload, allowing you to handle high traffic efficiently. You only pay for the compute time that your functions consume, which can be cost-effective for sporadic workloads. In contrast, Apache Airflow requires you to provision and manage the necessary computing resources, which can be more expensive and less scalable for large workloads.
In summary, AWS Lambda is a serverless compute service ideal for executing event-driven tasks at scale, while Airflow is a workflow management platform designed for orchestrating complex workflows as directed acyclic graphs (DAGs). Lambda excels at event-driven, serverless computing, while Airflow provides more flexibility and control for managing and orchestrating complex workflows.
Need advice on what platform, systems and tools to use.
Evaluating whether to start a new digital business for which we will need to build a website that handles all traffic. Website only right now. May add smartphone apps later. No desktop app will ever be added. Website to serve various countries and languages. B2B and B2C type customers. Need to handle heavy traffic, be low cost, and scale well.
We are open to either build it on AWS or on Microsoft Azure.
Apologies if I'm leaving out some info. My first post. :) Thanks in advance!
I recommend this : -Spring reactive for back end : the fact it's reactive (async) it consumes half of the resources that a sync platform needs (so less CPU -> less money). -Angular : Web Front end ; it's gives you the possibility to use PWA which is a cheap replacement for a mobile app (but more less popular). -Docker images. -Kubernetes to orchestrate all the containers. -I Use Jenkins / blueocean, ansible for my CI/CD (with Github of course) -AWS of course : u can run a K8S cluster there, make it multi AZ (availability zones) to be highly available, use a load balancer and an auto scaler and ur good to go. -You can store data by taking any managed DB or u can deploy ur own (cheap but risky).
You pay less money, but u need some technical 2 - 3 guys to make that done.
Good luck
My advice will be Front end: React Backend: Language: Java, Kotlin. Database: SQL: Postgres, MySQL, Aurora NOSQL: Mongo db. Caching: Redis. Public : Spring Webflux for async public facing operation. Admin api: Spring boot, Hibrernate, Rest API. Build Container image. Kuberenetes: AWS EKS, AWS ECS, Google GKE. Use Jenkins for CI/CD pipeline. Buddy works is good for AWS. Static content: Host on AWS S3 bucket, Use Cloudfront or Cloudflare as CDN.
Serverless Solution: Api gateway Lambda, Serveless Aurora (SQL). AWS S3 bucket.
I am so confused. I need a tool that will allow me to go to about 10 different URLs to get a list of objects. Those object lists will be hundreds or thousands in length. I then need to get detailed data lists about each object. Those detailed data lists can have hundreds of elements that could be map/reduced somehow. My batch process dies sometimes halfway through which means hours of processing gone, i.e. time wasted. I need something like a directed graph that will keep results of successful data collection and allow me either pragmatically or manually to retry the failed ones some way (0 - forever) times. I want it to then process all the ones that have succeeded or been effectively ignored and load the data store with the aggregation of some couple thousand data-points. I know hitting this many endpoints is not a good practice but I can't put collectors on all the endpoints or anything like that. It is pretty much the only way to get the data.
For a non-streaming approach:
You could consider using more checkpoints throughout your spark jobs. Furthermore, you could consider separating your workload into multiple jobs with an intermittent data store (suggesting cassandra or you may choose based on your choice and availability) to store results , perform aggregations and store results of those.
Spark Job 1 - Fetch Data From 10 URLs and store data and metadata in a data store (cassandra) Spark Job 2..n - Check data store for unprocessed items and continue the aggregation
Alternatively for a streaming approach: Treating your data as stream might be useful also. Spark Streaming allows you to utilize a checkpoint interval - https://spark.apache.org/docs/latest/streaming-programming-guide.html#checkpointing
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.
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
Pros of Airflow
- Features53
- Task Dependency Management14
- Beautiful UI12
- Cluster of workers12
- Extensibility10
- Open source6
- Complex workflows5
- Python5
- Good api3
- Apache project3
- Custom operators3
- Dashboard2
Pros of AWS Lambda
- No infrastructure129
- Cheap83
- Quick70
- Stateless59
- No deploy, no server, great sleep47
- AWS Lambda went down taking many sites with it12
- Event Driven Governance6
- Extensive API6
- Auto scale and cost effective6
- Easy to deploy6
- VPC Support5
- Integrated with various AWS services3
Sign up to add or upvote prosMake informed product decisions
Cons of Airflow
- Observability is not great when the DAGs exceed 2502
- Running it on kubernetes cluster relatively complex2
- Open source - provides minimum or no support2
- Logical separation of DAGs is not straight forward1
Cons of AWS Lambda
- Cant execute ruby or go7
- Compute time limited3
- Can't execute PHP w/o significant effort1