added adaptive weight balancing algorithm

This commit is contained in:
psun256
2025-12-09 18:31:22 -05:00
parent a3f50c1f0a
commit 20b51c2562
13 changed files with 274 additions and 26 deletions

View File

@@ -1,4 +1,7 @@
pub mod round_robin;
pub mod adaptive_weight;
pub mod least_connections;
pub mod ip_hashing;
use std::fmt::Debug;
use std::sync::Arc;
@@ -6,4 +9,4 @@ use crate::backend::Backend;
pub trait Balancer: Debug + Send + Sync + 'static {
fn choose_backend(&mut self) -> Option<Arc<Backend>>;
}
}