diff --git a/docs-v2/pages/troubleshooting.mdx b/docs-v2/pages/troubleshooting.mdx index 3b236f6913c73..20e7ef6df4847 100644 --- a/docs-v2/pages/troubleshooting.mdx +++ b/docs-v2/pages/troubleshooting.mdx @@ -246,6 +246,18 @@ Pipedream also operates a [built-in key-value store](/data-stores/) that you can Use Pipedream's [built-in Delay actions](/workflows/flow-control/#delay) to delay a workflow at any step. +### How can my workflow run faster? + +Here are a few things that can help your workflow execute faster: + +1. **Increase memory:** Increase your [workflow memory](/workflows/settings#memory) to at least 512 MB. Raising the memory limit will proportionally increase CPU resources, leading to improved performance and reduced latency. + +2. **Return static HTTP responses:** If your workflow is triggered by an HTTP source, return a [static HTTP response](/workflows/triggers#http-responses) directly from the trigger configuration. This ensures the HTTP response is sent to the caller immediately, before the rest of the workflow steps are executed. + +3. **Simplify your workflow:** Reduce the number of [steps](/workflows/steps#code-actions) and [segments](/workflows/control-flow#workflow-segments) in your workflow, combining multiple steps into one, if possible. This lowers the overhead involved in managing step execution and exports. + +4. **Activate warm workers:** Use [warm workers](/workflows/settings#eliminate-cold-starts) to reduce the startup time of workflows. Set [as many warm workers](/workflows/settings#how-many-workers-should-i-configure) as you want for high-volume traffic. + ### How can I save common functions as steps? You can create your own custom triggers and actions ("components") on Pipedream using [the Component API](/components/api/). These components are private to your account and can be used in any workflow. diff --git a/docs-v2/pages/workflows/settings.mdx b/docs-v2/pages/workflows/settings.mdx index f3c31e7915002..f286782704378 100644 --- a/docs-v2/pages/workflows/settings.mdx +++ b/docs-v2/pages/workflows/settings.mdx @@ -112,6 +112,12 @@ By default, workflows run with {process.env.MEMORY_LIMIT} of memory. If you're p Increasing your workflow's memory gives you a proportional increase in CPU, so increasing your workflow's memory can reduce its overall runtime and make it more performant. + +**How can my workflow run faster?** + +See [our guide on running workflows faster](/troubleshooting#how-can-my-workflow-run-faster). + + **Pipedream charges credits proportional to your memory configuration**. When you modify your memory settings, Pipedream will show you the number of credits you'll be charged per execution. [Read more here](/pricing/#how-does-workflow-memory-affect-credits). ### Concurrency and Throttling diff --git a/docs-v2/pages/workflows/triggers.mdx b/docs-v2/pages/workflows/triggers.mdx index 48d331d3e54c9..160dfd853d5b4 100644 --- a/docs-v2/pages/workflows/triggers.mdx +++ b/docs-v2/pages/workflows/triggers.mdx @@ -195,7 +195,6 @@ import got from "got"; export default defineComponent({ async run({ steps, $ }) { const pipeline = promisify(stream.pipeline); - await pipeline( got.stream(steps.trigger.event.body.raw_body_url), fs.createWriteStream(`/tmp/raw_body`) @@ -295,6 +294,13 @@ By default, when you send a [valid HTTP request](#valid-requests) to your endpoi When you're processing HTTP requests, you often don't need to issue any special response to the client. We issue this default response so you don't have to write any code to do it yourself. + + +**How can my workflow run faster?** + +See [our guide on running workflows faster](/troubleshooting#how-can-my-workflow-run-faster). + + #### Customizing the HTTP response If you need to issue a custom HTTP response from a workflow, you can either: