Skip to content

Commit

Permalink
Merge pull request #103 from kube-logging/docs/add-batch-examples
Browse files Browse the repository at this point in the history
docs: add batch examples
  • Loading branch information
csatib02 authored Nov 18, 2024
2 parents b8c285f + ced8518 commit 1901a28
Showing 1 changed file with 50 additions and 0 deletions.
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

0 comments on commit 1901a28

Please sign in to comment.