pub struct AimdThrottleConfig {
pub read: AimdConfig,
pub write: AimdConfig,
pub delete: AimdConfig,
pub list: AimdConfig,
pub burst_capacity: u32,
pub max_retries: usize,
pub min_backoff_ms: u64,
pub max_backoff_ms: u64,
}Expand description
Configuration for the AIMD-throttled ObjectStore wrapper.
Each operation category (read, write, delete, list) has its own AIMD config.
Use with_aimd to set all categories at
once, or per-category methods like with_read_aimd
for fine-grained control.
Fields§
§read: AimdConfigAIMD configuration for read operations (get, get_opts, get_range, get_ranges, head).
write: AimdConfigAIMD configuration for write operations (put, put_opts, put_multipart, copy, rename, etc.).
delete: AimdConfigAIMD configuration for delete operations.
list: AimdConfigAIMD configuration for list operations (list_with_delimiter).
burst_capacity: u32Maximum tokens that can accumulate for bursts (shared across all categories).
max_retries: usizeMaximum number of retries for throttle errors within the AIMD layer.
min_backoff_ms: u64Minimum backoff in milliseconds between retry attempts.
max_backoff_ms: u64Maximum backoff in milliseconds between retry attempts.
Implementations§
Source§impl AimdThrottleConfig
impl AimdThrottleConfig
Sourcepub fn with_aimd(self, aimd: AimdConfig) -> Self
pub fn with_aimd(self, aimd: AimdConfig) -> Self
Set the AIMD configuration for all four operation categories at once.
Sourcepub fn with_read_aimd(self, aimd: AimdConfig) -> Self
pub fn with_read_aimd(self, aimd: AimdConfig) -> Self
Set the AIMD configuration for read operations.
Sourcepub fn with_write_aimd(self, aimd: AimdConfig) -> Self
pub fn with_write_aimd(self, aimd: AimdConfig) -> Self
Set the AIMD configuration for write operations.
Sourcepub fn with_delete_aimd(self, aimd: AimdConfig) -> Self
pub fn with_delete_aimd(self, aimd: AimdConfig) -> Self
Set the AIMD configuration for delete operations.
Sourcepub fn with_list_aimd(self, aimd: AimdConfig) -> Self
pub fn with_list_aimd(self, aimd: AimdConfig) -> Self
Set the AIMD configuration for list operations.
Sourcepub fn is_disabled(&self) -> bool
pub fn is_disabled(&self) -> bool
Returns true when the AIMD throttle layer should be bypassed entirely.
pub fn with_burst_capacity(self, burst_capacity: u32) -> Self
Sourcepub fn from_storage_options(
storage_options: Option<&HashMap<String, String>>,
) -> Result<Self>
pub fn from_storage_options( storage_options: Option<&HashMap<String, String>>, ) -> Result<Self>
Build an AimdThrottleConfig from storage options and environment variables.
Storage options take precedence over environment variables, which take precedence over defaults. A single AIMD config is applied to all four operation categories (read/write/delete/list).
| Setting | Storage Option Key | Env Var | Default |
|---|---|---|---|
| Initial rate | lance_aimd_initial_rate | LANCE_AIMD_INITIAL_RATE | 2000 |
| Min rate | lance_aimd_min_rate | LANCE_AIMD_MIN_RATE | 1 |
| Max rate | lance_aimd_max_rate | LANCE_AIMD_MAX_RATE | 5000 |
| Decrease factor | lance_aimd_decrease_factor | LANCE_AIMD_DECREASE_FACTOR | 0.5 |
| Additive increment | lance_aimd_additive_increment | LANCE_AIMD_ADDITIVE_INCREMENT | 300 |
| Burst capacity | lance_aimd_burst_capacity | LANCE_AIMD_BURST_CAPACITY | 100 |
| Max retries | lance_aimd_max_retries | LANCE_AIMD_MAX_RETRIES | 3 |
| Min backoff ms | lance_aimd_min_backoff_ms | LANCE_AIMD_MIN_BACKOFF_MS | 100 |
| Max backoff ms | lance_aimd_max_backoff_ms | LANCE_AIMD_MAX_BACKOFF_MS | 300 |
Trait Implementations§
Source§impl Clone for AimdThrottleConfig
impl Clone for AimdThrottleConfig
Source§fn clone(&self) -> AimdThrottleConfig
fn clone(&self) -> AimdThrottleConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AimdThrottleConfig
impl Debug for AimdThrottleConfig
Auto Trait Implementations§
impl Freeze for AimdThrottleConfig
impl RefUnwindSafe for AimdThrottleConfig
impl Send for AimdThrottleConfig
impl Sync for AimdThrottleConfig
impl Unpin for AimdThrottleConfig
impl UnsafeUnpin for AimdThrottleConfig
impl UnwindSafe for AimdThrottleConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more