pub struct QueueConfig {
pub enabled: bool,
pub max_size: u32,
pub max_wait_seconds: u64,
}Expand description
Configuration for request queuing when backends are saturated.
The request queue holds incoming requests when all backends are at capacity, preventing immediate 503 rejections for burst traffic.
§Example
[queue]
enabled = true
max_size = 100
max_wait_seconds = 30Fields§
§enabled: boolWhether request queuing is enabled.
Default: true When false, saturated requests immediately return 503.
max_size: u32Maximum number of queued requests.
Default: 100 When max_size is 0, queuing is disabled (equivalent to enabled=false). When queue is full, new requests immediately return 503.
max_wait_seconds: u64Maximum wait time for queued requests in seconds.
Default: 30 seconds Requests exceeding this timeout return 503 with retry_after header.
Implementations§
Source§impl QueueConfig
impl QueueConfig
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if queuing is effectively enabled.
Queuing is disabled if either enabled=false or max_size=0.
Trait Implementations§
Source§impl Clone for QueueConfig
impl Clone for QueueConfig
Source§fn clone(&self) -> QueueConfig
fn clone(&self) -> QueueConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QueueConfig
impl Debug for QueueConfig
Source§impl Default for QueueConfig
impl Default for QueueConfig
Source§impl<'de> Deserialize<'de> for QueueConfigwhere
QueueConfig: Default,
impl<'de> Deserialize<'de> for QueueConfigwhere
QueueConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for QueueConfig
impl RefUnwindSafe for QueueConfig
impl Send for QueueConfig
impl Sync for QueueConfig
impl Unpin for QueueConfig
impl UnsafeUnpin for QueueConfig
impl UnwindSafe for QueueConfig
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
Mutably borrows from an owned value. Read more