Skip to content

Commit f231b40

Browse files
committed
updated batch settings
1 parent 8cd419a commit f231b40

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/content/docs/pipelines/configuration/batching.mdx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,20 @@ There are three ways to define how requests are batched:
1111

1212
1. `batch-max-mb`: The maximum amount of data that will be batched, in megabytes. Default is 10 MB, maximum is 100 MB.
1313
2. `batch-max-rows`: The maximum number of rows or events in a batch before data is written. Default, and maximum, is 10,000 rows.
14-
3. `batch-max-seconds`: The maximum duration of a batch before data is written, in seconds. Default is 15 seconds, maximum is 600 seconds.
14+
3. `batch-max-seconds`: The maximum duration of a batch before data is written, in seconds. Default is 15 seconds, maximum is 300 seconds.
1515

1616
Pipelines batch definitions are hints. A pipeline will follow these hints closely, but batches will not be exact.
1717

1818
All three batch definitions work together. Whichever limit is reached first triggers the delivery of a batch.
1919

20-
For example, a `batch-max-mb` = 100 MB and a `batch-max-seconds` = 600 means that if 100 MB of events are posted to the Pipeline, the batch will be delivered. However, if it takes longer than 600 seconds for 100 MB of events to be posted, a batch of all the messages that were posted during those 600 seconds will be created and delivered.
20+
For example, a `batch-max-mb` = 100 MB and a `batch-max-seconds` = 600 means that if 100 MB of events are posted to the Pipeline, the batch will be delivered. However, if it takes longer than 600 seconds for 100 MB of events to be posted, a batch of all the messages that were posted during those 300 seconds will be created and delivered.
2121

22+
## Defining batch settings using Wrangler
23+
To update the batch settings for an existing Pipeline using Wrangler, run the following command in a terminal
24+
25+
```sh
26+
npx wrangler pipelines update [PIPELINE-NAME] --batch-max-mb 100 --batch-max-rows 10000 --batch-max-seconds 300
27+
```
2228

2329
## Batch settings
2430

@@ -27,5 +33,5 @@ You can configure the following batch-level settings to adjust how Pipelines cre
2733
| Setting | Default | Minimum | Maximum |
2834
| ----------------------------------------- | ----------- | --------- | ----------- |
2935
| Maximum Batch Size `batch-max-mb` | 10 MB | 0.001 MB | 100 MB |
30-
| Maximum Batch Timeout `batch-max-seconds` | 15 seconds | 0 seconds | 600 seconds |
36+
| Maximum Batch Timeout `batch-max-seconds` | 15 seconds | 0 seconds | 300 seconds |
3137
| Maximum Batch Rows `batch-max-rows` | 10,000 rows | 1 row | 10,000 rows |

0 commit comments

Comments
 (0)