Replies: 2 comments 7 replies
-
Thanks @steebchen! Yes I've been thinking about this too. To address your throughts: Does each step invoke a new HTTP request? Assuming yes.
The liveness of the serverless worker could be determined if there are more than X failed requests in the last X seconds/minutes
Initially only TS SDK is supported as that's the most common serverless language
Caveats
Yes, I think we break this up into two steps:
We'd also need to think about registering this route with Hatchet and auth (probably signing and verifying the request). |
Beta Was this translation helpful? Give feedback.
-
@steebchen I like this proposal and would love to prioritize this. It does seem rather simple to add a webhook controller after assigning a step run to a serverless worker, but I think the biggest problem is registration:
There are a lot of similarities to running a database migration, so perhaps we provide a function which registers workflows and a serverless worker that gets run in the same place as a DB migration would? Seems like a lot of people do this as part of CI/CD in the serverless world, which seems not pleasant, or you expose an API handler for it... |
Beta Was this translation helpful? Give feedback.
-
Problem
Hatchet currently doesn't work on serverless infrastructure (such as lambda, Vercel functions and so on), as the worker needs to be a long-running process and thus only works on VPS or actively running containers.
Solution
We could add support for serverless by adding a concept of serverless workers and allowing to define an HTTP URL, which will be executed for each run.
The user would add an API route using a simple hatchet API to handle the incoming jobs, and then define their job as usual.
Thoughts
Caveats
Spec (WIP, edited)
Abstractions
Beta Was this translation helpful? Give feedback.
All reactions