aboutsummaryrefslogtreecommitdiffhomepage
path: root/pingora-load-balancing/src
diff options
context:
space:
mode:
Diffstat (limited to 'pingora-load-balancing/src')
-rw-r--r--pingora-load-balancing/src/lib.rs6
-rw-r--r--pingora-load-balancing/src/selection/mod.rs6
2 files changed, 8 insertions, 4 deletions
diff --git a/pingora-load-balancing/src/lib.rs b/pingora-load-balancing/src/lib.rs
index 60e30ed..c950c85 100644
--- a/pingora-load-balancing/src/lib.rs
+++ b/pingora-load-balancing/src/lib.rs
@@ -100,7 +100,7 @@ impl std::net::ToSocketAddrs for Backend {
/// [Backends] is a collection of [Backend]s.
///
/// It includes a service discovery method (static or dynamic) to discover all
-/// the available backends as well as an optionally health check method to probe the liveness
+/// the available backends as well as an optional health check method to probe the liveness
/// of each backend.
pub struct Backends {
discovery: Box<dyn ServiceDiscovery + Send + Sync + 'static>,
@@ -207,9 +207,9 @@ impl Backends {
Ok(self.do_update(new_backends, enablement))
}
- /// Run health check on all the backend if it is set.
+ /// Run health check on all backends if it is set.
///
- /// When `parallel: true`, all the backends are checked in parallel instead of sequentially
+ /// When `parallel: true`, all backends are checked in parallel instead of sequentially
pub async fn run_health_check(&self, parallel: bool) {
use crate::health_check::HealthCheck;
use log::{info, warn};
diff --git a/pingora-load-balancing/src/selection/mod.rs b/pingora-load-balancing/src/selection/mod.rs
index d7b7e9b..88a6ea6 100644
--- a/pingora-load-balancing/src/selection/mod.rs
+++ b/pingora-load-balancing/src/selection/mod.rs
@@ -58,8 +58,12 @@ pub trait SelectionAlgorithm {
fn next(&self, key: &[u8]) -> u64;
}
-/// [FVN](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function) hashing
+/// [FNV](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function) hashing
/// on weighted backends
+pub type FNVHash = Weighted<fnv::FnvHasher>;
+
+/// Alias of [`FNVHash`] for backwards compatibility until the next breaking change
+#[doc(hidden)]
pub type FVNHash = Weighted<fnv::FnvHasher>;
/// Random selection on weighted backends
pub type Random = Weighted<algorithms::Random>;