To address the issue of long startup times in Trigger.dev, there are several optimizations and improvements currently being developed that might help reduce the startup time for your tasks:
-
Warm Starts: Trigger.dev is working on introducing warm starts with their upcoming Run Engine 2. This feature will improve performance for frequent runs by efficiently handling subsequent runs from the same deployment, reducing the need for repeated Docker image pulls and thus improving start times.
-
Fast Cold Starts: There is also an ongoing development of advanced CPU+memory snapshot/restore technology. This system will capture your code state just before execution and enable rapid restoration for each run, including first-time deployments. This aims to significantly reduce cold start times.
The ultimate goal of these improvements is to achieve sub-1 second p95 start times. These enhancements are being rolled out gradually, so you should see improvements over time.
For more detailed information, you can refer to the Support QA section.
If these optimizations are not yet available or sufficient for your use case, and immediate response times are critical (such as responding to user Slack messages), you might consider handling these specific tasks through a more traditional web response setup until the improvements are fully implemented.
For further updates and detailed breakdowns of specific run start processes, you can check the Trigger.dev dashboard by clicking the Attempt span on the Run page, which provides an inspector panel showing each step of the start process.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: