Skip to content

chore(OSC-1274): Update best practices for batching#6683

Open
ravishankar-sumo wants to merge 4 commits into
mainfrom
rs/batching-migration
Open

chore(OSC-1274): Update best practices for batching#6683
ravishankar-sumo wants to merge 4 commits into
mainfrom
rs/batching-migration

Conversation

@ravishankar-sumo
Copy link
Copy Markdown
Contributor

@ravishankar-sumo ravishankar-sumo commented May 11, 2026

Purpose of this pull request

This pull request...

Select the type of change

  • Minor Changes - Typos, formatting, slight revisions
  • Update Content - Revisions, updating sections
  • New Content - New features, sections, pages, tutorials
  • Site and Tools - .clabot, version updates, maintenance, dependencies, new packages for the site (Docusaurus, Gatsby, React, etc.)

Ticket (if applicable)

@cla-bot cla-bot Bot added the cla-signed Contributor approved, listed in .clabot file label May 11, 2026
@ravishankar-sumo ravishankar-sumo marked this pull request as ready for review May 11, 2026 13:28
@kimsauce
Copy link
Copy Markdown
Collaborator

Hi @ravishankar-sumo , thank you for submitting! Could you please add the associated Jira ticket link to your PR description?

@amee-sumo tagging you as this is /send-data

Comment thread docs/send-data/kubernetes/best-practices.md Outdated
Comment thread docs/send-data/kubernetes/best-practices.md Outdated
Comment thread docs/send-data/kubernetes/best-practices.md
Comment thread docs/send-data/kubernetes/best-practices.md Outdated
Comment thread docs/send-data/kubernetes/best-practices.md Outdated
Copy link
Copy Markdown
Collaborator

@kimsauce kimsauce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple edits

@ravishankar-sumo ravishankar-sumo force-pushed the rs/batching-migration branch 2 times, most recently from 8f22eba to 7fafc1e Compare June 2, 2026 07:25
@ravishankar-sumo ravishankar-sumo requested a review from kimsauce June 2, 2026 10:15
ravishankar-sumo and others added 4 commits June 4, 2026 11:11
Co-authored-by: Kim Pohas <56411016+kimsauce@users.noreply.github.com>
Co-authored-by: Kim Pohas <56411016+kimsauce@users.noreply.github.com>
@ravishankar-sumo ravishankar-sumo force-pushed the rs/batching-migration branch from 7fafc1e to 80b9950 Compare June 4, 2026 05:41
#### Queue Size
When an exporter is preceded by a batch processor, `sending_queue.queue_size` represents the number of batches produced by the batch processor. With exporter-side batching, the batch processor is removed, so `sending_queue.queue_size` instead represents the number of individual records. As a result, if the queue size is not adjusted accordingly, the queue may fill up more quickly and potentially lead to data loss.

To avoid this, it is recommended to increase `sending_queue.queue_size` by a factor equal to the batch processor’s `send_batch_size`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To avoid this, it is recommended to increase `sending_queue.queue_size` by a factor equal to the batch processor’s `send_batch_size`.
To avoid this, we recommend increasing `sending_queue.queue_size` by a factor equal to the batch processor’s `send_batch_size`.

To avoid this, it is recommended to increase `sending_queue.queue_size` by a factor equal to the batch processor’s `send_batch_size`.

##### Example configuration
Assuming we have a batch processor with config
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Assuming we have a batch processor with config
If you have a batch processor configured as follows:

send_batch_max_size: 2_048
```

We have the `sending_queue.queue_size` configured as,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We have the `sending_queue.queue_size` configured as,
And the `sending_queue.queue_size` configured as:

queue_size: 1000
```

The new config should be,
Copy link
Copy Markdown
Collaborator

@kimsauce kimsauce Jun 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The new config should be,
You'd need to update to the following configuration:

Comment on lines +585 to +587
send_batch_size: 1_024
timeout: 1s
send_batch_max_size: 2_048
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the underscores be removed for consistency with the other send_batch_size and send_batch_max_size instances?

Suggested change
send_batch_size: 1_024
timeout: 1s
send_batch_max_size: 2_048
send_batch_size: 1024
timeout: 1s
send_batch_max_size: 2048

send_batch_max_size: 10000
```

The new config should be,
Copy link
Copy Markdown
Collaborator

@kimsauce kimsauce Jun 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The new config should be,
You'd need to migrate them to the exporter configuration as follows:

queue_size: 1024000 ## = 1000 * 1024
```
#### Batch Size
The batching logic is moved from processor to exporter so if you have custom configured the batch size like,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The batching logic is moved from processor to exporter so if you have custom configured the batch size like,
If your batch processor has custom batch size settings like the example below:

Copy link
Copy Markdown
Collaborator

@kimsauce kimsauce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ravishankar-sumo just had some minor formatting/wording suggestions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed Contributor approved, listed in .clabot file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants