fix: harden concurrency limits and high-RPM runtime paths

Bound request, stream, queue, and shutdown resource lifetimes. Reduce scheduler and Redis hot-path work and isolate database maintenance. Include regression coverage, load probes, and concurrency audit results.
This commit is contained in:
elky
2026-09-10 08:14:58 +08:00
parent 361952ada9
commit ecc16673eb
149 changed files with 27963 additions and 1926 deletions
+11
View File
@@ -19,6 +19,17 @@ use sha2::{Digest, Sha256};
use crate::data::GatewayDataState;
use crate::AppState;
pub use crate::tunnel::build_tunnel_pressure_router;
pub async fn gateway_metric_samples(
state: &AppState,
) -> Result<Vec<aether_runtime::MetricSample>, String> {
if !state.prewarm_metric_snapshot().await {
return Err("gateway harness metric refresh timed out".to_string());
}
Ok(state.metric_samples().await)
}
#[derive(Debug, Clone)]
pub struct OpenAiChatPressureTarget {
pub base_url: String,