0.34.6_repo_cleanup
This commit is contained in:
1 parent
ce1a90397c
commit
133d2f0f91
273 files changed
+5969
-6926
No files matched your search
@@ -1,4 +1,3 @@
|
||||
// Core pool model and policies.
|
||||
use crate::{config::CompiledBackend, vhost::PoolMember};
|
||||
use anyhow::{ensure, Result};
|
||||
use axum::body::Body;
|
||||
@@ -54,15 +53,8 @@ pub struct Keepalive {
|
||||
pub idle_timeout_seconds: u64,
|
||||
pub max_idle_per_host: usize,
|
||||
pub tcp_keepalive_seconds: u64,
|
||||
/// Rebuild a backend Hyper client after this many requests. The counter is
|
||||
/// per backend/client generation, not per TCP connection. Zero disables
|
||||
/// request-count based recycling.
|
||||
pub pool_recycle_requests: u64,
|
||||
/// Maximum age of one backend Hyper client generation. Zero disables
|
||||
/// time-based recycling.
|
||||
pub pool_recycle_seconds: u64,
|
||||
/// Bound Hyper's adaptive HTTP/1 read buffer per connection. Hyper requires
|
||||
/// at least 8192 bytes. This affects upstream HTTP/1 only.
|
||||
pub http1_max_buffer_bytes: usize,
|
||||
}
|
||||
impl Default for Keepalive {
|
||||
@@ -70,9 +62,6 @@ impl Default for Keepalive {
|
||||
Self {
|
||||
enabled: true,
|
||||
idle_timeout_seconds: 30,
|
||||
// Retain enough reusable H1 upstream sockets under concurrent
|
||||
// small-response traffic. The existing 1..=64 bound, idle
|
||||
// timeout and pool recycling still limit resource retention.
|
||||
max_idle_per_host: 64,
|
||||
tcp_keepalive_seconds: 30,
|
||||
pool_recycle_requests: 25_000,
|
||||
@@ -219,7 +208,6 @@ impl Default for Settings {
|
||||
}
|
||||
}
|
||||
impl Settings {
|
||||
/// Resolve active health per member; a disabled monitor never probes.
|
||||
pub fn health_for(&self, member: &PoolMember) -> HealthCheck {
|
||||
let mut health = member
|
||||
.health_check
|
||||
@@ -233,7 +221,6 @@ impl Settings {
|
||||
}
|
||||
health
|
||||
}
|
||||
/// Monitoring off also excludes passive ejection; failures remain logged.
|
||||
pub fn passive_for(&self, member: &PoolMember) -> PassiveHealth {
|
||||
let mut passive = self.passive_health.clone();
|
||||
if !member.health_check_enabled {
|
||||
@@ -389,8 +376,6 @@ impl Default for FailureObservation {
|
||||
}
|
||||
#[derive(Debug)]
|
||||
pub struct BackendState {
|
||||
// Lock-free healthy lookups on the hot request-selection path. The mutex
|
||||
// remains authoritative for transitions, probes and quarantine expiry.
|
||||
healthy_cached: AtomicBool,
|
||||
health: Mutex<Health>,
|
||||
traffic: Mutex<Traffic>,
|
||||
|
||||
Reference in new issue
Block a user