ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
mdl_gov_cfg_t Struct Reference

Per-site politeness tunables the governor is initialised with. More...

#include <mdl_politeness.h>

Data Fields

uint32_t rate_per_min
 Sustained per-host request ceiling (0 = off).
uint32_t burst
 Token-bucket capacity, in requests (>= 1).
uint32_t backoff_base_ms
 First backoff window on a 429/503.
uint32_t backoff_max_ms
 Backoff-window ceiling.
uint16_t decay_after
 Consecutive successes that drop one backoff level.
uint16_t max_inflight
 Per-host in-flight request cap (>= 1).

Detailed Description

Per-site politeness tunables the governor is initialised with.

Every field is data, loaded from the site descriptor (mdl_config_load) with conservative defaults (mdl_gov_cfg_default) so an unconfigured site is still polite. The token bucket is described by rate_per_min (sustained ceiling) and burst (how many requests may go out back-to-back before pacing kicks in). Backoff grows from backoff_base_ms, doubling per consecutive throttle, capped at backoff_max_ms, and decays one level per decay_after successes.

Invariant
burst >= 1 and max_inflight >= 1 after mdl_gov_cfg_default or mdl_governor_init (both clamp up from 0).
rate_per_min == 0 disables rate limiting (backoff still applies).
See also
mdl_governor_init
mdl_gov_cfg_default
Since
0.1.0

Definition at line 190 of file mdl_politeness.h.

Field Documentation

◆ backoff_base_ms

uint32_t mdl_gov_cfg_t::backoff_base_ms

First backoff window on a 429/503.

Definition at line 193 of file mdl_politeness.h.

Referenced by internal_config_set_defaults(), internal_gov_backoff_window(), and mdl_config_gov_cfg().

◆ backoff_max_ms

uint32_t mdl_gov_cfg_t::backoff_max_ms

Backoff-window ceiling.

Definition at line 194 of file mdl_politeness.h.

Referenced by internal_config_set_defaults(), internal_gov_backoff_window(), and mdl_config_gov_cfg().

◆ burst

uint32_t mdl_gov_cfg_t::burst

Token-bucket capacity, in requests (>= 1).

Definition at line 192 of file mdl_politeness.h.

Referenced by internal_config_set_defaults(), internal_gov_cap_ms(), mdl_config_gov_cfg(), and mdl_governor_init_clock().

◆ decay_after

uint16_t mdl_gov_cfg_t::decay_after

Consecutive successes that drop one backoff level.

Definition at line 195 of file mdl_politeness.h.

Referenced by internal_gov_on_success().

◆ max_inflight

uint16_t mdl_gov_cfg_t::max_inflight

Per-host in-flight request cap (>= 1).

Definition at line 196 of file mdl_politeness.h.

Referenced by internal_config_set_defaults(), mdl_config_gov_cfg(), mdl_governor_acquire(), and mdl_governor_init_clock().

◆ rate_per_min

uint32_t mdl_gov_cfg_t::rate_per_min

Sustained per-host request ceiling (0 = off).

Definition at line 191 of file mdl_politeness.h.

Referenced by internal_config_set_defaults(), internal_gov_interval_ms(), and mdl_config_gov_cfg().


The documentation for this struct was generated from the following file: