Skip to content
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

docs: add batch examples #103

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,56 @@ Paste this token to the example manifests:
sed -i '' -e "s/\<TOKEN\>/INSERT YOUR COPIED TOKEN HERE/" docs/examples/simple-demo/one_tenant_two_subscriptions.yaml
```

**Note: Telemetry Controller supports batching, you can enable it by adding it to your `output` definition.**

We reccommend the following settings:

### Low-Latency settings

This configuration prioritizes sending small, frequent batches over achieving efficiency through larger batch sizes, it is useful for scenarios where minimal delay in data transmission is critical:

- `send_batch_size`: 8192 (Minimum viable batch size for fast processing.)
- `timeout`: 200ms (Low timeout ensures small batches are sent quickly.)

Example config:

```yaml
apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Output
metadata:
name: LL-output
namespace: example
spec:
batch:
send_batch_size: 8192
timeout: 200ms
otlp:
endpoint: example
```

### Archival settings

This configuration maximizes resource usage, making it ideal for batch processing and data archival purposes, it is useful for scenarios where efficiency and throughput are prioritized over immediate transmission:

- `send_batch_size`: 1048576 (Large batch size for optimal throughput.)
- `timeout`: 60s (Wait for more data to maximize batch size.)

Example config:

```yaml
apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Output
metadata:
name: Archival-output
namespace: example
spec:
batch:
send_batch_size: 1048576
timeout: 60s
otlp:
endpoint: example
```

```sh
# Deploy the pipeline definition
kubectl apply -f docs/examples/simple-demo/one_tenant_two_subscriptions.yaml
Expand Down
Loading