Module loadbalance

Module loadbalance 

Source
Available on crate feature client only.
Expand description

HTTP Loadbalance Layer

This is a copy of volo::loadbalance::layer without the retry logic. Because retry needs the Req has Clone trait, but HTTP body may be a stream, which cannot be cloned. So we remove the retry related codes here.

In addition, HTTP service can use DNS as service discover, so the default load balance uses a DNS resolver for pick a target address (the DNS resolver picks only one because it does not need load balance).

Structs§

LbConfig
Load balance layer generator with a LoadBalance and a Discover
LoadBalanceLayer
Layer for load balance generated by LbConfig
LoadBalanceService
Service for load balance generated by LoadBalanceLayer

Type Aliases§

DefaultLb
Default load balance with DnsResolver
DefaultLbService
Default load balance service generated by DefaultLb