v0.34.0_2
This commit is contained in:
1 parent
434e789144
commit
9cfc4588cc
18 files changed
+392
-121
No files matched your search
@@ -70,7 +70,10 @@ impl Default for Keepalive {
|
||||
Self {
|
||||
enabled: true,
|
||||
idle_timeout_seconds: 30,
|
||||
max_idle_per_host: 4,
|
||||
// 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,
|
||||
pool_recycle_seconds: 3_600,
|
||||
|
||||
@@ -102,6 +102,11 @@ mod tests {
|
||||
assert!(parsed.retry.retry_connect_errors);
|
||||
assert!(parsed.retry.retry_timeouts);
|
||||
assert_eq!(parsed.retry.retry_statuses, vec![502, 503, 504]);
|
||||
assert_eq!(parsed.keepalive.max_idle_per_host, 64);
|
||||
let explicit: Settings = serde_json::from_value(serde_json::json!({
|
||||
"keepalive": { "max_idle_per_host": 4 }
|
||||
})).unwrap();
|
||||
assert_eq!(explicit.keepalive.max_idle_per_host, 4);
|
||||
assert_eq!(parsed.keepalive.pool_recycle_requests, 25_000);
|
||||
assert_eq!(parsed.keepalive.pool_recycle_seconds, 3_600);
|
||||
assert_eq!(parsed.keepalive.http1_max_buffer_bytes, 131_072);
|
||||
|
||||
Reference in new issue
Block a user