-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tips to reduce latency #13996
base: master
Are you sure you want to change the base?
Tips to reduce latency #13996
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,6 +112,14 @@ 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. | ||
|
||
<Callout type="info"> | ||
**Reducing Workflow Latency** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would use the same terminology you do in the troubleshooting guide: "How can my workflow run faster?" |
||
|
||
To reduce latency from the trigger to the end of your workflow, consider increasing the memory allocation to at least 512MB. This will result in significantly better performance compared to the default 256MB. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To avoid duplicating the content you have in the troubleshooting guide, maybe just simplify and say: |
||
For other ways to improve your workflow's performance, see [Troubleshooting](/troubleshooting#how-can-my-workflow-run-faster). | ||
|
||
</Callout> | ||
|
||
**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 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -195,7 +195,7 @@ 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 +295,14 @@ 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. | ||
|
||
|
||
<Callout type="info"> | ||
**Reducing Workflow Latency** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same feedback from above here |
||
|
||
To reduce latency for HTTP requests, return a static response 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. For more information, see [Sources](https://pipedream.com/docs/sources). | ||
|
||
</Callout> | ||
|
||
#### Customizing the HTTP response | ||
|
||
If you need to issue a custom HTTP response from a workflow, you can either: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change:
to: