Are we thinking about orchestrators the wrong way? #3889
Replies: 3 comments 5 replies
-
That's a really interesting idea, @astrojuanlu. I agree that separating orchestration from execution is a very good practice, and moving towards a microservices architecture would be a great step forward. Does that mean the Kedro Server should be responsible for resource allocation? As I understand it, when Airflow runs on Kubernetes, it creates one Pod per task, and then Kubernetes is responsible for providing resources for all those Pods. In this context, the Kedro Server would need to always be running to be ready to respond, just like an Airflow scheduler. However, additional resources are only needed when executing tasks. |
Beta Was this translation helpful? Give feedback.
-
Would love to know @sbrugman thoughts on this given that you're heavy users of |
Beta Was this translation helpful? Give feedback.
-
We're migrating our batch workfloads to an organization-wide Airflow offer. Here is some main desing decisions for our DS/ML batch workloads:
The Kedro-Server proposition is interesting, it would however put a lot of burden into the application, as it should take care of a lot of things; The API would be a sort of a Gateway to a complex backend that do tasks queuing, resources managements, loggins managements, and more ... With a shared observability between the API and Airflow. If we push the idea further, we coud even embed a lighweight scheduler inside that API, and end up with an orchestration framework. This could eliminate the need of any orchestration platform. At least of some simple orchestations ... |
Beta Was this translation helpful? Give feedback.
-
Let's talk about Airflow. How do people use it in the wild?
exhibit 1:
exhibit 2:
exhibit 3
📜
To unpack all this or try to explain it in my own words, if you run the Airflow control plane in the same process/machine as your data processing code, you risk killing Airflow because of a task gone rogue. This is more or less obvious in hindsight, but I've seen products make this mistake and it was extremely painful.
So then people realise that Airflow (or your orchestrator of choice) actually needs to live separately from the tasks, and coordinate those using some sort of queue like Celery, or use something like Kubernetes.
...at which point, why should Airflow take care of all that at all? Just make the tasks call an API, and design the backend of that API in any way you want.
🔮
Long story short: what if we should actually focus1 on making serving Kedro pipelines as a web application flawless, and make orchestrators (including, but not limited to, Airflow) just call the corresponding REST API?2
(diagram courtesy of @datajoely)
Footnotes
"Focus" as in: among all the possible things we could be doing, and given time and resource constraints, what things do we say "yes" to at the cost of saying "no" to others? ↩
This might not apply to some platforms that are very idiosyncratic like Databricks ↩
Beta Was this translation helpful? Give feedback.
All reactions