perf: optimize header handling and concurrent access patterns

This commit is contained in:
Ara Sadoyan
2025-12-10 19:09:04 +01:00
parent a43bccdfb8
commit 0fc79c022f
6 changed files with 46 additions and 25 deletions

View File

@@ -4,9 +4,10 @@ use std::collections::HashMap;
use std::sync::atomic::AtomicUsize;
pub type UpstreamsDashMap = DashMap<String, DashMap<String, (Vec<InnerMap>, AtomicUsize)>>;
use std::net::IpAddr;
use std::sync::Arc;
pub type UpstreamsIdMap = DashMap<String, InnerMap>;
pub type Headers = DashMap<String, DashMap<String, Vec<(String, String)>>>;
pub type Headers = DashMap<String, DashMap<Arc<str>, Vec<(Arc<str>, Arc<str>)>>>;
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
pub struct ServiceMapping {