Skip to content

v0.2.0

Compare
Choose a tag to compare
@jhump jhump released this 17 Apr 22:05
· 11 commits to main since this release
7463e81

This release includes some additions meant to help when using this client to communicate with servers that are behind a layer-3 TCP load balancer (which includes Kubernetes services when both client and server are in the same Kubernetes cluster).

In these cases, DNS may resolve only to a single IP address for the load balancer, and since it only balances connection establishment (since it's layer-3, not layer-7/HTTP) this could result in poor load distribution, such as all traffic being sent to a single backend.

What's Changed

Enhancements

  • Add resolver.MinConnections by @jhump in #58
    • When it is expected that the resolver (such as DNS) could return few addresses (or even only one), this will cause the client to create additional connections anyway. If the server is a layer-3 TCP load balancer, each connection created is likely to be connected to a different backend, to aid load distribution.
  • Add httplb.WithRoundTripperMaxLifetime, which causes connections to be periodically recycled by @jhump in #60
    • As connections organically come and go, like from backends being turned down and up (like during software deploys or when the backend servers are scaled up and down as traffic volume changes), it is possible for multiple connections through a layer-3 TCP load balancer to end up connected to a small number of actual backends (even potentially only one). To ensure connection diversity and mitigate this situation, this option can be used to cause connections to be continually re-established.

Full Changelog: v0.1.0...v0.2.0