Skip to content
Open
Changes from 1 commit
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
27 changes: 25 additions & 2 deletions docs/agent-data-plane/configuration/dogstatsd.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configuring DogStatsD on Agent Data Plane

<!-- Last updated: 2026-05-19 -->
<!-- Last updated: 2026-05-29 -->

The DogStatsD implementation on ADP has been redesigned in Rust for better resource guarantees and
efficiency. Because the architecture is different from the original implementation, certain
Expand Down Expand Up @@ -48,7 +48,7 @@ architecture is fundamentally different or the feature is platform-specific.
| Config Key | Description | Reason |
| ---------------------------------------------- | ---------------------------------- | ------------------------------------------------------------ |
| `dogstatsd_host_socket_path` | Host UDS socket dir for DSD | Not read by DSD server; admission controller only |
| `dogstatsd_mem_based_rate_limiter.enabled` | Enable memory rate limiter | Go GC specific; use `memory_limit` |
| `dogstatsd_mem_based_rate_limiter.*` | Memory-based rate limiter (11 keys) | Go GCspecific; ADP uses `memory_limit` (see below) |
Comment thread
jszwedko marked this conversation as resolved.
Outdated
| `dogstatsd_no_aggregation_pipeline_batch_size` | No-aggregation pipeline batch size | Fixed in ADP topology |
| `dogstatsd_packet_buffer_flush_timeout` | Packet buffer flush timeout | ADP decodes inline |
| `dogstatsd_packet_buffer_size` | Datagrams per packet buffer | ADP decodes inline |
Expand All @@ -59,6 +59,29 @@ architecture is fundamentally different or the feature is platform-specific.
| `dogstatsd_workers_count` | Number of DSD processing workers | ADP uses async tasks |
| `use_dogstatsd` | Master DogStatsD enable toggle | Core Agent evaluates and sets `data_plane.dogstatsd.enabled` |

### Memory-based rate limiter (`dogstatsd_mem_based_rate_limiter.*`)

The core agent exposes 11 keys under this prefix to apply backpressure when the Go process
approaches its memory limit. They work by manipulating Go's garbage collector
(`debug.SetGCPercent`, `debug.FreeOSMemory`), allocating a large heap ballast to adjust GC
heuristics, and blocking goroutines to slow packet ingestion. None of these mechanisms have
an equivalent in Rust, and ADP does not use a Go runtime.

ADP takes a different approach to the same problem:

- **Static bounds**: components declare their memory footprint at startup via `MemoryBounds`.
ADP refuses to start if declared bounds exceed the configured `memory_limit`, preventing
over-commitment before any traffic arrives.
- **Dynamic limiting**: a `MemoryLimiter` polls the process RSS every 250 ms. When usage
exceeds 95 % of the effective limit it applies proportional async backpressure (1–25 ms)
to ingestion tasks.
- **Structural backpressure**: bounded channels between components provide back-pressure
independently of memory monitoring.

To set a process memory limit in ADP, use `memory_limit` (bytes). The `memory_slop_factor`
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Document the required memory mode

When a user follows this replacement guidance and only sets memory_limit, ADP does not actually enforce the static bounds or start the RSS-based limiter: memory_mode defaults to Disabled and initialize_memory_bounds returns a no-op limiter in that branch (lib/saluki-app/src/memory.rs lines 91-93 and 157-177). This section should mention that the described refusal/backpressure behavior requires memory_mode: strict or permissive (and enable_global_limiter for dynamic backpressure), otherwise the ignored DogStatsD limiter keys are not replaced by active memory limiting.

Useful? React with 👍 / 👎.

setting reserves a headroom fraction to account for allocations not tracked by ADP's internal
accounting. All 11 `dogstatsd_mem_based_rate_limiter.*` keys are ignored by ADP.
Comment thread
jszwedko marked this conversation as resolved.
Outdated

## Behavioral Differences

<!-- section:behavioral-differences -->
Expand Down
Loading